#column #tabular #formatting #table-column #command-line-tool #cli

app columnrs

A command-line tool for formatting tabular data into columns table

2 releases

0.1.1 Sep 27, 2024
0.1.0 Sep 27, 2024

#778 in Command line utilities

MIT license

9KB
90 lines

columnrs

A command-line tool for formatting tabular data into columns table. Just like column terminal command in linux, but can align right.

Table of Contents

Installation

You can install columnrs using Cargo, the Rust package manager. Run the following command:

$ cargo install columnrs

Usage

Numeric columns are right-aligned by default:

$ echo "no name age\n1 Tom 4" | columnrs
no  name  age
 1  Tom     4
$ echo "no name age\n1 Tom 4\n2 Jerry 15" | columnrs
no  name   age
 1  Tom      4
 2  Jerry   15

-l change to left-aligned:

$ echo "no name age\n1 Tom 4\n2 Jerry 15" | columnrs -l
no  name   age
1   Tom    4
2   Jerry  15
$ cat dataset/data.csv|columnrs
NO  Extension         Publisher           Install  Trending  First_Published  Latest_Updated  Latest_Version
 1  claude-dev        saoudrizwan          63,921     60.86  2024-07-10       2024-09-26      1.9.7
 2  continue          Continue            329,208     17.68  2023-05-27       2024-09-25      0.9.212
 3  aide-pro          nicepkg              23,122     11.67  2024-07-02       2024-08-15      1.19.0
 ...

Dependencies

~1.1–1.7MB
~32K SLoC