#table #csv #html #formatting

table_print

A table library for rust. It can export to plain text, HTML and CSV.

1 unstable release

0.1.0 Apr 7, 2021

#238 in #formatting

LGPL-3.0-or-later

12KB
244 lines

TablePrint

License: LGPL v3

TablePrint is a small library designed so that you can easily create tables. Some of the notable features include:

  • Export to HTML
  • Export to CSV
  • Export to Plaintext with wrap.

You can easily create tables like this:

// Create a table with the headings of "Person", "History Grade" and "Geography Grade"
let table = Table::new(vec!["Person", "History Grade", "Geography Grade"]);

// Add Some Rows
table.add_row(vec!["John", "93", "92"]);
table.add_row(vec!["Anne", "98", "87"])

// Export to plaintext and print.
// 80 for 80 columns.
println!("Here are the grades: \n\n{}", table.get_pretty(80));

lib.rs:

TablePrint

TablePrint is a library for tables, including features such as:

  • Printing to the terminal.
  • Export to HTML
  • Export to CSV
  • Wrap

Dependencies

~270KB