#csv-tsv #utility #pretty-print #table #command-line-tool #column #outputs

bin+lib tapr

tapr is a table pretty-printer. Outputs a CSV or TSV file as nicely as possible by adjusting column widths.

6 releases (breaking)

0.7.0 Mar 28, 2022
0.6.0 Mar 26, 2022
0.5.1 Mar 26, 2022
0.4.0 Mar 26, 2022
0.3.0 Mar 25, 2022

#19 in #pretty-printing

MIT/Apache

210KB
417 lines

tapr

tapr is a table pretty-printer. Outputs a CSV or TSV file as nicely as possible by adjusting column widths.

Screenshot:

Installation

cargo install tapr

CLI

USAGE:
    tapr [FLAGS] [OPTIONS] <input>

FLAGS:
    -c, --csv            Force treats input file as CSV
    -h, --help           Prints help information
    -H, --header         Prints first line as a header
    -n, --line-number    Prints line number
    -t, --tsv            Force treats input file as TSV
    -V, --version        Prints version information

OPTIONS:
    -s, --line-sampling <num>    Sampling size of lines to determine width of each column. Specify `0` for +inf
                                 [default: 100]

ARGS:
    <input>    Input file. Specify `-` to read from the standard input

To pipe tapr to less, do not forget to specify --raw-control-chars option to less:

...(some command)... | tapr - | less -R

License

MIT/Apache-2.0

Dependencies

~3.5–5MB
~95K SLoC