Skip to content

Commit 931b14a

Browse files
authored
prep for next release (#85)
* prep for next release * make images look a little better * small image change
1 parent 9e24a1d commit 931b14a

16 files changed

+68
-13
lines changed

CHANGELOG.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
0.0.14 (2021-09-29)
1+
0.0.20 (2021-10-02)
22
==================
33

4+
* **Feature 1** Detect floats with `f64::from_str`
5+
* **Feature 2** Add the ability to pass file as argument. Not just stdin only.
6+
* [bug #75](https://github.com/alexhallam/tv/issues/75):
7+
Cut space from really long doubles.
8+
* [bug #25](https://github.com/alexhallam/tv/issues/25):
9+
Exponential notation is not captured as a float. Fixed with above feature 1.
10+
11+
We also saw some code quality improvements in this release. [PR #82](https://github.com/alexhallam/tv/pull/82)
12+
13+
14+
0.0.19 (2021-09-29)
15+
==================
16+
17+
The version number jump was due to testing out github actions on automated releases using git tags as the release name. It took a few tries to get right.
18+
419
* **Feature 1** Add package to snapcraft to increase accessibility.
5-
* [BUG #55](https://github.com/alexhallam/tv/issues/55):
6-
Fix panic on Unicode string truncation
20+
* [bug #55](https://github.com/alexhallam/tv/issues/55):
21+
fix panic on unicode string truncation
722
* [BUG #40](https://github.com/alexhallam/tv/issues/30):
823
Remove trailing comma.
924
* [BUG #48](https://github.com/alexhallam/tv/issues/48):

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "Unlicense/MIT"
88
name = "tidy-viewer"
99
readme = "README.md"
1010
repository = "https://github.com/alexhallam/tv"
11-
version = "0.0.19"
11+
version = "0.0.20"
1212

1313
[package.metadata.deb]
1414
assets = [

README.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![Rust](https://github.com/alexhallam/tv/actions/workflows/rust.yml/badge.svg)](https://github.com/alexhallam/tv/actions/workflows/rust.yml)
22
[![Crate](https://img.shields.io/crates/v/tidy-viewer.svg)](https://crates.io/crates/tidy-viewer)
3-
<img alt="Crates.io (recent)" src="https://img.shields.io/crates/dr/tidy-viewer">
43

54
<h1 align="center">Tidy Viewer (tv)</h1>
65
<p align="center">Tidy Viewer (tv) is a cross-platform csv pretty printer that uses column styling to maximize viewer enjoyment.</p>
@@ -9,9 +8,12 @@
98

109
# Pretty Printing
1110

12-
[![asciicast](https://asciinema.org/a/NUlqhMkFLyfxCeU6mea7YuHHX.svg)](https://asciinema.org/a/NUlqhMkFLyfxCeU6mea7YuHHX)
11+
![example](img/main.png)
12+
13+
### Starwars
14+
15+
![example](img/starwars.png)
1316

14-
![example](img/screen_shot_index.png)
1517

1618
# Installation
1719

@@ -108,7 +110,9 @@ cat pigeon-racing.csv | tv
108110

109111
# Significant Figure Definitions & Rules
110112

111-
[![asciicast](https://asciinema.org/a/YvXpj0faFX91ahr2URMq0ZbBj.svg)](https://asciinema.org/a/YvXpj0faFX91ahr2URMq0ZbBj)
113+
![example](img/sigs.png)
114+
115+
![example](img/long_double.png)
112116

113117
> The first three digits represent > 99.9% the value of a number. -- GNU-R Pillar
114118
@@ -238,16 +242,52 @@ Though `column` is similar I do think there are some reasons `tv` is a better to
238242

239243
`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.
240244

241-
![na_comp](img/column_v_tv1.png)
245+
![na_comp](img/pigeon-racing.png)
242246

243247
## 2. Column Overflow Logic
244248

245249
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.
246250

247251
`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.
248252

249-
![na_comp](img/column_v_tv2.png)
253+
![overflow](img/pigeon-racing.png)
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.✨✨📺✨✨
250262
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+
```
251291
# Inspiration
252292

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.

img/column_v_tv1.png

-307 KB
Binary file not shown.

img/column_v_tv2.png

-159 KB
Binary file not shown.

img/ellipsis.png

59.4 KB
Loading

img/long_double.png

28.3 KB
Loading

img/main.png

86.6 KB
Loading

img/overflow.png

223 KB
Loading

img/pigeon-racing.png

200 KB
Loading

img/screen_shot_index.png

-161 KB
Loading

img/sigs.png

44.1 KB
Loading

img/starwars.png

213 KB
Loading

img/titanic.png

186 KB
Loading

src/datatype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub fn infer_type_from_string(text: &str) -> ValueType {
106106
ValueType::Double
107107
} else if text.is_empty() | is_na(text) {
108108
ValueType::Na
109-
} else{
109+
} else {
110110
ValueType::Character
111111
}
112112
}

0 commit comments

Comments
 (0)