Table-Format
This crate formats data as a text table, suitable for printing to the terminal or for inclusion in logs.
Changelog
- v0.0.1 - Initial files. Tests are passing. Table header formats.
- v0.0.2 - Table macros. Base cell styles. Color codes for initial elements.
- v0.0.3 - ColumnBreak->CellWidth. Now a part of content style.
Roadmap
- v0.0.4 - Bug fixes and unit test cleanup. Expanded test coverage.
- v0.0.5 - Examples and README improvement.
- v0.1.0 - Documentation cleanup pass. Get what is there clean and tidy.
Examples
The following code prints a two-column table from a vector of strings:
let table =
table!(
"{B^:12:}" => "Food", "{G^:7:}" => "Count";
"Fish", "15", "Pizza", "10", "Tomato", "24"
);
let output = table.format();
Output: (color codes not shown)
+--------------------+
| Food | Count |
+--------------------+
|Fish |15 |
+--------------------+
|Pizza |10 |
+--------------------+
|Tomato |24 |
+--------------------+