2023-05-09 09:25:28 +03:00
2023-05-09 09:04:02 +03:00
2023-05-04 01:17:34 +03:00
2023-05-09 09:04:02 +03:00
2023-05-09 09:04:02 +03:00
2023-05-09 09:25:28 +03:00

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
Turns any output lines into tables. Made with Rust
Readme 29 KiB
Languages
Rust 91.9%
Makefile 8.1%