Live data from Hacker News

Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

github.com

41–50 of 141 posts

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#41

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…

Cool project! I'm familiar with column, and this looks like a good replacement.

Curious, how do you handle formatting on cells with long strings that need to overflow to multiple lines? As soon as you try to optimize the column widths for table length, you start hitting an NP-hard problem.

https://quintenkent.com/content/column-problem.html

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#42
post #14

Why not visidata? https://www.visidata.org/ https://www.youtube.com/watch?v=N1CBDTgGtOU (It does much, much more than pretty printing, but no reason you can't use it for that.)

This is why I love HN. Never knew this existed. It has become my favorite tool in the past 5 mins I installed it. Also reminds me of Mainframe programs that I encountered in the past. I wish we had more tools like this instead of electron mouse click based apps for people who prefer speed and keyboard.

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#43
post #30

I thought this article was about a new way of understanding actual televisions

Same. Read this as some profound observation on what TVs actually are. Even thought to myself "huh, I guess OP does has a point..."

> "huh, I guess OP does has a point..."

LMAO, me too!

Guess I've been spending too much time thinking.

Edit: this reminds me of Jimmy Kimmel's segment where they "bleep and blur whether they need it or not" so that innocent TV clips appear to have profanity/innuendo etc.

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#44
post #34

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.

Why waste code teaching the program how to open files correctly when the shell already knows?

tv < foo.csv

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#45

XSV [0] can also pretty-print (minus the colors), but that's just the tip of the iceberg as far as what it can do. It's very handle for quick statistical analysis of CSV input. [0]: https://github.com/BurntSushi/xsv

I love xsv! I mention in the readme that command line data manipulation tools are great compliments to tv.

https://github.com/alexhallam/tv#tools-to-pair-with-tv

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#47

Earlier quoted context omitted.

I don't understand your comment - could you expand on it?

cat just regurgitates the contents of the file, but the resulting piped fd is non-seekable. Since almost every command that can operate on a file from stdin can also operate on the file by name/path, at best this is just a needless invocation of a process (i.e. `tv foo.csv` should have been used instead of `cat foo.csv | tv`) - if the app in question can't handle paths, then you can have the shell pipe the file into…

thank you! I knew some of that but learned a lot too.

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#48
post #44
post #34

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.

Why waste code teaching the program how to open files correctly when the shell already knows? tv < foo.csv

Because I'd rather the program did the work and let me skip the extra keystroke.

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#49

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…

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.

Re: Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment

#50

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…

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.
Post reply on HN