use std::path::PathBuf;
#[derive(Parser, Debug)]
-#[command(author = "Huck Boles")]
-#[command(version = "0.1.1")]
-#[command(about = "A customizable template driven static site generator")]
+#[command(author = "huck boles")]
+#[command(version = "0.1.2")]
+#[command(about = "customizable template driven static site generator")]
#[command(long_about = None)]
pub struct Opts {
/// root directory [current_dir]
/// pattern directory [current_dir/pattern]
#[arg(short, long, value_name = "PATTERN_DIR")]
pub pattern: Option<String>,
- /// only build a single file
+ /// builds a single file and outputs on stdout
#[arg(short, long, value_name = "FILENAME")]
pub file: Option<String>,
- /// parallel processing
- #[arg(long, default_value_t = false)]
- pub parallel: bool,
- /// create a new skeleton directory
- #[arg(long, default_value_t = false)]
- pub new: bool,
+ /// output filetype [html]
+ #[arg(short, long, value_name = "OUTPUT_FILETYPE")]
+ pub output: Option<String>,
+ /// input filetype [markdown]
+ #[arg(short, long, value_name = "INPUT_FILETYPE")]
+ pub input: Option<String>,
/// enable extra output. repeated flags give more info
#[arg(short, long, action = clap::ArgAction::Count)]
pub verbose: u8,
- /// minimal output
+ /// minimal output [false]
#[arg(short, long, default_value_t = false)]
pub quiet: bool,
+ /// enable parallel processing [false]
+ #[arg(short = 'l', long, default_value_t = false)]
+ pub parallel: bool,
+ /// create a new skeleton directory [false]
+ #[arg(long, default_value_t = false)]
+ pub new: bool,
+ /// clean build directory before building site [false]
+ #[arg(long, default_value_t = false)]
+ pub clean: bool,
/// don't stop on file failure [false]
#[arg(long, default_value_t = false)]
pub force: bool,
/// stop on undefined variables and arrays [false]
#[arg(long, default_value_t = false)]
pub undefined: bool,
- /// clean build directory before building site [false]
- #[arg(long, default_value_t = false)]
- pub clean: bool,
/// don't call pandoc on source files
#[arg(long, default_value_t = false)]
pub no_pandoc: bool,
- /// output filetype [html]
- #[arg(short, long, value_name = "OUTPUT_FILETYPE")]
- pub output: Option<String>,
- /// input filetype [markdown]
- #[arg(short, long, value_name = "INPUT_FILETYPE")]
- pub input: Option<String>,
}
#[derive(Debug, Clone, Default)]