Earlier quoted context omitted.
The NA detection and higlighting is nice but I'm not sure how I feel about showing anything other than the exact textual value. I don't mind abridging quotes when they're not necessary, but showing "N/A", NA,, etc. as the same value is a bit iffy.
It is rough. There are many ways that different tools put NAs, na, N/A, "", etc. in a file. To chose only "NA" would mean I would be excluding the output of other tools. I chose accessibility over specificity. #trade-offs.
Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
81–90 of 141 posts
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#82Consider adding a code snippet showing a.csv output. I had to watch a video just to see text.
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#83There should be a new package next to the traditional gnu tools containing the modern needed tools e.g. jq, curl or tv. Sometimes i really miss the extended sw package on some machines?
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#84Very 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…
> 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 manipulat…
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#85I 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…
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#86What is the value-add when compared to using `xsv` to pretty print? Is it only the fact that it highlights NA values?
1. As you noted NA comprehension 2. Column overflow logic for different sized terminals 3. Summary meta data in the header 4. Significant digits logic. This allows users to view more columns than they would otherwise view due to decimal dust shifting the columns over. 5. This is the most import! It looks really pretty!
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#87Earlier 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.
If appropriate, using files as arguments instead of using shell pipelines is a best practice. Commands can optimize for that use case, print better error messages, etc...
And it is not a good thing to encourage useless use of cat. If you goal is to show how your tool is to be used with pipelines, show an actually useful pipeline for example "sed '1b;/abc/!d' file.csv | tv". The "sed" command prints the first line (header), and all lines containing "abc".
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#88This looks great. How well does it handle the edge cases of CSV, like escaped commas, quoted text, escaped quotes, and all that fun, fun stuff?
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#89tv looks excellent. Fun name. I think if you added a couple of features it would ascend to my toolbox:
(1) scrolling (horizontal and vertical)
(2) better command line parsing. Running "tv" without stdin or arguments should produce an error/help. Running "tv xyz.csv" should read that file.
Good luck!
Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
#90I 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…
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?