Don't commit man pages

Don't commit man pages, since that bloats commits.

Attempt to build them in `bin/package`. This is fraught, since we need
`help2man`. Hopefully this works!

type: development
This commit is contained in:
Casey Rodarmor 2020-04-21 00:45:28 -07:00
parent 4d67d3a10d
commit c22df5a083
No known key found for this signature in database
GPG Key ID: 556186B153EC6FE0
12 changed files with 19 additions and 393 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@
/book/src/references
/book/src/references.md
/completions
/man
/target
/wiki
/www/book

View File

@ -4,7 +4,8 @@ Changelog
UNRELEASED - 2020-04-21
-----------------------
- :wrench: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Don't commit the book - _Casey Rodarmor <casey@rodarmor.com>_
- :wrench: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Don't commit man pages - _Casey Rodarmor <casey@rodarmor.com>_
- :wrench: [`4d67d3a10d17`](https://github.com/casey/intermodal/commit/4d67d3a10d17db3c63af092a936eb5994ee107b1) Don't commit the book - _Casey Rodarmor <casey@rodarmor.com>_
- :wrench: [`28114c3d64dd`](https://github.com/casey/intermodal/commit/28114c3d64dde5e0275c936b0019eaf4760ba559) Don't commit shell completion scripts - _Casey Rodarmor <casey@rodarmor.com>_
- :art: [`4f4464e3a2a7`](https://github.com/casey/intermodal/commit/4f4464e3a2a7f4aaffea8dbe38dd110ad9be4393) Get `st_flags` from `MetadataExt` on MacOS - _Casey Rodarmor <casey@rodarmor.com>_
- :sparkles: [`deca555ac3b3`](https://github.com/casey/intermodal/commit/deca555ac3b3b8f665ee6415f80e05b2bb5e4af7) Allow suppressing output with `--quiet` - Fixes [#174](https://github.com/casey/intermodal/issues/174) - _Celeo <celeodor@gmail.com>_

View File

@ -15,9 +15,17 @@ test -f Cargo.lock || cargo generate-lockfile
echo "Building $bin..."
if [ "$os" = "ubuntu-latest" ]; then
sudo apt-get install musl-tools
fi
case $os in
ubuntu-latest)
sudo apt-get help2man install musl-tools
;;
macos-latest)
brew install help2man
;;
windows-latest)
choco install gnuwin
;;
esac
case $os in
ubuntu-latest | macos-latest)
@ -35,6 +43,11 @@ rm -rf completions
mkdir completions
$executable completions --dir completions
echo "Building man pages..."
rm -rf man
mkdir man
cargo run --package gen man
echo "Copying release files..."
mkdir dist
cp -r \

View File

@ -1,23 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-COMPLETIONS "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ completions\fR
- Print shell completion scripts to standard output.
.SH "SYNOPSIS:"
.IP
imdl completions [OPTIONS] \fB\-\-shell\fR <SHELL>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-d\fR, \fB\-\-dir\fR <DIR>
Write completion script to `DIR` with an appropriate filename. If `\-\-shell` is not given,
write all completion scripts.
.TP
\fB\-s\fR, \fB\-\-shell\fR <SHELL>
Print completion script for `SHELL`. [possible values: zsh, bash, fish, powershell, elvish]

View File

