Skip to content

Turns any output lines into tables. Made with Rust

Notifications You must be signed in to change notification settings

chenasraf/tblf_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Turns any output lines into tables. Made with Rust

Resources

Stars

Watchers

Forks

Releases

No releases published