mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
README update
This commit is contained in:
parent
a0f43b62f7
commit
06c69d4d8f
98
README.md
98
README.md
@ -2,18 +2,17 @@
|
|||||||
|
|
||||||
<!--  -->
|
<!--  -->
|
||||||
|
|
||||||
`ouch` loosely stands for Obvious Unified Compression files Helper.
|
`ouch` stands for **Obvious Unified Compression Helper**, and works on _Linux_, _Mac OS_ and _Windows_.
|
||||||
|
|
||||||
It is an easy and painless way of compressing and decompressing files in the terminal.
|
It is a CLI tool to compress and decompress files that aims to be easy to use.
|
||||||
|
|
||||||
Works in `Linux`, `Mac OS` and `Windows`.
|
|
||||||
|
|
||||||
|
<!-- TODO -->
|
||||||
<!-- - [Listing files](#Listing-the-elements-of-an-archive) -->
|
<!-- - [Listing files](#Listing-the-elements-of-an-archive) -->
|
||||||
|
|
||||||
|
- [Installation](#Installation)
|
||||||
- [Usage](#Usage)
|
- [Usage](#Usage)
|
||||||
- [Decompressing files](#Decompressing-files)
|
- [Decompressing files](#Decompressing-files)
|
||||||
- [Compressing files/directories](#Compressing-files-and-directories)
|
- [Compressing files/directories](#Compressing-files-and-directories)
|
||||||
- [Installation](#Installation)
|
|
||||||
- [Supported Formats](#Supported-formats)
|
- [Supported Formats](#Supported-formats)
|
||||||
- [Supported operating systems](#Supported-operating-systems)
|
- [Supported operating systems](#Supported-operating-systems)
|
||||||
|
|
||||||
@ -24,45 +23,43 @@ Works in `Linux`, `Mac OS` and `Windows`.
|
|||||||
Run `ouch` and pass compressed files as arguments.
|
Run `ouch` and pass compressed files as arguments.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Decompress `a.zip`
|
# Decompress 'a.zip'
|
||||||
ouch a.zip
|
ouch a.zip
|
||||||
|
|
||||||
# Decompress multiple files
|
# Decompress multiple files
|
||||||
ouch a.zip b.tar.gz
|
ouch a.zip b.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the `-o/--output` flag to redirect the output of decompressions to a folder.
|
You can redirect the decompression results to a folder with the `-o/--output` flag.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Decompress multiple files but inside new_folder
|
# Create 'pictures' folder and decompress inside of it
|
||||||
ouch a.zip b.tar.gz c.tar.bz2 -o new_folder
|
ouch 1.tar.gz 2.tar.gz -o pictures
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compressing
|
### Compressing
|
||||||
|
|
||||||
Use the `compress` subcommand.
|
Use the `compress` subcommand.
|
||||||
|
|
||||||
Accepts files and folders, and the **last** argument shall be the **output file**.
|
Accepts multiple files and folders, the **last** argument shall be the **output file**.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Compress four files into `archive.zip`
|
# Compress four files into 'archive.zip'
|
||||||
ouch compress 1 2 3 4 archive.zip
|
ouch compress 1 2 3 4 archive.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
|
||||||
```
|
```
|
||||||
|
|
||||||
The supplied **output file** shall have a supported compression format, [see the list](#Supported-formats).
|
`ouch` checks for the extensions of the **output file** to decide which formats should be used.
|
||||||
|
|
||||||
You can also use the `c` alias for this subcommand.
|
Check the [list of all file extensions supported](#Supported-formats).
|
||||||
|
|
||||||
```sh
|
|
||||||
# Compress a folder and a file into `videos.tar.xz`
|
|
||||||
ouch c Videos/ funny_meme.mp4 videos.tar.xz
|
|
||||||
|
|
||||||
# Compress three files into a `.tar.bz2` archive
|
|
||||||
ouch c a.mp4 b.jpg c.png files.tar.bz2
|
|
||||||
|
|
||||||
# Compress two folders into a lzma file
|
|
||||||
ouch c src/ target/ build.tar.lz
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- ### Listing the elements of an archive
|
<!-- ### Listing the elements of an archive
|
||||||
|
|
||||||
@ -75,49 +72,40 @@ ouch list videos.tar.xz
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Installing a binary
|
### Downloading the latest binary
|
||||||
|
|
||||||
|
WARNING: SCRIPT TEMPORARILY DISABLED.
|
||||||
|
|
||||||
This script downloads the latest binary and copies it to `/usr/bin`.
|
This script downloads the latest binary and copies it to `/usr/bin`.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -s https://raw.githubusercontent.com/vrmiguel/ouch/master/install.sh | sh
|
curl -s https://raw.githubusercontent.com/vrmiguel/ouch/master/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiling
|
### Installing from source code
|
||||||
Install [Rust](rust-lang.org) and [Cargo](https://doc.rust-lang.org/cargo/) via [rustup.rs](https://rustup.rs/).
|
|
||||||
|
|
||||||
From latest official release:
|
For compiling, check [the wiki guide](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code).
|
||||||
```sh
|
|
||||||
cargo install ouch
|
|
||||||
```
|
|
||||||
|
|
||||||
From repository source code:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/vrmiguel/ouch
|
|
||||||
cargo build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Supported formats
|
## Supported formats
|
||||||
|
|
||||||
| | .tar | .zip | .tar.\*¹ | .zip.\*² | .bz, .bz2 | .gz | .xz, .lz, .lzma | .7z |
|
| | .tar | .zip | .bz, .bz2 | .gz | .xz, .lz, .lzma | .7z |
|
||||||
|:-------------:|:----:|:----:|:--------:|:--------:|:---------:| --- |:---------------:| --- |
|
|:-------------:|:----:|:----:|:---------:| --- |:---------------:| --- |
|
||||||
| Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
|
| Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
|
||||||
| Compression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
|
| Compression | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
|
||||||
|
|
||||||
```
|
Note that formats can be chained:
|
||||||
Note: .tar.*¹: .tar.gz, .tar.bz, .tar.bz2, .tar.xz, .tar.lz, .tar.lzma, .tar.zip
|
- `.tar.gz`
|
||||||
.zip.*²: .zip.gz, .zip.bz, .zip.bz2, .zip.xz, .zip.lz, .zip.lzma, .zip.zip
|
- `.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...
|
||||||
|
|
||||||
<!-- ## Supported operating systems
|
## Contributing
|
||||||
|
|
||||||
`ouch` runs on Linux, macOS and Windows 10. Binaries are available on our [Releases](https://github.com/vrmiguel/ouch/releases) page.
|
`ouch` is 100% made out of voluntary work, any small contribution is welcome!
|
||||||
|
|
||||||
Binaries are also available at the end of each (successful) [GitHub Actions](https://github.com/vrmiguel/ouch/actions) run for these targets:
|
- Open an issue.
|
||||||
|
- Open a pr.
|
||||||
* Linux x86-64 statically linked (musl libc)
|
- Share it to a friend.
|
||||||
* macOS x86-64 dynamically linked
|
|
||||||
* Windows 10
|
|
||||||
* Linux ARMv7 dynamically linked (glibc)
|
|
||||||
|
|
||||||
One must be logged into GitHub to access build artifacts. -->
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user