prettytable-rs
prettytable-rs copied to clipboard
switch for parsable output
Many CLI programs use -H for headerless and -p for passable when it comes to printing tables. Reading the docs, I think that could be done by specifying a custom format, but it would be helpful to have a simple switch for those options.
What about printing the table into CSV instead ?
(Sorry for the late reply by the way)
@phsym Well, still need to take care of header, no? That part can be handled with slices I believe.
Plus, parsable output usually tab separated to allow consumption from within shell scripts without thinking about quotes. Having to_csv_string shortcut similar to from_csv_string would be a fine addition to ~~my collection~~ api.
However, parsable output needed for things that usually came from the iterator, so -H can completely ignore Table and just output it itself, at least that how I've done.