1 # ouch (_work in progress_)
3 `ouch` is the Obvious Unified Compression (and decompression) Helper.
6 | Supported formats | .tar | .zip | .tar.{.lz, .lzma, .gz, .bz} | .zip.{.lz, .lzma, .gz, .bz} | .bz | .gz | .lz, .lzma |
7 |-------------------|------|------|------------------------------|------------------------------|-----|-----|------------|
8 | Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
9 | Compression | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
13 `ouch` infers commands from the extensions of its command-line options.
17 ouch is a unified compression & decompression utility
20 ouch [OPTIONS] --input <input>...
23 -h, --help Displays this message and exits
24 -V, --version Prints version information
27 -i, --input <input>... Input files (TODO description)
28 -o, --output <output> Output file (TODO description)
33 #### Decompressing a bunch of files
36 $ ouch -i file{1..5}.zip another_file.tar.gz yet_another_file.tar.bz
39 When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressible.
41 #### Decompressing a bunch of files into a folder
44 $ ouch -i file{1..5}.tar.gz -o some-folder
45 info: attempting to decompress input files into single_folder
49 When the output file is not a compressed file, `ouch` will check if all input files are decompressible and infer that it must decompress them into the output file.
51 #### Compressing files
54 $ ouch -i file{1..20} -o archive.tar
55 info: trying to compress input files into 'archive.tar'
61 #### No clear decompression algorithm
64 $ ouch -i some-file -o some-folder
65 error: file 'some-file' is not decompressible.
68 `ouch` might (TODO!) be able to sniff a file's compression format if it isn't supplied in the future, but that is not currently implemented.
72 ### Runtime dependencies
74 `ouch` depends on a few widespread libraries:
78 Both should be already installed in any mainstream Linux distribution.
82 * On Debian-based distros
84 `sudo apt install liblzma-dev libbz2-dev`
86 * On Arch-based distros
88 `sudo pacman -S xz bzip2`
90 The last dependency is a recent [Rust](https://www.rust-lang.org/) toolchain. If you don't have one installed, follow the instructions at [rustup.rs](https://rustup.rs/).
94 Once the dependency requirements are met:
97 git clone https://github.com/vrmiguel/jacarex # Clone the repo.
98 cargo install --path ouch # .. and install it