From 3131b0d56c7f472916d3a5e34402f94adddbf4d0 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 27 Mar 2020 23:13:36 -0700 Subject: [PATCH] Generate man page with from `--help` with `help2man` type: documentation --- bin/package | 1 + justfile | 15 ++++++++++++++- man/imdl.1 | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 man/imdl.1 diff --git a/bin/package b/bin/package index 8066f4e..67a6f85 100755 --- a/bin/package +++ b/bin/package @@ -41,6 +41,7 @@ cp -r \ LICENSE \ README.md \ completions \ + man \ $dist cd $dist diff --git a/justfile b/justfile index 3209f01..fa902c1 100644 --- a/justfile +++ b/justfile @@ -66,6 +66,19 @@ update-toc: generate-completions: ./bin/generate-completions +man: + cargo build + help2man \ + --name 'BitTorrent metainfo utility' \ + --manual 'IMDL MANUAL' \ + --no-info \ + target/debug/imdl \ + > man/imdl.1 + sd '📦 ' "\n" man/imdl.1 + +check-man: man + git diff --no-ext-diff --quiet --exit-code + check-minimal-versions: ./bin/check-minimal-versions @@ -78,7 +91,7 @@ check: test clippy lint check-minimal-versions pr: push hub pull-request -o -publish-check: check +publish-check: check check-man cargo outdated --exit-code 1 git branch | grep '* master' grep {{version}} CHANGELOG.md diff --git a/man/imdl.1 b/man/imdl.1 new file mode 100644 index 0000000..df76415 --- /dev/null +++ b/man/imdl.1 @@ -0,0 +1,43 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11. +.TH IMDL "1" "March 2020" "imdl v0.1.0" "IMDL MANUAL" +.SH NAME +imdl \- BitTorrent metainfo utility +.SH DESCRIPTION +imdl v0.1.0 +Casey Rodarmor + +A 40' shipping container for the internet \- https://github.com/casey/intermodal +.SS "USAGE:" +.IP +imdl [FLAGS] [OPTIONS] +.SS "FLAGS:" +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help message. +.TP +\fB\-u\fR, \fB\-\-unstable\fR +Enable unstable features. To avoid premature stabilization and excessive +version churn, unstable features are unavailable unless this flag is set. +Unstable features are not bound by semantic versioning stability guarantees, +and may be changed or removed at any time. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version number. +.SS "OPTIONS:" +.TP +\fB\-\-color\fR +Print colorful output according to `WHEN`. When `auto`, the default, +colored output is only enabled if imdl detects that it is connected to a +terminal, the `NO_COLOR` environment variable is not set, and the `TERM` +environment variable is not set to `dumb`. [default: auto] [possible +values: auto, always, never] +.SS "SUBCOMMANDS:" +.TP +completions +Print shell completion scripts to standard output. +.TP +help +Prints this message or the help of the given subcommand(s) +.TP +torrent +Subcommands related to the BitTorrent protocol.