usv-to-csv

Crates.iousv-to-csv
lib.rsusv-to-csv
version1.4.1
sourcesrc
created_at2024-03-09 13:20:14.114457
updated_at2024-04-11 19:36:53.62694
descriptionUSV to CSV: Convert Unicode Separated Values (USV) to Comma Separated Values (CSV) for data markup, including for spreadsheets, databases, text files, and more.
homepage
repositoryhttps://github.com/sixarm/usv-to-csv-rust-crate/
max_upload_size
id1167815
size40,229
Joel Parker Henderson (joelparkerhenderson)

documentation

README

usv-to-csv

Convert Unicode Separated Values (USV) to Comma Separated Values (CSV). Built with the USV Rust crate.

Syntax:

stdin | usv-to-csv | stdout

Example:

cat example.usv | usv-to-csv

More examples below.

Options

  • -u, --unit-separator : Set the unit separator string [default: ","]

  • -r, --record-separator : Set the record separator string [default: "\n"]

  • -h, --help : Print help

  • -V, --version : Print version

  • -v, --verbose... : Set the verbosity level: 0=none, 1=error, 2=warn, 3=info, 4=debug, 5=trace. Example: --verbose …

  • --test : Print test output for debugging, verifying, tracing, and the like. Example: --test

Install

Install:

cargo install usv-to-csv

Link: https://crates.io/crates/usv-to-csv

Example

Suppose example.usv contains:

a␟b␟␞
c␟d␟␞

Run:

cat example.usv | usv-to-csv

Output:

a,b
c,d

Run:

cat example.usv | usv-to-csv --delimiter ";"

Output:

a;b
d;e

FAQ

What converters are available?

When to use this command?

Use this command when you want to convert from USV to CSV.

A typical use case is when you have USV data, such as a collection of units and records, and you want to convert it to CSV data, such as for a spreadsheet import.

Our real-world use case is converting a bunch of USV document-oriented data from a variety of programs, including a CMS, to USV so we're better-able to import the data into Excel.

Why use USV instead of CSV?

See the documentation for USV.

Is USV aiming to become a standard?

Yes, USV is submitted to IETF.org as an Internet-Draft work in progress: link.

Can I build my own USV tools?

Yes, and you may freely use the USV RFC and USV Rust crate.

Help wanted

Constructive feedback welcome. Pull requests and feature requests welcome.

Tracking

  • Package: usv-to-csv-rust-crate
  • Version: 1.4.1
  • Created: 2024-03-09T13:33:20Z
  • Updated: 2024-04-11T19:36:27Z
  • License: MIT or Apache-2.0 or GPL-2.0 or GPL-3.0 or contact us for more
  • Contact: Joel Parker Henderson (joel@sixarm.com)
Commit count: 13

cargo fmt