this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: cleanup the README

+24 -15
+24 -15
README.md
··· 1 1 # cmprss 2 2 3 - **Status: Pre-alpha.** 4 - Lacks formal testing. 5 - CLI is reasonably stable but still being tweaked. 3 + **Status: Alpha.** 4 + CLI is stable but likely contains bugs, and may have breaking changes. 6 5 7 - A compression multi-tool for the CLI. Replace `tar` with something you can remember. [Relevant XKCD](https://xkcd.com/1168/). 6 + A compression multi-tool for the CLI. 7 + Replace `tar` with something you can remember. 8 + [Relevant XKCD](https://xkcd.com/1168/). 8 9 9 10 ## Usage 10 11 11 12 The primary goal of the CLI is to make it easy and consistent to work with any compression format. 12 13 All of the examples will work with _any_ of the supported compression formats. 13 - Some formats will fail in certain scenarios, as they don't support certain types of input/output; for example `tar` is unable to support compressing from `stdin` and extracting to `stdout`. 14 + Some formats will fail in certain scenarios, as not all compression formats support all types of input/output; for example `tar` is unable to support compressing from `stdin` and extracting to `stdout`, because it expects to operate on files. 14 15 15 - All commands read from left to right, input is always either piped from `stdin` or the first filename specified, and output is either `stdout` or the next filename (the first if using `stdin`, the second if using a filename for input). 16 + All commands read from left to right, input is always either piped from `stdin` or the first filename(s) specified, and output is either `stdout` or the last filename/directory. 16 17 17 18 If output filenames are left out, `cmprss` will try to infer the filename based on the compression type. 18 19 ··· 20 21 21 22 Compress a file/directory to a `tar` archive: 22 23 24 + ```bash 25 + cmprss tar filename # outputs to archive.tar 26 + cmprss tar filename my_preferred_output_name.tar 23 27 ``` 24 - cmprss tar filename 25 - cmprss tar filename my_preferred_output_name.tar 28 + 29 + Compress 2 files/directories into a `tar` archive: 30 + 31 + ```bash 32 + cmprss tar dir_1/ dir_2/ combined.tar 33 + cmprss tar file_1.txt file_2.txt # outputs to archive.tar 26 34 ``` 27 35 28 36 Extract a `tar` archive: 29 37 30 - ``` 31 - cmprss tar --extract filename.tar 32 - cmprss tar --extract filename.tar custom_output_directory 38 + ```bash 39 + cmprss tar --extract archive.tar # extracts to the current directory 40 + cmprss tar -e archive.tar custom_output_directory 33 41 ``` 34 42 35 - `cmprss` will detect if `stdin` or `stdout` is a pipe, and use those for I/O. 43 + `cmprss` will detect if `stdin` or `stdout` is a pipe, and use those for I/O where it makes sense. 36 44 37 45 Create and extract a `tar.gz` archive with pipes: 38 46 39 - ``` 47 + ```bash 40 48 cmprss tar directory_name | cmprss gzip > directory.tar.gz 41 49 cmprss gzip --extract directory.tar.gz | cmprss tar --extract new_directory 50 + 51 + # Or a full roundtrip in one line 52 + cmprss tar directory_1/ directory_2/ | cmprss gzip | cmprss gzip -e | cmprss tar -e new_directory 42 53 ``` 43 54 44 55 ## Supported formats 45 56 46 57 - gzip 47 58 - tar 48 - 49 - TODO: Add more compression algos now that the internal API is mostly stable.