|
1 | 1 | [](https://github.com/alexhallam/tv/actions/workflows/rust.yml)
|
2 | 2 | [](https://crates.io/crates/tidy-viewer)
|
3 |
| -<img alt="Crates.io (recent)" src="https://img.shields.io/crates/dr/tidy-viewer"> |
4 | 3 |
|
5 | 4 | <h1 align="center">Tidy Viewer (tv)</h1>
|
6 | 5 | <p align="center">Tidy Viewer (tv) is a cross-platform csv pretty printer that uses column styling to maximize viewer enjoyment.</p>
|
|
9 | 8 |
|
10 | 9 | # Pretty Printing
|
11 | 10 |
|
12 |
| -[](https://asciinema.org/a/NUlqhMkFLyfxCeU6mea7YuHHX) |
| 11 | + |
| 12 | + |
| 13 | +### Starwars |
| 14 | + |
| 15 | + |
13 | 16 |
|
14 |
| - |
15 | 17 |
|
16 | 18 | # Installation
|
17 | 19 |
|
@@ -108,7 +110,9 @@ cat pigeon-racing.csv | tv
|
108 | 110 |
|
109 | 111 | # Significant Figure Definitions & Rules
|
110 | 112 |
|
111 |
| -[](https://asciinema.org/a/YvXpj0faFX91ahr2URMq0ZbBj) |
| 113 | + |
| 114 | + |
| 115 | + |
112 | 116 |
|
113 | 117 | > The first three digits represent > 99.9% the value of a number. -- GNU-R Pillar
|
114 | 118 |
|
@@ -238,16 +242,52 @@ Though `column` is similar I do think there are some reasons `tv` is a better to
|
238 | 242 |
|
239 | 243 | `NA` values are very important! Viewers should have their attention drawn to these empty cells. In the image below `NA` values are not only invisible, but it seems to be causing incorrect alignment in other columns.
|
240 | 244 |
|
241 |
| - |
| 245 | + |
242 | 246 |
|
243 | 247 | ## 2. Column Overflow Logic
|
244 | 248 |
|
245 | 249 | In cases where the terminal width can't fit all of the columns in a dataframe, column will try to smush data on the rows below. This results in an unpleasant viewing experience.
|
246 | 250 |
|
247 | 251 | `tv` can automatically tell when there will be too many columns to print. When this occurs it will only print the columns that fit in the terminal and mention the extras in the footer below the table.
|
248 | 252 |
|
249 |
| - |
| 253 | + |
| 254 | + |
| 255 | +# Help |
| 256 | + |
| 257 | +`tv --help` |
| 258 | + |
| 259 | +```txt |
| 260 | +tv 0.0.20 |
| 261 | +Tidy Viewer (tv) is a csv pretty printer that uses column styling to maximize viewer enjoyment.✨✨📺✨✨ |
250 | 262 |
|
| 263 | + Example Usage: |
| 264 | + wget https://raw.githubusercontent.com/tidyverse/ggplot2/master/data-raw/diamonds.csv |
| 265 | + cat diamonds.csv | head -n 35 | tv |
| 266 | +
|
| 267 | +USAGE: |
| 268 | + tv [FLAGS] [OPTIONS] [FILE] |
| 269 | +
|
| 270 | +FLAGS: |
| 271 | + -d, --debug-mode Print object details to make it easier for the maintainer to find and resolve bugs. |
| 272 | + -h, --help Prints help information |
| 273 | + -V, --version Prints version information |
| 274 | +
|
| 275 | +OPTIONS: |
| 276 | + -c, --color <color> |
| 277 | + There are 4 colors (1)nord, (2)one_dark, (3)gruvbox, and (4)dracula. An input of (0)bw will remove color |
| 278 | + properties. Note that colors will make it difficult to pipe output to other utilities [default: 1] |
| 279 | + -s, --delimiter <delimiter> The delimiter separating the columns. [default: ,] |
| 280 | + -f, --footer <footer> Add a title to your tv. Example 'footer info' [default: NA] |
| 281 | + -l, --lower-column-width <lower-column-width> |
| 282 | + The lower (minimum) width of columns. Must be 2 or larger. [default: 2] |
| 283 | +
|
| 284 | + -n, --number of rows to output <row-display> Show how many rows to display. [default: 25] |
| 285 | + -t, --title <title> Add a title to your tv. Example 'Test Data' [default: NA] |
| 286 | + -u, --upper-column-width <upper-column-width> The upper (maxiumum) width of columns. [default: 20] |
| 287 | +
|
| 288 | +ARGS: |
| 289 | + <FILE> File to process |
| 290 | +``` |
251 | 291 | # Inspiration
|
252 | 292 |
|
253 |
| -[pillar](https://pillar.r-lib.org/dev/articles/digits.html#trailing-dot-1) - R's tibble like formatting. Fantastic original work by [Kirill Müller](https://github.com/krlmlr) and [Hadley Wickham](http://hadley.nz/). `tv` makes an attempt to port their ideas to the terminal. |
| 293 | +[pillar](https://pillar.r-lib.org/dev/articles/digits.html#trailing-dot-1) - R's tibble like formatting. Fantastic original work by [Kirill Müller](https://github.com/krlmlr) and [Hadley Wickham](http://hadley.nz/). `tv` makes an attempt to port their ideas to the terminal. |
0 commit comments