caesium-clt/README.md

112 lines
4.3 KiB
Markdown
Raw Normal View History

2016-12-28 16:33:45 +01:00
## Caesium CommandLineTools
2019-09-28 20:02:33 +02:00
##### caesium-clt - v0.13.0-beta (build 20190928) - Copyright © Matteo Paonessa, 2018. All Rights Reserved.
2017-03-10 19:14:08 +01:00
[![Build Status](https://travis-ci.org/Lymphatus/caesium-clt.svg?branch=master)](https://travis-ci.org/Lymphatus/caesium-clt)
----------
###### REQUIREMENTS
2017-03-07 10:30:48 +01:00
* [libcaesium](https://github.com/Lymphatus/libcaesium)
2016-12-28 16:33:45 +01:00
###### Included libraries
* [optparse](https://github.com/skeeto/optparse)
* [tinydir](https://github.com/cxong/tinydir)
----------
###### TESTED PLATFORMS
2019-09-28 20:02:33 +02:00
* Mac OS X Mojave (v10.14.4)
* Ubuntu 19.04
2017-03-07 10:30:48 +01:00
* Windows 10
----------
2017-03-10 11:46:41 +01:00
###### COMPILATION
2017-03-21 17:23:51 +01:00
See INSTALL.md for more details.
2018-01-01 17:38:55 +01:00
----------
###### COMMAND LINE ARGUMENTS
- `-q, --quality [value]` {Required}
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.
- `-e, --exif`
Keeps the JPEG metadata information during compression. File size will be slightly higher.
- `-o, --output [value]` {Required}
Path to the output folder where the compressed files will be stored. Can be the same input folder, which will overwrite the original files.
- `-s, --scale [value]`
Will scale the image to a factor of _[value]_. Allowed formats are decimal values, fractions and percentages.
The factor must be a number > 0 and <= 1.0, as caesiumclt won't upscale any image.
_This is an experimental feature and might not work as expected._
- `-R, --recursive`
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.
- `-S, --keep-structure`
If the input is a folder, and the `-R` option is set, caesiumclt will compress all the files keeping the original folder structure.
- `-d, --dry-run`
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.
- `-h, --help`
Displays a summary of the command line arguments, much like this one you're reading.
- `-v, --version`
Prints the current caesiumclt version.
----------
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
```
2018-01-01 17:17:33 +01:00
Compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output``` with lossy compression, quality set to 80 and resize it to half
```
$ caesiumclt -q 80 -s 0.5 -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
```
2015-09-22 16:03:17 +02:00
----------
###### TODO
* Code cleaning
2017-03-10 11:46:41 +01:00
* Deeper error handling
----------
###### CHANGELOG
2019-09-28 20:02:33 +02:00
* 0.13.0-beta - Bugfix
2018-08-12 19:15:00 +02:00
* 0.12.1-beta - Bugfix
2018-01-01 17:17:33 +01:00
* 0.12.0-beta - Resizing (experimental)
2017-12-29 23:18:20 +01:00
* 0.11.0-beta - Fixing paths issues and dry-run option
2017-03-21 17:23:51 +01:00
* 0.10.2-beta - Bugfixes & full Windows support
2017-03-10 11:46:41 +01:00
* 0.10.1-beta - All features are available
2017-03-07 10:30:48 +01:00
* 0.10.0-beta - Switched to cmake build system and libcaesium
2015-09-21 21:06:57 +02:00
* 0.9.1-beta - Initial development stage
----------
###### RESOURCES
2016-12-28 16:33:45 +01:00
* caesium-clt website - [http://saerasoft.com/caesium/clt](http://saerasoft.com/caesium/clt)
2015-05-13 11:06:26 +02:00
* Caesium website - [http://saerasoft.com/caesium](http://saerasoft.com/caesium)
2018-01-01 17:17:33 +01:00
* caesium-clt Git Repository - [https://github.com/Lymphatus/caesium-clt](https://github.com/Lymphatus/caesium-clt)
* Author website - SaeraSoft - [http://saerasoft.com](http://saerasoft.com)