Live data from Hacker News

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

github.com

131–140 of 141 posts

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

#132
post #109

Earlier quoted context omitted.

I love visidata! But when I want to just glance at a csv file I reach for tv (I used to use `column` which is more of a tv competitor than visidata). This is for a couple reasons. 1. tv gives a quick summary of the count of rows and columns 2. tv shows all columns at the bottom that don't fit in the terminal. With vd I have to scroll on wide data. 3. tv guides the eye to missing data better with NA highlights 4. tv h…

Hey there, VisiData author here. Nice work with tv! I'm sure it's more useful than VisiData for certain use cases. I just want to clear some things up since there are a few misconceptions here (which will happen if you don't use VisiData a lot): 1. In VisiData, The number of rows is always shown in the lower right, and you can see the number of columns with either Ctrl+G or a list of the columns with Shift+C. Or Shif…

Oo, I am sorry. I see I misrepresented VisiData. I apologize. Thank you for the corrections.

I have a lot of respect your work. Let me know if I can make it up to you. I would be happy to point people to VisiData in my README as a recommendation of a tool that is built to explore and wrangle tabular data.

Also, thanks for the compliment! Like you, I like seeing more data tools in the terminal.

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

#133

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…

[deleted]

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

#134

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…

Love the idea! The issue is already open. I will merge a PR before the next release. https://github.com/alexhallam/tv/issues/49

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

#135
post #109

Earlier quoted context omitted.

I love visidata! But when I want to just glance at a csv file I reach for tv (I used to use `column` which is more of a tv competitor than visidata). This is for a couple reasons. 1. tv gives a quick summary of the count of rows and columns 2. tv shows all columns at the bottom that don't fit in the terminal. With vd I have to scroll on wide data. 3. tv guides the eye to missing data better with NA highlights 4. tv h…

Hey there, VisiData author here. Nice work with tv! I'm sure it's more useful than VisiData for certain use cases. I just want to clear some things up since there are a few misconceptions here (which will happen if you don't use VisiData a lot): 1. In VisiData, The number of rows is always shown in the lower right, and you can see the number of columns with either Ctrl+G or a list of the columns with Shift+C. Or Shif…

https://github.com/alexhallam/tv/pull/58

I added VisiData in my README and represented it in a positive light in the description. Again, just wanted to apologize for my mistake.

#better-together

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

#137
post #90

Earlier 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 actually like `tidy` better and honestly would rather have `cat a.csv | tidy ...`. But it's probably already a thing.

You don't have to make the alias `tv`. Feel free to make your alias tidy='tidy-viewer'.

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

#138

Seems like a great command line tool. Congrats! FYI, I have made a browser-based tool for viewing and editing CSV files. Super fast, with Excel-like controls: https://editcsvonline.com .

Thanks and great work!

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

#139

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…

First of all - kudos on tackling this task - it is indeed very annoying to get CSVs to render nicely on a terminal. 1. How does tidy-viewer compare with csvlook? 2. Looking at the demo video, there seems to be an odd fixation with "N/A". The CSV spec, AFAIK, doesn't recognize this phrase. I don't understand why someone would expect a quoted string field whose raw characters are "n/a" should be rendered as anything ot…

> 5. What about scrolling?

The less(1) command has horizontal scrolling, just invoke it with the -S or --chop-long-lines options or toggle that feature while paging a file.

I agree it would be nicer if less(1) had a user configurable header with a format option to set it to the contents of the first line in a file or stdin or perhaps the most recent line matching a regex to allow for multiple tables and an option to make it scroll horizontally in -S or --chop-long-lines mode.

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

#140
post #58

Earlier quoted context omitted.

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

Google the phrase "useless use of cat". To some, it's a faux-pas. Personally, I like the aesthetics of cat for my own scripts. It follows the "pipe flowing" idiom better. There are performance reasons why "useless cat" should be avoided though. So avoid it where performance is important (or when some other hardcore CLI jockey is going to see your code :))

Avoiding “useless cat” on the command line is premature optimization. Sure, don’t do it in a script that is invoked a lot but it shouldn’t be a concern when prototyping a filter pipeline.

  $ cat foo | head -4
  b
  a
  c
  b
  
  $ cat foo | head -4 | sort
  a
  b
  b
  c
  
  $ cat foo | head -4 | sort | uniq -c
  1 a
  2 b
  1 c
  
  $ cat foo | head -4 | sort | uniq -c | sort -k1nr | head -1
  2 b
Post reply on HN