ttygrid

Crates.iottygrid
lib.rsttygrid
version0.3.0
sourcesrc
created_at2021-06-29 23:24:05.982384
updated_at2023-09-20 05:55:52.458237
descriptionGrid layout engine for tabular data displayed in a TTY
homepage
repositoryhttps://github.com/erikh/ttygrid
max_upload_size
id416387
size33,475
Erik Hollensbe (erikh)

documentation

README

ttygrid: reactive layouts for terminal tables

ttygrid makes your tables into reactive layouts. You feed it your contents and the columns you want to show, and it will calculate what to show based on the length of text in the table column, and the "priority", an ascending number indicating display priority within the table.

The result is something like this with the demo source here. Padding is allocated for all columns so the tables are presented nicely and orderly.

ttygrid does not work with stream I/O. Terminal I/O only!. At this point, you must detect if you are a TTY before invoking ttygrid calls.

ttygrid uses crossterm underneath the hood to detect the width of the terminal as well as manage colors when they are desired.

Usage

docs.rs has it all.

Author

Erik Hollensbe github@hollensbe.org

Commit count: 33

cargo fmt