Crates.io | cliform |
lib.rs | cliform |
version | 0.1.0 |
source | src |
created_at | 2023-07-15 08:12:00.955604 |
updated_at | 2023-07-15 08:12:00.955604 |
description | A simple way to format the output of your cli application. |
homepage | https://github.com/loenard97/cliform |
repository | https://github.com/loenard97/cliform |
max_upload_size | |
id | 917049 |
size | 21,146 |
A rust library to format the output of cli programs
let grid = Grid::new();
grid.push("Hello");
grid.push("World");
grid.push("!");
println!("{}", grid.to_string());
Hello World !
let mut table = Table::new();
table.header(vec!["first", "second", "third"]);
table.push(vec!["Hello", "World", "!"]);
table.push(vec!["How", "are", "you?"]):
table.push(vec!["Great", "weather", "right?"]);
println!("{}", table.to_string());
first second third
───────────────────────────
Hello World !
How are you?
Great weather right?
let tree = Tree::new();
tree.push("first", 0);
tree.push("second", 1);
tree.push("third", 1);
println!("{}", tree.to_string());
├─ first
│ ├─ second
│ └─ third