From 7b5236909a8793501f315a206a6416add5ab70e4 Mon Sep 17 00:00:00 2001 From: Matteo Paonessa Date: Sun, 2 Mar 2025 19:44:46 +0100 Subject: [PATCH] Update README.md --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a835ee5..9f85a82 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,77 @@ # 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) +----------------------- + [![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 +**caesiumclt** is a command line tool for image compression written in Rust, supporting lossy, lossless, and maximum +size compression. +Based on [libcaesium](https://github.com/Lymphatus/libcaesium). +

+ demo +

-## Development +## Table of Contents -### Requirements +- [Features](#features) +- [Getting Started](#getting-started) + - [Binaries](#binaries) + - [Installation from Source](#installation-from-source) +- [Usage](#usage) + - [Examples](#examples) +- [Development](#development) + - [Requirements](#requirements) + - [Build](#build) -* [Rust](https://www.rust-lang.org/tools/install) >= 1.79.0 +## Features -### Build +- Quality-based lossy compression +- Lossless compression - the very same image is returned +- Maximum size compression - the image is compressed to a specific size +- Resize images +- Convert to different formats +- EXIF metadata preservation +- Recursive directory compression +- Folder structure preservation +- File timestamp preservation +- Custom suffix for output files +- Fast and customizable multithreaded processing -`cargo build --release` +### Supported formats + +| Format | Lossy | Lossless | +|----------|-------|----------| +| **JPEG** | ✅ | ✅ | +| **PNG** | ✅ | ✅ | +| **WebP** | ✅ | ✅ | +| **TIFF** | ❌ | ✅ | + +## Getting started + +### Binaries + +You can download the latest binaries from the [releases page](https://github.com/Lymphatus/caesium-clt/releases). +Supported platforms are: + +- Windows (x86_64) +- macOS (x86_64/aarch64) +- Linux (x86_64/aarch64) + +### Installation from source + +If you have Rust installed, you can install the tool using Cargo: + +```bash +cargo install --git https://github.com/Lymphatus/caesium-clt caesiumclt +``` + +If you instead want to build the tool refer to the [Development](#development) section. ## Usage -See full usage docs [here](docs/USAGE.md). +For a full list of all flags and options refer to the [full docs](docs/USAGE.md). ### Examples @@ -36,10 +89,10 @@ $ caesiumclt -q 80 -o ~/output/ ~/image.jpg ``` Losslessly compress ```image1.jpg```, located in the ```home``` directory, into a folder called ```output``` and keeps -EXIF metadata +EXIF metadata and original file date information ``` -$ caesiumclt --lossless -e -o ~/output/ ~/image.jpg +$ caesiumclt --lossless -e --keep-dates -o ~/output/ ~/image.jpg ``` Losslessly compress ```Pictures``` folder and subfolders, located in the ```home``` directory, into a folder called @@ -55,3 +108,14 @@ Losslessly compress ```Pictures``` folder and subfolders, located in the ```home ``` $ caesiumclt --lossless -RS -o ~/output/ ~/Pictures ``` + +## Development + +### Requirements + +* [Rust](https://www.rust-lang.org/tools/install) >= 1.79.0 + +### Build + +`cargo build` +