Crates.io | csv-to-html |
lib.rs | csv-to-html |
version | 0.5.10 |
source | src |
created_at | 2024-01-03 16:18:37.69848 |
updated_at | 2024-01-04 08:14:10.830908 |
description | Convert CSV to HTML table |
homepage | |
repository | https://github.com/somecho/csv-to-html |
max_upload_size | |
id | 1087526 |
size | 22,319,602 |
A simple CLI and Rust crate to convert CSV to HTML tables.
Installation is very easy with Cargo. If you have it:
cargo install csv-to-html
csv-to-html
has no side effects on your system, i.e. no config files, no
program data files, etc. Installation is as easy as:
cargo uninstall csv-to-html
Usage: csv-to-html [OPTIONS] --filename <FILENAME>
Options:
-f, --filename <FILENAME> path to input file
-n, --no-header the CSV file has no header
-o, --output <OUTPUT> path of output file. If not specified, will print to stdout
-d, --delimiter <DELIMITER> [default: ,]
-h, --help Print help
-V, --version Print version
csv-to-html -f simple.csv
csv-to-html -f simple.csv -n
csv-to-html -f simple.csv -d " "
csv-to-html -f simple.csv -o output.html
You can also use this is a library. To add to your Rust program:
cargo add csv-to-html
let html: String = csv_to_html::convert(&csv_string, &b',', &true);