Browse Source

re-generate docs

master v0.3.0
Jonathan Strong 2 years ago
parent
commit
51824f0ba6
  1. 61
      README.md
  2. 10
      doc/cli-menu.txt

61
README.md

@ -39,7 +39,7 @@ $ cargo install registry-backup --git https://git.shipyard.rs/jstrong/registry-b
```console ```console
$ ./target/release/registry-backup --help $ ./target/release/registry-backup --help
registry-backup 0.2.4 registry-backup 0.3.0
Jonathan Strong <jstrong@shipyard.rs> Jonathan Strong <jstrong@shipyard.rs>
Download all .crate files from a registry server Download all .crate files from a registry server
@ -47,36 +47,49 @@ USAGE:
registry-backup [OPTIONS] registry-backup [OPTIONS]
OPTIONS: OPTIONS:
--index-url <INDEX_URL> --index-url <URL>
URL of the registry index we are downloading .crate files from. The program expects that 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 it will be able to clone the index to a local temporary directory; the user must handle
authentication if needed authentication if needed
--index-path <INDEX_PATH> --index-path <PATH>
instead of an index url, just point to a local path where the index is already cloned instead of an index url, just point to a local path where the index is already cloned
-p, --output-path <PATH> -a, --auth-token <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 <PATH>
Directory where downloaded .crate files will be saved to [default: output] Directory where downloaded .crate files will be saved to [default: output]
-u, --user-agent <USER_AGENT> --overwrite-existing
Value of user-agent HTTP header [default: registry-backup/v0.2.4] 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_PER_SECOND> -U, --user-agent <USER_AGENT>
Requests to registry server will not exceed this rate [default: 25] Value of user-agent HTTP header [default: registry-backup/v0.3.0]
--max-concurrent-requests <MAX_CONCURRENT_REQUESTS> -R, --requests-per-second <INT>
Independent of the requests per second rate limit, no more than Requests to registry server will not exceed this rate [default: 100]
`max_concurrent_requests` will be in flight at any given moment [default: 10]
-a, --auth-token <AUTH_TOKEN> -M, --max-concurrent-requests <INT>
If registry requires authorization (i.e. "auth-required" key is set to `true` in the Independent of the requests per second rate limit, no more than
`config.json` file), the token to include using the Authorization HTTP header `max_concurrent_requests` will be in flight at any given moment [default: 50]
-c, --config-file <CONFIG_FILE> -c, --config-file <PATH>
Specify configuration values using the provided TOML file, instead of via command line 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. 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 flags. See config.toml.sample for syntax of the config file
--filter-crates <REGEX>
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 -h, --help
Print help information 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: 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 ```toml
# index repo url dry-run = false
index-url = "ssh://git@ssh.shipyard.rs/shipyard-rs-public/crate-index.git" filter-crates = "^."
[registry]
index-url = "ssh://git@ssh.shipyard.rs/shipyard-rs-public/crate-index.git"
# alternatively, specify a local dir # alternatively, specify a local dir
# index-path = "/path/to/cloned/index" # index-path = "/path/to/cloned/index"
auth-token = "xxx"
[http] [http]
user-agent = "registry-backup/v0.1.0" user-agent = "registry-backup/v0.1.0"
requests-per-second = 40 requests-per-second = 100
max-concurrent-requests = 20 max-concurrent-requests = 50
[output] [output]
path = "output" path = "output"
format = "/{crate}/{version}/download" overwrite-existing = false
# auth-token = "xxx"
``` ```
@ -140,6 +154,7 @@ Available recipes:
debug-build +args='' # cargo build wrapper - builds registry-backup in debug mode debug-build +args='' # cargo build wrapper - builds registry-backup in debug mode
generate-readme # generate updated README.md generate-readme # generate updated README.md
get-crate-version get-crate-version
install # cargo install registry-backup via git dep
pre-release # check, run tests, check non-error output for clippy, run rustfmt pre-release # check, run tests, check non-error output for clippy, run rustfmt
release # release version (regenerate docs, git tag v0.0.0) release # release version (regenerate docs, git tag v0.0.0)
release-build +args='' # cargo build --release wrapper - builds registry-backup in release mode 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 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: To (re-)generate the `README.md` file, use the justfile command:

10
doc/cli-menu.txt

@ -21,6 +21,11 @@ OPTIONS:
-o, --output-path <PATH> -o, --output-path <PATH>
Directory where downloaded .crate files will be saved to [default: output] 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 <USER_AGENT> -U, --user-agent <USER_AGENT>
Value of user-agent HTTP header [default: registry-backup/v0.3.0] Value of user-agent HTTP header [default: registry-backup/v0.3.0]
@ -39,11 +44,6 @@ OPTIONS:
--filter-crates <REGEX> --filter-crates <REGEX>
Only crates with names that match --filter-crate regex will be downloaded 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 --dry-run
Don't actually download the .crate files, just list files which would be downloaded. 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 Note: --requests-per-second and --max-concurrent-requests are still enforced even in

Loading…
Cancel
Save