6 releases (breaking)

0.5.0 Sep 29, 2024
0.4.1 Sep 26, 2024
0.3.0 Sep 8, 2024
0.2.0 Sep 5, 2024
0.1.0 Aug 28, 2024

#374 in Command-line interface

Download history 150/week @ 2024-08-26 262/week @ 2024-09-02 89/week @ 2024-09-09 70/week @ 2024-09-16 351/week @ 2024-09-23 109/week @ 2024-09-30 32/week @ 2024-10-07 19/week @ 2024-10-14 55/week @ 2024-10-21 1/week @ 2024-10-28

113 downloads per month
Used in ports

MIT license

39KB
927 lines

very nice table

license: MIT GitHub Tag crates.io GitHub Actions Workflow Status

Number one table.

Very basic and lightweight table builder to print tabular data.

Example

use std::fmt::Alignment::{Left, Right};
use verynicetable::Table;

fn main() {
    let ports = vec![
        vec!["rapportd", "449", "Quentin", "*:61165"],
        vec!["Python", "22396", "Quentin", "*:8000"],
        vec!["foo", "108", "root", "*:1337"],
        vec!["rustrover", "30928", "Quentin", "127.0.0.1:63342"],
        vec!["Transmiss", "94671", "Quentin", "*:51413"],
        vec!["Transmiss", "94671", "Quentin", "*:51413"],
    ];

    let table = Table::new()
        .headers(&["COMMAND", "PID", "USER", "HOST:PORTS"])
        .alignments(&[Left, Right, Left, Right])
        .data(&ports)
        .max_rows(5)
        .to_string();

    print!("{table}");
}
COMMAND      PID  USER          HOST:PORTS
rapportd     449  Quentin          *:61165
Python     22396  Quentin           *:8000
...          ...  ...                  ...
rustrover  30928  Quentin  127.0.0.1:63342
Transmiss  94671  Quentin          *:51413
Transmiss  94671  Quentin          *:51413

That's about it.

No runtime deps