From 51824f0ba62fa700bfe6755e752ead0238c90c64 Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Fri, 9 Sep 2022 01:50:07 -0400 Subject: [PATCH] re-generate docs --- README.md | 61 ++++++++++++++++++++++++++++++------------------ doc/cli-menu.txt | 10 ++++---- 2 files changed, 43 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 66a88e8..82dee9c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ $ cargo install registry-backup --git https://git.shipyard.rs/jstrong/registry-b ```console $ ./target/release/registry-backup --help -registry-backup 0.2.4 +registry-backup 0.3.0 Jonathan Strong Download all .crate files from a registry server @@ -47,36 +47,49 @@ USAGE: registry-backup [OPTIONS] OPTIONS: - --index-url + --index-url URL of the registry index we are downloading .crate files from. The program expects that it will be able to clone the index to a local temporary directory; the user must handle authentication if needed - --index-path + --index-path instead of an index url, just point to a local path where the index is already cloned - -p, --output-path + -a, --auth-token + If registry requires authorization (i.e. "auth-required" key is set to `true` in the + `config.json` file), the token to include using the Authorization HTTP header + + -o, --output-path Directory where downloaded .crate files will be saved to [default: output] - -u, --user-agent - Value of user-agent HTTP header [default: registry-backup/v0.2.4] + --overwrite-existing + Download files when if .crate file already exists in output dir for a given crate + version, and overwrite the existing file with the new one. Default behavior is to skip + downloading if .crate file already exists - --requests-per-second - Requests to registry server will not exceed this rate [default: 25] + -U, --user-agent + Value of user-agent HTTP header [default: registry-backup/v0.3.0] - --max-concurrent-requests - Independent of the requests per second rate limit, no more than - `max_concurrent_requests` will be in flight at any given moment [default: 10] + -R, --requests-per-second + Requests to registry server will not exceed this rate [default: 100] - -a, --auth-token - If registry requires authorization (i.e. "auth-required" key is set to `true` in the - `config.json` file), the token to include using the Authorization HTTP header + -M, --max-concurrent-requests + Independent of the requests per second rate limit, no more than + `max_concurrent_requests` will be in flight at any given moment [default: 50] - -c, --config-file + -c, --config-file Specify configuration values using the provided TOML file, instead of via command line flags. The values in the config file will override any values passed as command line flags. See config.toml.sample for syntax of the config file + --filter-crates + Only crates with names that match --filter-crate regex will be downloaded + + --dry-run + Don't actually download the .crate files, just list files which would be downloaded. + Note: --requests-per-second and --max-concurrent-requests are still enforced even in + --dry-mode! + -h, --help Print help information @@ -90,22 +103,23 @@ OPTIONS: A toml configuration file may be used instead of command line flags. A sample file (`config.toml.sample`) is included. From the example file: ```toml -# index repo url -index-url = "ssh://git@ssh.shipyard.rs/shipyard-rs-public/crate-index.git" +dry-run = false +filter-crates = "^." +[registry] +index-url = "ssh://git@ssh.shipyard.rs/shipyard-rs-public/crate-index.git" # alternatively, specify a local dir # index-path = "/path/to/cloned/index" +auth-token = "xxx" [http] user-agent = "registry-backup/v0.1.0" -requests-per-second = 40 -max-concurrent-requests = 20 +requests-per-second = 100 +max-concurrent-requests = 50 [output] path = "output" -format = "/{crate}/{version}/download" - -# auth-token = "xxx" +overwrite-existing = false ``` @@ -140,6 +154,7 @@ Available recipes: debug-build +args='' # cargo build wrapper - builds registry-backup in debug mode generate-readme # generate updated README.md get-crate-version + install # cargo install registry-backup via git dep pre-release # check, run tests, check non-error output for clippy, run rustfmt release # release version (regenerate docs, git tag v0.0.0) release-build +args='' # cargo build --release wrapper - builds registry-backup in release mode @@ -159,7 +174,7 @@ The commands that mirror cargo commands (e.g. `just test`) are included for the This file is generated using a template (`doc/README.tera.md`) rendered using updated outputs of the CLI menu, config sample, and other values. -This version of `README.md` was generated at `Fri, 09 Sep 2022 03:23:59 +0000` based on git commit `c3506f9f`. +This version of `README.md` was generated at `Fri, 09 Sep 2022 05:50:07 +0000` based on git commit `b7621e78`. To (re-)generate the `README.md` file, use the justfile command: diff --git a/doc/cli-menu.txt b/doc/cli-menu.txt index 48d9e29..6f673b7 100644 --- a/doc/cli-menu.txt +++ b/doc/cli-menu.txt @@ -21,6 +21,11 @@ OPTIONS: -o, --output-path Directory where downloaded .crate files will be saved to [default: output] + --overwrite-existing + Download files when if .crate file already exists in output dir for a given crate + version, and overwrite the existing file with the new one. Default behavior is to skip + downloading if .crate file already exists + -U, --user-agent Value of user-agent HTTP header [default: registry-backup/v0.3.0] @@ -39,11 +44,6 @@ OPTIONS: --filter-crates Only crates with names that match --filter-crate regex will be downloaded - --overwrite-existing - Download files when if .crate file already exists in output dir for a given crate - version, and overwrite the existing file with the new one. Default behavior is to skip - downloading if .crate file already exists - --dry-run Don't actually download the .crate files, just list files which would be downloaded. Note: --requests-per-second and --max-concurrent-requests are still enforced even in