diff --git a/README.md b/README.md index cea0c4c..da939fe 100644 --- a/README.md +++ b/README.md @@ -2,124 +2,97 @@ [![crates.io](https://img.shields.io/crates/v/ouch.svg?style=for-the-badge&logo=rust)](https://crates.io/crates/ouch) [![license](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge&logo=Open-Source-Initiative&logoColor=ffffff)](https://github.com/ouch-org/ouch/blob/main/LICENSE) - - -`ouch` stands for **Obvious Unified Compression Helper**, and works on _Linux_, _Mac OS_ and _Windows_. - -It is a CLI tool to compress and decompress files that aims on ease of usage. - - - +`ouch` stands for **Obvious Unified Compression Helper**, it's a CLI tool to compress and decompress files. +- [Features](#features) - [Usage](#usage) - - [Decompressing](#decompressing) - - [Compressing](#compressing) - [Installation](#installation) - - [Latest binary](#downloading-the-latest-binary) - - [Compiling from source](#installing-from-source-code) - [Supported Formats](#supported-formats) - [Contributing](#contributing) +## Features + +1. Easy to use. +2. Automatic format detection. +3. Same syntax, various formats. +4. Encoding and decoding streams, it's fast. + ## Usage ### Decompressing -Run `ouch` and pass compressed files as arguments. +Use the `decompress` subcommand and pass the files. ```sh -# Decompress 'a.zip' +# Decompress one ouch decompress a.zip -# Also works with the short version -ouch d a.zip +# Decompress multiple +ouch decompress a.zip b.tar.gz c.tar -# Decompress multiple files -ouch decompress a.zip b.tar.gz +# Short alternative +ouch d a.zip ``` -You can redirect the decompression results to a folder with the `-o/--output` flag. +You can redirect the decompression results to another folder with the `-o/--output` flag. ```sh -# Create 'pictures' folder and decompress inside of it -ouch decompress a.zip -o pictures +# Decompress 'summer_vacation.zip' inside of new folder 'pictures' +ouch decompress summer_vacation.zip -o pictures ``` ### Compressing -Use the `compress` subcommand. - -Accepts multiple files and folders, the **last** argument shall be the **output file**. +Use the `compress` subcommand, pass the files and the **output file** at the end. ```sh -# Compress four files into 'archive.zip' +# Compress four files/folders ouch compress 1 2 3 4 archive.zip -# Also works with the short version -ouch c 1 2 3 4 archive.zip +# Short alternative +ouch c file.txt file.zip -# Compress folder and video into 'videos.tar.gz' -ouch compress videos/ meme.mp4 videos.tar.gz - -# Compress one file using 4 compression formats -ouch compress file.txt compressed.gz.xz.bz.zst - -# Compress all the files in current folder -ouch compress * files.zip +# Compress everything in the current folder again and again +ouch compress * everything.tar.gz.xz.bz.zst.gz.gz.gz.gz.gz ``` `ouch` checks for the extensions of the **output file** to decide which formats should be used. - - ## Installation ### Downloading the latest binary -Download the script with `curl` and run it. +Compiled for `x86_64` on _Linux_, _Mac OS_ and _Windows_, run with `curl` or `wget`. -```sh -curl -s https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh | sh -``` +| Method | Command | +|:---------:|:-----------------------------------------------------------------------------------| +| **curl** | `curl -s https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh | sh` | +| **wget** | `wget https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh -O - | sh` | -Or with `wget`. -```sh -wget https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh -O - | sh -``` - -The script will download the latest binary and copy it to `/usr/bin`. +The script will download the [latest binary](https://github.com/ouch-org/ouch/releases) and copy it to `/usr/bin`. ### Installing from source code -For compiling, check [the wiki guide](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code). - +For compiling, check the [wiki guide](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code). ## Supported formats -| | .tar, .tgz | .zip | .bz, .bz2 | .gz | .xz, .lz, .lzma | .zst | +| Format | .tar | .zip | .bz, .bz2 | .gz | .xz, .lz, .lzma | .zst | |:-------------:|:----:|:----:|:---------:| --- |:---------------:| --- | -| Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Compression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -Note that formats can be chained: -- `.tar.gz` -- `.tar.xz` -- `.tar.gz.xz` -- `.tar.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.gz.lz.lz.lz.lz.lz.lz.lz.lz.lz.lz.bz.bz.bz.bz.bz.bz.bz` -- `.gz.xz` -- etc... +And the aliases: `tgz`, `tbz`, `tbz2`, `txz`, `tlz`, `tlzma`, `tzst`. +Formats can be chained (`ouch` keeps it _fast_): +- `.gz.xz.bz.zst` +- `.tar.gz.xz.bz.zst` +- `.tar.gz.gz.gz.gz.xz.xz.xz.xz.bz.bz.bz.bz.zst.zst.zst.zst` +- ## Contributing `ouch` is 100% made out of voluntary work, any small contribution is welcome! - Open an issue. -- Open a pr. -- Share it to a friend. +- Open a pull request. +- Share it to a friend!