Lurker News

Comments (136) 27 threads

Earlier comments
dotancohen1 reply#
Very nice! How does it handle CSVs that are wider or longer than the terminal? How does it deal with columns that are exceptionally long, or multiline?

Often when working with large CSV files, I'll need to show or hide specific columns, especially if they are very long. Also, grepping the output for a specific line will hide the header as well, not to mention make the output unnecessarily wide if non-matching lines have longer fields than do the matching lines. So a built-in grepping feature would make this very useful.

flusteredBias1 reply#
> How does it handle CSVs that are wider or longer than the terminal?

Columns that are exceptionally long but cutting and appending an ellipsis if the line is over 20 characters.
> a built-in grepping feature would make this very useful.
see the following for csv data manipulation:
xsv - Command line csv data manipulation. Rust
csvtk - Command line csv data manipulation. Go
tsv-utils - Command line csv data manipulation toolkit. D
q - Command line csv data manipulation query-like. Python
miller - Command line data manipulation, statistics, and more. C

dotancohen#
Terrific, thank you!
treve1 reply#
I've made a Lotus 1-2-3 inspired CSV viewer for the terminal too. Had big plans for it, but it's just a basic viewer now:

https://github.com/evert/csv123

flusteredBias#
Keep at it. I think it looks great!
stavros1 reply#
This is quite nice, but I don't like how it cuts off the output (instead of making it scrollable). Also, why require the use of `cat`? Accepting a filename so I can do `tv foo.csv` would be much more ergonomic, in my opinion.
bityard1 reply#
Why waste code teaching the program how to open files correctly when the shell already knows?

tv < foo.csv

stavros#
Because I'd rather the program did the work and let me skip the extra keystroke.
leptoniscool#
CSV is still a major part of the development ecosystem, amazing that it has such staying power after all these years.

Load more comments