Skip to content

Commit a3d1c13

Browse files
Updated readme with usage and installation steps
1 parent ae000c1 commit a3d1c13

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# table-printer
22
Linux file content manipulation utility for printing formatted table for better readability
33

4-
## Why
4+
## Motivation
55

66
Have you ever tried reading a config file that was in `csv` format and had trouble getting any useful information out of
77
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.
4343
> +----------+---+----+-------+----------+-----------------+-------------------+
4444
> ```
4545
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+
4686
Feel free to fork this repo and make any changes or file issue with suggestion.

0 commit comments

Comments
 (0)