@ -1,161 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-CREATE "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ create\fR
- Create a .torrent file.
.SH "SYNOPSIS:"
.IP
imdl torrent create [FLAGS] [OPTIONS] \fB\-\-input\fR <PATH>
.SH "FLAGS:"
.TP
\fB\-n\fR, \fB\-\-dry\-run\fR
Skip writing `.torrent` file to disk.
.TP
\fB\-F\fR, \fB\-\-follow\-symlinks\fR
Follow symlinks in torrent input. By default, symlinks to files and directories are not
included in torrent contents.
.TP
\fB\-f\fR, \fB\-\-force\fR
Overwrite the destination `.torrent` file, if it exists.
.TP
\fB\-\-help\fR
Print help message.
.TP
\fB\-\-ignore\fR
Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config \fB\-\-get\fR
core.excludesFile`.
.TP
\fB\-h\fR, \fB\-\-include\-hidden\fR
Include hidden files that would otherwise be skipped, such as files that start with a `.`,
and files hidden by file attributes on macOS and Windows.
.TP
\fB\-j\fR, \fB\-\-include\-junk\fR
Include junk files that would otherwise be skipped.
.TP
\fB\-M\fR, \fB\-\-md5\fR
Include MD5 checksum of each file in the torrent. N.B. MD5 is cryptographically broken and
only suitable for checking for accidental corruption.
.TP
\fB\-\-no\-created\-by\fR
Do not populate `created by` key of generated torrent with imdl version information.
.TP
\fB\-\-no\-creation\-date\fR
Do not populate `creation date` key of generated torrent with current time.
.TP
\fB\-O\fR, \fB\-\-open\fR
Open `.torrent` file after creation. Uses `xdg\-open`, `gnome\-open`, or `kde\-open` on
Linux; `open` on macOS; and `cmd \fI\,/C\/\fP start` on Windows
.TP
\fB\-\-link\fR
Print created torrent `magnet:` URL to standard output
.TP
\fB\-P\fR, \fB\-\-private\fR
Set the `private` flag. Torrent clients that understand the flag and participate in the
swarm of a torrent with the flag set will only announce themselves to the announce URLs
included in the torrent, and will not use other peer discovery mechanisms, such as the DHT
or local peer discovery. See BEP 27: Private Torrents for more information.
.TP
\fB\-S\fR, \fB\-\-show\fR
Display information about created torrent file.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-A\fR, \fB\-\-allow\fR <LINT>...
Allow `LINT`. Lints check for conditions which, although permitted, are not
usually desirable. For example, piece length can be any non\-zero value, but
probably shouldn't be below 16 KiB. The lint `small\-piece\-size` checks for
this, and `\-\-allow small\-piece\-size` can be used to disable this check.
[possible values: private\-trackerless, small\-piece\-length, uneven\-piece\-length]
.TP
\fB\-a\fR, \fB\-\-announce\fR <URL>
Use `URL` as the primary tracker announce URL. To supply multiple announce
URLs, also use `\-\-announce\-tier`.
.TP
\fB\-t\fR, \fB\-\-announce\-tier\fR <URL\-LIST>...
Use `URL\-LIST` as a tracker announce tier. Each instance adds a new tier. To
add multiple trackers to a given tier, separate their announce URLs with
commas:
.TP
`\-\-announce\-tier
udp://example.com:80/announce,https://example.net:443/announce`
.TP
Announce tiers are stored in the `announce\-list` key of the top\-level metainfo
dictionary as a list of lists of strings, as defined by BEP 12: Multitracker
Metadata Extension.
.TP
Note: Many BitTorrent clients do not implement the behavior described in BEP
12. See the discussion here for more details:
https://github.com/bittorrent/bittorrent.org/issues/82
.TP
\fB\-c\fR, \fB\-\-comment\fR <TEXT>
Include `TEXT` as the comment for generated `.torrent` file. Stored under
`comment` key of top\-level metainfo dictionary.
.TP
\fB\-\-node\fR <NODE>...
Add DHT bootstrap node `NODE` to torrent. `NODE` should be in the form
`HOST:PORT`, where `HOST` is a domain name, an IPv4 address, or an IPv6 address
surrounded by brackets. May be given more than once to add multiple bootstrap
nodes.
.IP
Examples:
.IP
\fB\-\-node\fR router.example.com:1337
.IP
\fB\-\-node\fR 203.0.113.0:2290
.IP
\fB\-\-node\fR [2001:db8:4275:7920:6269:7463:6f69:6e21]:8832
.TP
\fB\-g\fR, \fB\-\-glob\fR <GLOB>...
Include or exclude files that match `GLOB`. Multiple glob may be provided, with
the last one taking precedence. Precede a glob with `!` to exclude it.
.TP
\fB\-i\fR, \fB\-\-input\fR <PATH>
Read torrent contents from `PATH`. If `PATH` is a file, torrent will be a
single\-file torrent. If `PATH` is a directory, torrent will be a multi\-file
torrent. If `PATH` is `\-`, read from standard input. Piece length defaults to
256KiB when reading from standard input if `\-\-piece\-length` is not given.
.TP
\fB\-N\fR, \fB\-\-name\fR <TEXT>
Set name of torrent to `TEXT`. Defaults to the filename of the argument to
`\-\-input`. Required when `\-\-input \-`.
.TP
\fB\-o\fR, \fB\-\-output\fR <TARGET>
Save `.torrent` file to `TARGET`, or print to standard output if `TARGET` is
`\-`. Defaults to the argument to `\-\-input` with an `.torrent` extension
appended. Required when `\-\-input \-`.
.TP
\fB\-\-peer\fR <PEER>...
Add `PEER` to magnet link.
.TP
\fB\-p\fR, \fB\-\-piece\-length\fR <BYTES>
Set piece length to `BYTES`. Accepts SI units, e.g. kib, mib, and gib.
.TP
\fB\-\-sort\-by\fR <SPEC>...
Set the order of files within a torrent. `SPEC` should be of the form
`KEY:ORDER`, with `KEY` being one of `path` or `size`, and `ORDER` being
`ascending` or `descending`. `:ORDER` defaults to `ascending` if omitted. The
`\-\-sort\-by` flag may be given more than once, with later values being used to
break ties. Ties that remain are broken in ascending path order.
.IP
Sort in ascending order by path, the default:
.IP
\fB\-\-sort\-by\fR path:ascending
.IP
Sort in ascending order by path, more concisely:
.IP
\fB\-\-sort\-by\fR path
.IP
Sort in ascending order by size, break ties in descending path order:
.IP
\fB\-\-sort\-by\fR size:ascending \fB\-\-sort\-by\fR path:descending
.TP
\fB\-s\fR, \fB\-\-source\fR <TEXT>
Set torrent source to `TEXT`. Stored under `source` key of info dictionary.
This is useful for keeping statistics from being mis\-reported when
participating in swarms with the same contents, but with different trackers.
When source is set to a unique value for torrents with the same contents,
torrent clients will treat them as distinct torrents, and not share peers
between them, and will correctly report download and upload statistics to
multiple trackers.

