33 lines
963 B
Rust
33 lines
963 B
Rust
#[derive(StructOpt, Debug)]
|
|
#[structopt(name = "Teasca.de Generator",
|
|
about = "A website generator, used mainly for generating teasca.de")]
|
|
pub struct Opt {
|
|
/// Verbose flag, makes the program more noisy. (-vv for maximum noisiness)
|
|
#[structopt(short = "v", long = "verbose", parse(from_occurrences))]
|
|
pub verbose: u8,
|
|
|
|
/// Quiet flag, makes the program less noisy. (-qqq for minimum noisiness)
|
|
#[structopt(short = "q", long = "quiet", parse(from_occurrences))]
|
|
pub quiet: u8,
|
|
|
|
#[structopt(subcommand)]
|
|
pub cmd: Subcommands,
|
|
}
|
|
|
|
#[derive(StructOpt, Debug)]
|
|
pub enum Subcommands {
|
|
/// Build the website
|
|
#[structopt(name = "build")]
|
|
Build(BuildOps),
|
|
/// Create a new page
|
|
#[structopt(name = "new-page")]
|
|
NewPage,
|
|
}
|
|
|
|
#[derive(StructOpt, Debug)]
|
|
pub struct BuildOps {
|
|
/// Overwrites necessary files to create new ones.
|
|
#[structopt(short = "o", long = "overwrite")]
|
|
pub overwrite: bool,
|
|
}
|