I spend a lot of time in the terminal and want to quickly glance at a csv files without making a new script, opening excel, or using a tui. I made tidy-viewer (tv) because current tools like cat and column were not pretty enough. tv modifies raw files in the following ways: 1. NA detection and highlighting 2. Printing only significant digits 3. Header and footer meta data I have been using this a lot at work. There i…
Hey, if you are able to edit the title of this submission, can you add `Show HN: ` prefix? See https://news.ycombinator.com/showhn.html for details.
Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
61–70 of 141 posts
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#62Earlier quoted context omitted.
Man.. TV is such a good name for a visualiser tool that it'd be excellent if it could pretty-print any content given to it. Does your framework support the idea of pre-parsing the file's content and selecting an appropriate renderer, or is it fairly tied to CSVs?
I would need more details on what you mean by "pre-parsing". It works with any deliminator, it could be comma-separated, pipe-separated, etc.
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#63Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#64The video of catting into tv is equivalent to:
column -s, -t FILERe: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#65Earlier quoted context omitted.
I think it's a great first effort, but there are a number of possible improvements to do. The most obvious one would be to support passing the file as an argument instead of using cat or the redirection operator every time. It's great that it works with stdin to allow piping into it, but it's cumbersome if you just want to take a file and print it, which will no doubt be a common use case.
Do you think ‘tv I think it’s great for a visualizer like this to encourage people to get used to the power of shell pipelines if possible.
It’s very surprising to see a tool that only works as a filter, and doesn’t take file paths as arguments.
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#66Very 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 h…
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
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#67This is kinda cool, but why not just use column? The video of catting into tv is equivalent to: column -s, -t FILE
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#68Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#69Earlier quoted context omitted.
Maybe you could just background highlight the empty cells?
Well, I think being promiscuous with "NA", "N/A", nan, etc. is a separate issue from a blank cell. A blank cell is literally missing. That should be filled with NA.
Why? "NA" stands for "Not Applicable", but a blank cell in a CSV could represent any number of things of which "Not Applicable" is only one.
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#70Consider adding a code snippet showing a.csv output. I had to watch a video just to see text.
It, for example, allowed me to make an educated guess as to the answer to the question “how does this handle huge files?”. It by default only reads 25 lines.
(That makes the example from the header:
cat diamonds.csv | head -n 35 | tv
a bad example. You shouldn’t need that head in-between.However, line 167 says
//.take(row_display_option + 1)
That seems to indicate this reads the entire file into memory, and that guess wasn’t that educated at all.