View File

@ -1,31 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-LINK "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ link\fR
- Generate a magnet link from a .torrent file.
.SH "SYNOPSIS:"
.IP
imdl torrent link [FLAGS] [OPTIONS] \fB\-\-input\fR <METAINFO>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-O\fR, \fB\-\-open\fR
Open generated magnet link. Uses `xdg\-open`, `gnome\-open`, or `kde\-open` on Linux; `open` on macOS;
and `cmd \fI\,/C\/\fP start` on Windows.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-s\fR, \fB\-\-select\-only\fR <INDICES>...
Select files to download. Values are indices into the `info.files` list, e.g.
`\-\-select\-only 1,2,3`.
.TP
\fB\-i\fR, \fB\-\-input\fR <METAINFO>
Generate magnet link from metainfo at `PATH`. If `PATH` is `\-`, read metainfo from
standard input.
.TP
\fB\-p\fR, \fB\-\-peer\fR <PEER>...
Add `PEER` to magnet link.

View File

@ -1,15 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-PIECE-LENGTH "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ piece-length\fR
- Display information about automatic piece length selection.
.SH "SYNOPSIS:"
.IP
imdl torrent piece\-length
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.

View File

@ -1,20 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-SHOW "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ show\fR
- Display information about a .torrent file.
.SH "SYNOPSIS:"
.IP
imdl torrent show \fB\-\-input\fR <PATH>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-i\fR, \fB\-\-input\fR <PATH>
Show information about torrent at `PATH`. If `Path` is `\-`, read torrent metainfo from
standard input.

View File

@ -1,34 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-STATS "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ stats\fR
- Show statistics about a collection of .torrent files.
.SH "SYNOPSIS:"
.IP
imdl torrent stats [FLAGS] [OPTIONS] \fB\-\-input\fR <PATH>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-p\fR, \fB\-\-print\fR
Pretty print the contents of each torrent as it is processed.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-e\fR, \fB\-\-extract\-pattern\fR <REGEX>...
Extract and display values under key paths that match `REGEX`. Subkeys of a
bencodeded dictionary are delimited by `/`, and values of a bencoded list are
delmited by `*`. For example, given the following bencoded dictionary `{"foo":
[{"bar": {"baz": 2}}]}`, the value `2`'s key path will be `foo*bar/baz`. The
value `2` would be displayed if any of `bar`, `foo[*]bar/baz`, or `foo.*baz`
were passed to `\-\-extract\-pattern.
.TP
\fB\-i\fR, \fB\-\-input\fR <PATH>
Search `PATH` for torrents. May be a directory or a single torrent file.
.TP
\fB\-l\fR, \fB\-\-limit\fR <N>
Stop after processing `N` torrents. Useful when processing large collections of
`.torrent` files.

View File

@ -1,24 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT-VERIFY "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\ verify\fR
- Verify files against a .torrent file.
.SH "SYNOPSIS:"
.IP
imdl torrent verify [OPTIONS] \fB\-\-input\fR <METAINFO>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "OPTIONS:"
.TP
\fB\-c\fR, \fB\-\-content\fR <PATH>
Verify torrent content at `PATH` against torrent metainfo. Defaults to `name` field of
torrent info dictionary.
.TP
\fB\-i\fR, \fB\-\-input\fR <METAINFO>
Verify torrent contents against torrent metainfo in `METAINFO`. If `METAINFO` is `\-`, read
metainfo from standard input.

View File

@ -1,37 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH IMDL-TORRENT "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\ torrent\fR
- Subcommands related to the BitTorrent protocol.
.SH "SYNOPSIS:"
.IP
imdl torrent <SUBCOMMAND>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version number.
.SH "SUBCOMMANDS:"
.TP
create
Create a .torrent file.
.TP
help
Prints this message or the help of the given subcommand(s)
.TP
link
Generate a magnet link from a .torrent file.
.TP
piece\-length
Display information about automatic piece length selection.
.TP
show
Display information about a .torrent file.
.TP
stats
Show statistics about a collection of .torrent files.
.TP
verify
Verify files against a .torrent file.

View File

@ -1,44 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH \FBIMDL\FR "1" "April 2020" "Intermodal v0.1.6" "Intermodal Manual"
.SH NAME
\fBimdl\fR
- A 40' shipping container for the Internet
.SH "SYNOPSIS:"
.IP
imdl [FLAGS] [OPTIONS] <SUBCOMMAND>
.SH "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help message.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress normal output.
.TP
\fB\-t\fR, \fB\-\-terminal\fR
Disable automatic terminal detection and behave as if both standard output and standard error are
connected to a terminal.
.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.
.SH "OPTIONS:"
.TP
\fB\-c\fR, \fB\-\-color\fR <WHEN>
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]
.SH "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.