From d16fa711b897b49cf1c5e3446be6e5a02826b4d6 Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Sun, 3 Apr 2022 13:31:52 -0500 Subject: [PATCH] Update readme --- README.md | 189 ++++++++++++++++++++++-------------------------------- 1 file changed, 78 insertions(+), 111 deletions(-) diff --git a/README.md b/README.md index c45163a..e970c18 100644 --- a/README.md +++ b/README.md @@ -9,149 +9,116 @@ _a simple image hosting service_ ## Usage ### Running ``` -pict-rs +pict-rs 0.4.0-alpha.1 +asonix +A simple image hosting service USAGE: pict-rs [OPTIONS] OPTIONS: - -a, --addr - The address and port the server binds to. - - --api-key - An optional string to be checked on requests to privileged endpoints - -c, --config-file Path to the pict-rs configuration file + --console-address + Address and port to expose tokio-console metrics + --console-buffer-capacity - Specify the number of events the console subscriber is allowed to buffer - - -f, --filters - An optional list of filters to permit, supports 'identity', 'thumbnail', 'resize', - 'crop', and 'blur' - - --filesystem-storage-path - Path in which pict-rs will create it's 'files' directory + Capacity of the console-subscriber Event Buffer -h, --help Print help information - -i, --image-format - An optional image format to convert all uploaded files into, supports 'jpg', 'png', and - 'webp' + --log-format + Format of logs printed to stdout - -m, --max-file-size - Specify the maximum allowed uploaded file size (in Megabytes) + --log-targets + Log levels to print to stdout, respects RUST_LOG formatting - --max-image-area - Specify the maximum area in pixels allowed in an image + --old-db-path + Path to the old pict-rs sled database - --max-image-height - Specify the maximum width in pixels allowed on an image + --opentelemetry-service-name + Service Name to use for OpenTelemetry - --max-image-width - Specify the maximum width in pixels allowed on an image + --opentelemetry-targets + Log levels to use for OpenTelemetry, respects RUST_LOG formatting - -o, --opentelemetry-url - Enable OpenTelemetry Tracing exports to the given OpenTelemetry collector + --opentelemetry-url + URL to send OpenTelemetry metrics - --object-store-access-key - + --save-to + File to save the current configuration for reproducible runs - --object-store-bucket-name - Name of the bucket in which pict-rs will store images - - --object-store-region - Region in which the bucket exists, can be an http endpoint - - --object-store-secret-key - - - --object-store-security-token - - - --object-store-session-token - - - -p, --path - The path to the data directory, e.g. data/ - - -R, --repo - Set the database implementation. Available options are 'sled'. Default is 'sled' - - -s, --skip-validate-imports - Whether to skip validating images uploaded via the internal import API - - -S, --store - Set the image store. Available options are 'object-storage' or 'filesystem'. Default is - 'filesystem' - - --sled-cache-capacity - The number of bytes sled is allowed to use for it's in-memory cache - - --sled-path - Path in which pict-rs will create it's 'repo' directory + -V, --version + Print version information SUBCOMMANDS: - dump - help Print this message or the help of the given subcommand(s) - migrate-repo - migrate-store - run -``` - -``` -pict-rs-dump - -USAGE: - pict-rs dump - -ARGS: - - -OPTIONS: - -h, --help Print help information -``` - -``` -pict-rs-migrate-repo - -USAGE: - pict-rs migrate-repo - -ARGS: - - -OPTIONS: - -h, --help Print help information -``` - -``` -pict-rs-migrate-store - -USAGE: - pict-rs migrate-store - -ARGS: - - -OPTIONS: - -h, --help Print help information + filesystem Migrate from the provided filesystem storage + help Print this message or the help of the given subcommand(s) + object-storage Migrate from the provided object storage + run Runs the pict-rs web server ``` ``` pict-rs-run +Runs the pict-rs web server USAGE: - pict-rs run + pict-rs run [OPTIONS] [SUBCOMMAND] OPTIONS: - -h, --help Print help information + -a, --address
+ The address and port to bind the pict-rs web server + + --api-key + The API KEY required to access restricted routes + + -h, --help + Print help information + + --media-enable-silent-video + Whether to enable GIF and silent MP4 uploads. Full videos are unsupported + + --media-filters + Which media filters should be enabled on the `process` endpoint + + --media-format + Enforce uploaded media is transcoded to the provided format + + --media-max-area + The maximum area, in pixels, for uploaded media + + --media-max-file-size + The maximum size, in megabytes, for uploaded media + + --media-max-height + The maximum height, in pixels, for uploaded media + + --media-max-width + The maximum width, in pixels, for uploaded media + + --media-skip-validate-imports + Whether to validate media on the "import" endpoint + + --worker-id + + +SUBCOMMANDS: + filesystem Run pict-rs with filesystem storage + help Print this message or the help of the given subcommand(s) + object-storage Run pict-rs with object storage ``` -See [`pict-rs.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml) and -[`migrate.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/migrate.toml) for more +Try running `help` commands for more runtime configuration options +``` +$ pict-rs run filesystem -h +$ pict-rs run object-storage -h +$ pict-rs run filesystem sled -h +$ pict-rs run object-storage sled -h +``` + +See [`pict-rs.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml) for more configuration #### Example: