diff --git a/README.md b/README.md index c6edfb7..9e80eda 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,26 @@ -## Caesium Command Line Tools +# Caesium Command Line Tools [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/Lymphatus) -[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/Lymphatus) [![Test](https://github.com/Lymphatus/caesium-clt/workflows/Test/badge.svg)](https://github.com/Lymphatus/caesium-clt/actions?query=workflow%3ATest) [![Clippy](https://github.com/Lymphatus/caesium-clt/actions/workflows/clippy.yml/badge.svg)](https://github.com/Lymphatus/caesium-clt/actions/workflows/clippy.yml) [![Code formatting](https://github.com/Lymphatus/caesium-clt/actions/workflows/fmt.yml/badge.svg)](https://github.com/Lymphatus/caesium-clt/actions/workflows/fmt.yml) v1.0.0-beta.0 -### Development +## Development -#### Requirements +### Requirements * [Rust](https://www.rust-lang.org/tools/install) >= 1.79.0 -#### Build +### Build `cargo build --release` -### Usage +## Usage See full usage docs [here](docs/USAGE.md). -#### Examples +### Examples Losslessly compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output``` diff --git a/docs/USAGE.md b/docs/USAGE.md index db9c537..37d7e73 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -4,62 +4,62 @@ ##### Compression (at least one is required) -- -q, --quality +- `-q, --quality ` Sets compression quality between 0 and 100. Higher the value, better the quality and bigger the file size. -- --lossless +- `--lossless` Perform lossless compression. Some file formats may not support this or result in bigger file sizes. -- --max-size +- `--max-size ` Attempts to compress the image to the nearest size in bytes without exceeding it. If the requested size is too small, it will output the smallest possible result. ##### Advanced compression -- --png-opt-level +- `--png-opt-level ` Sets the optimization level for PNG files. Higher values result in better compression but take longer to complete. Possible values are between 0 and 6. Default is 3. -- --zopfli +- `--zopfli` Use zopfli when optimizing PNG files. It may take a very long time to complete, especially if the application is not build in release mode. ##### Metadata -- -e, --exif +- `-e, --exif` Keeps EXIF metadata info during compression, if present. This can slightly increase the output file size. -- --keep-dates +- `--keep-dates` Keeps the original last modified and last accessed date information, if possible. ##### Resizing -- --width +- `--width ` Sets the width of the output image. If height is not set, it will preserve the aspect ratio. Can't be used with `--long-edge` or `--short-edge`. -- --height +- `--height ` Sets the height of the output image. If width is not set, it will preserve the aspect ratio. Can't be used with `--long-edge` or `--short-edge`. -- --long-edge +- `--long-edge ` Sets the size of the longest edge of the image. It is aware of rotation metadata. Can't be used with `--width` or `--height` or `--short-edge`. -- --short-edge +- `--short-edge ` Sets the size of the shortest edge of the image. It is aware of rotation metadata. Can't be used with `--width` or `--height` or `--long-edge`. ##### Destination -- -o, --output +- `-o, --output ` Sets the output folder. If the folder does not exist, it will be created. Can't be used with `--same-folder-as-input`. -- --same-folder-as-input +- `--same-folder-as-input` Sets the output folder to be the same as the input folder. WARNING: this can potentially overwrite the original files if a suffix is not set. Overwritten files CANNOT be recovered. -- --suffix +- `--suffix ` Adds a suffix to the output filename, before the file extension. -- -S, --keep-structure +- `-S, --keep-structure` Preserves the folder tree structure of the input files. Can be used only with `-R`. -- -o, --overwrite +- `-o, --overwrite ` Sets the overwrite policy if the output file already exists. Possible values are: - `all`: Always overwrite - `never`: Never overwrite - `bigger`: Overwrite only if the file to be overwritten is bigger -- --format +- `--format ` Converts the original image to the selected format. Possible values are: - `jpeg` - `png` @@ -69,24 +69,24 @@ ##### Other -- -R, --recursive +- `-R, --recursive` If the input is a folder, scan its subfolders too. -- -d, --dry-run +- `-d, --dry-run` Do not write output files, only simulate the process. -- --threads +- `--threads ` Specify the number of parallel jobs. The maximum is the number of processors available. `0` means that the application will try to guess the maximum number of parallel jobs available. Default is `0`. -- -Q, --quiet +- `-Q, --quiet` Suppress all output. Overrides `--verbose`. -- --verbose +- `--verbose ` Select how much output you want to see. Possible values are: - `quiet`: Suppress all output - `progress`: Show only progress and final results - `warnings-and-errors`: Show also skipped and error messages - `all`: Print all -- -h, --help +- `-h, --help` Print help. A summary can be seen with `-h`. -- -V, --version +- `-V, --version` Print version. ### Full help