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
$ ./target/release/registry-backup --help
registry-backup 0.2.4
registry-backup 0.3.0
Jonathan Strong <jstrong@shipyard.rs>
Download all .crate files from a registry server
@ -47,36 +47,49 @@ USAGE:
registry-backup [OPTIONS]
OPTIONS:
--index-url <INDEX_URL>
--index-url <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>
--index-path <PATH>
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]
-u, --user-agent <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_PER_SECOND>
Requests to registry server will not exceed this rate [default: 25]
-U, --user-agent <USER_AGENT>
Value of user-agent HTTP header [default: registry-backup/v0.3.0]
--max-concurrent-requests <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 <INT>
Requests to registry server will not exceed this rate [default: 100]
-a, --auth-token <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 <INT>
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 <CONFIG_FILE>
-c, --config-file <PATH>
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 <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
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:

10
doc/cli-menu.txt

@ -21,6 +21,11 @@ OPTIONS:
-o, --output-path <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 <USER_AGENT>
Value of user-agent HTTP header [default: registry-backup/v0.3.0]
@ -39,11 +44,6 @@ OPTIONS:
--filter-crates <REGEX>
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

Loading…
Cancel
Save