From: Gustav Eek Date: Thu, 2 Feb 2023 08:11:44 +0000 (+0100) Subject: Doc. Update usage documentation and add a CLI document. X-Git-Tag: v.0.3 X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=e49d6d0409401f2c568b4e23a378e0c755a6e073;p=ranknauto.git Doc. Update usage documentation and add a CLI document. --- diff --git a/README b/README index 25fbf9f..dc67204 100644 --- a/README +++ b/README @@ -6,8 +6,9 @@ Decide an available distribution, e.g. the log normal, and apply the quantiles from that on a ranked priority list. The output will be the priority in percentages per item in the list. -Read more in [Notes on statistics in Rust](doc/stats.md) on the -details of implementation. +Read more in [Notes on statistics in Rust](doc/stats.md) and +[Notes on command line parsing](doc/cli.md) +on the details of implementation. Also read [Notes on dependencies](doc/dependencies.md) for an essay on Rust. @@ -28,6 +29,20 @@ Write to the author in order to request binaries for your platform. No warranties of a response. +Usage +===== + +Rank N' Auto, reads and writes on standard input and output. Some +statistics parameters can be adjusted, see help for details: +`ranknauto --help`. + +Examples: + +``` +echo -ne "Första post\nAndra\nTredje plats\nOch fjärde\n" \ + | ranknauto -s heavy +``` + Copying ======= diff --git a/doc/cli.md b/doc/cli.md new file mode 100644 index 0000000..330b223 --- /dev/null +++ b/doc/cli.md @@ -0,0 +1,18 @@ +--- +title: Notes on command line parsing +author: Gustav Eek +date: 2 feb 2023 +--- + + + +Rank N' Auto uses [Clap](https://lib.rs/crates/clap) for command line +configuration and the declarative style. + +Clap supports three styles for specification (1) *derived*, +declaratively with a struct and some attributes, (2) *builder*, +several arguments using usage strings, and (3) as a YAML +*configuration file*.x diff --git a/doc/dependencies.md b/doc/dependencies.md index 00c7adf..70d4844 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -14,7 +14,7 @@ versions of Rust. Also, though the immediate list is short, dependencies stretch. My apologies. I regret that the general Rust configuration is immature. It is -careless from a community perspective not to put more effort into +careless from a community perspective, not to put more effort into ensuring that versions distributed through e.g. Debian work in the majority of cases.