caesium-clt/README.md

75 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2016-12-28 16:33:45 +01:00
## Caesium CommandLineTools
2024-05-18 14:48:42 +02:00
###### caesium-clt - v0.19.3
###### REQUIREMENTS
2022-12-20 13:38:05 +01:00
* [Rust](https://www.rust-lang.org/tools/install)
----------
###### TESTED PLATFORMS
2024-05-18 14:18:58 +02:00
* macOS Sonoma (v14)
2022-10-02 11:51:50 +02:00
* Ubuntu 22.04
2024-05-18 14:18:58 +02:00
* Windows 11
----------
2017-03-10 11:46:41 +01:00
###### COMPILATION
2022-12-20 13:38:05 +01:00
`cargo build --release`
2018-01-01 17:38:55 +01:00
----------
###### COMMAND LINE ARGUMENTS
- `-q, --quality [value]` {Required}
2021-10-24 11:53:42 +02:00
Sets the quality of the image. The higher the value is, better the result will be. Note that a value of 0 will mean
_lossless_ compression, which will not modify the original image, but will compress less. Allowed range is [0. 100].
A common value for lossy compression is 80.
2018-01-01 17:38:55 +01:00
- `-e, --exif`
2021-10-24 11:53:42 +02:00
Keeps the JPEG metadata information during compression. File size will be slightly higher.
2018-01-01 17:38:55 +01:00
- `-o, --output [value]` {Required}
2021-10-24 11:53:42 +02:00
Path to the output folder where the compressed files will be stored. Can be the same input folder, which will overwrite the original files.
2018-01-01 17:38:55 +01:00
- `-R, --recursive`
2021-10-24 11:53:42 +02:00
If the input is a folder, caesiumclt will also scan every subfolder searching for images.
Note that this may end up building a large set of files to be compressed and should be used carefully.
2018-01-01 17:38:55 +01:00
- `-S, --keep-structure`
2021-10-24 11:53:42 +02:00
If the input is a folder, and the `-R` option is set, caesiumclt will compress all the files keeping the original folder structure.
2019-10-13 14:43:13 +02:00
- `-O, --overwrite`
2022-12-20 13:38:05 +01:00
Sets overwrite policy: `all` will overwrite any existing file, `prompt` will ask each time before overwriting, `bigger` will overwrite bigger files only, and `none` will silently skip existing files.
2018-01-01 17:38:55 +01:00
- `-d, --dry-run`
2021-10-24 11:53:42 +02:00
If this option is set, no files will be compressed, but the entire process will just be simulated.
Useful for checking if all the files will be correctly handled.
2019-11-02 15:00:01 +01:00
- `-Q, --quiet`
2021-10-24 11:53:42 +02:00
Suppress all output. Output from the libcaesium library will still be outputted.
2018-01-01 17:38:55 +01:00
- `-h, --help`
2021-10-24 11:53:42 +02:00
Displays a summary of the command line arguments, much like this one you're reading.
2018-01-01 17:38:55 +01:00
- `-v, --version`
2021-10-24 11:53:42 +02:00
Prints the current caesiumclt version.
2018-01-01 17:38:55 +01:00
----------
2015-09-22 16:03:17 +02:00
###### USAGE EXAMPLES
2016-01-22 10:36:40 +01:00
Losslessly compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output```
2015-09-22 16:03:17 +02:00
```
2016-12-17 00:46:46 +01:00
$ caesiumclt -q 0 -o ~/output/ ~/image.jpg
2015-09-22 16:03:17 +02:00
```
2016-01-22 10:36:40 +01:00
Compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output``` with lossy compression and quality set to 80
2015-09-22 16:03:17 +02:00
```
$ caesiumclt -q 80 -o ~/output/ ~/image.jpg
```
2016-01-22 10:36:40 +01:00
Losslessly compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output``` and keeps EXIF metadata
2015-09-22 16:03:17 +02:00
```
2016-12-17 00:46:46 +01:00
$ caesiumclt -q 0 -e -o ~/output/ ~/image.jpg
2015-09-22 16:03:17 +02:00
```
Losslessly compress ```Pictures``` folder and subfolders, located in the ```home``` directory, into a folder called ```output```
```
2016-12-17 00:46:46 +01:00
$ caesiumclt -q 0 -R -o ~/output/ ~/Pictures
2015-09-22 16:03:17 +02:00
```
2017-03-10 11:46:41 +01:00
Losslessly compress ```Pictures``` folder and subfolders, located in the ```home``` directory, into a folder called ```output``` retaining the input folder structure
```
2017-03-13 10:13:03 +01:00
$ caesiumclt -q 0 -RS -o ~/output/ ~/Pictures
2017-03-10 11:46:41 +01:00
```