mirror of
https://github.com/chenasraf/tblf_rust.git
synced 2026-05-17 17:48:09 +00:00
master
tblf
A small binary that turns input like this:
First Name|Last Name|Has Super Powers
Peter|Parker|Yes
Mary-Jane|Watson|No
Harry|Osborn|No
Into this:
First Name Last Name Has Super Powers
Peter Parker Yes
Mary-Jane Watson No
Harry Osborn No
Installation
Currently you can build this program from source.
Requires rust compiler.
For an easy installation:
- Clone this repository:
git clone https://github.com/chenasraf/tblf --depth=1 - To build:
make build - To install:
make install- will put the binary in/usr/local/bin - To install at a custom location:
cp target/release/tblf /path/to/dir
How to use
Either pass a string as the first argument, or pipe a string into it.
# as argument
tbl <string> [separator]
# as piped input
cat <file> | tbl [separator]
Examples
View a CSV file:
cat data.csv | tbl ','
Prettify tmux-list-sessions:
echo "Name # Windows Date \n$(tmux list-sessions | tail -n +2 | sed s/:// | sed s/\(created// | sed s/\)//)" | tbl
Description
Languages
Rust
91.9%
Makefile
8.1%