From ec834bfdfff5e3cb51beba0ed07d55c9ab8c2596 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 3 Aug 2022 08:06:15 +0300 Subject: feat: add some help text for --help Sponsored-by: author --- src/bin/riki.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/bin/riki.rs b/src/bin/riki.rs index 6a9744e..fe9b576 100644 --- a/src/bin/riki.rs +++ b/src/bin/riki.rs @@ -39,6 +39,11 @@ fn real_main() -> Result<(), SiteError> { Ok(()) } +/// Static site generator. +/// +/// Riki generates a static web site from markdown files. It mostly +/// follows wikitext and other syntax and semantics of the ikiwiki +/// software (see http://ikiwiki.info/) for input files. #[derive(Parser)] struct Args { #[clap(subcommand)] @@ -51,12 +56,19 @@ enum Command { List(List), } +/// Build the site. #[derive(Parser)] struct Build { + /// Should the output only have the HTML BODY element or the full + /// page? #[clap(long)] plain_body: bool, + /// Directory where source files are. srcdir: PathBuf, + + /// Directore where output files get put. This directory must not + /// exist before the program is run. destdir: PathBuf, } @@ -96,8 +108,10 @@ impl Build { } } +/// List source files in the site. #[derive(Parser)] struct List { + /// Directory where source files are. srcdir: PathBuf, } -- cgit v1.2.1