|
1 | 1 | # table-printer |
2 | 2 | Linux file content manipulation utility for printing formatted table for better readability |
3 | 3 |
|
4 | | -## Why |
| 4 | +## Motivation |
5 | 5 |
|
6 | 6 | Have you ever tried reading a config file that was in `csv` format and had trouble getting any useful information out of |
7 | 7 | it at first glance. This utility will format the table and color it so that it is easy to read and get sense of what you |
@@ -43,4 +43,44 @@ are looking at. |
43 | 43 | > +----------+---+----+-------+----------+-----------------+-------------------+ |
44 | 44 | > ``` |
45 | 45 |
|
| 46 | +## Installation |
| 47 | +
|
| 48 | +#### Download precompiled binary |
| 49 | +
|
| 50 | +> Go to https://github.com/dev-null-undefined/table-printer/releases/latest |
| 51 | +> under assets download the table-printer binary |
| 52 | +> set the execution bit using `chmod +x table-printer` |
| 53 | +> and then you should be able to run it using relative path `./table-printer` or moving to for example `/usr/local/bin` |
| 54 | +> `mv table-printer /usr/local/bin` |
| 55 | +
|
| 56 | +#### Clone the project and compile it your self |
| 57 | +
|
| 58 | +> This can be done using cmake with following command |
| 59 | +> ```shell |
| 60 | +> git clone https://github.com/dev-null-undefined/table-printer |
| 61 | +> cd table-printer |
| 62 | +> cmake . |
| 63 | +> cmake --build . |
| 64 | +> ``` |
| 65 | +
|
| 66 | +## Usage |
| 67 | +
|
| 68 | +table-printer has build in help menu that can be accessed by using the `--help` argument which will print this menu |
| 69 | +
|
| 70 | +``` |
| 71 | +Usage: table [OPTION]... FILE |
| 72 | +Formats FILE, or standard input, to standard output. |
| 73 | + |
| 74 | + -C, --counter prefix each line of output with the line number |
| 75 | + -h, --header treats the first line as header and separates it |
| 76 | + -v, --version display the version of table |
| 77 | + -f, --frame print a frame around the output |
| 78 | + -c, --colors use colors in the output |
| 79 | + -H, --help display this help |
| 80 | + -l, --left-align align text to the left side of the frame |
| 81 | + -o, --output-file output to file instead of stdout |
| 82 | + -F, --force used to override output file if file exists |
| 83 | + -d, --delimiter delimiter char to separate fields |
| 84 | +``` |
| 85 | +
|
46 | 86 | Feel free to fork this repo and make any changes or file issue with suggestion. |
0 commit comments