Skip to content

Commit

Permalink
Prep (#114)
Browse files Browse the repository at this point in the history
* update libs and rust edition

* add -a flag

* add more details in help

* add ci code

* upgrade to macOS-11 from macOS-latest

* remove rustup but update rust version

* prep new patch for new flag

* spelling

* add rustup in the right place
  • Loading branch information
alexhallam committed Nov 17, 2021
1 parent b430773 commit 3145b29
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 58 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
include:
- build: pinned
os: ubuntu-18.04
rust: 1.52.1
rust: 1.56.1
- build: stable
os: ubuntu-18.04
rust: stable
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
# /target/arm-unknown-linux-gnueabihf/debug/rg
target: arm-unknown-linux-gnueabihf
- build: macos
os: macos-latest
os: macOS-11
rust: nightly
- build: win-msvc
os: windows-2019
Expand All @@ -92,7 +92,7 @@ jobs:
ci/ubuntu-install-packages
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
if: matrix.os == 'macOS-11'
run: |
ci/macos-install-packages
Expand All @@ -116,6 +116,9 @@ jobs:
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
- name: Update rustup for edition 2021
run: rustup update stable

- name: Build tidy-viewer and all crates
run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
rust: nightly
target: arm-unknown-linux-gnueabihf
- build: macos
os: macos-latest
os: macOS-11
rust: nightly
target: x86_64-apple-darwin
- build: win-msvc
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
ci/ubuntu-install-packages
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
if: matrix.os == 'macOS-11'
run: |
ci/macos-install-packages
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
1.4.3 (2021-11-17)
==================

* **Feature 1** Added forced color flag for color pager support [Issue #112](https://github.com/alexhallam/tv/issues/112)

I was not aware of this until @ismaelgv opened the issue. `less -R` and `bat -p` can do color comprehension. In previous versions of `tv` we just stripped the color if the output was piped to programs like less. Now the user can override this behaviour with a `-a` flag.


1.4.2 (2021-10-28)
==================

Expand Down
52 changes: 24 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
authors = ["alexhallam <[email protected]>"]
categories = ["command-line-utilities"]
description = "Head, but for csvs and with color"
edition = "2018"
edition = "2021"
keywords = ["csv", "pretty-print", "data-viewer", "tv", "tabular-data-viewer"]
license = "Unlicense/MIT"
name = "tidy-viewer"
readme = "README.md"
repository = "https://github.com/alexhallam/tv"
version = "1.4.2"
version = "1.4.3"

[package.metadata.deb]
assets = [
Expand All @@ -28,15 +28,14 @@ section = "utility"
[dependencies]
atty = "0.2.14"
calm_io = "0.1.1"
console = "0.14.1"
crossterm = "0.20.0"
console = "0.15.0"
crossterm = "0.22.1"
csv = "1.1.6"
directories = "4.0"
itertools = "0.10.0"
lazy_static = "1.4.0"
owo-colors = "1.3.0"
pad = "0.1"
regex = "1.4.5"
owo-colors = "3.0.1"
regex = "1.5.4"
serde = {version = "1.0", features = ["derive"]}
structopt = "0.3.21"
toml = "0.5"
Expand Down
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
![example](img/starwars.png)

# Contents
* [Featuers](#features)
* [Installation](#installation)
* [Examples](#examples)
* [Significant Figure Definitions & Rules](#significant-figure-definitions-and-rules)
Expand All @@ -21,6 +22,16 @@
* [Help](#help)
* [Inspiration](#inspiration)

# Features

1. Nice colors out of the box
2. Significant digit printing (no more decimal dust taking valuable terminal space)
3. NA comprehension and coloring (no more misaligned data cells due to missing data)
4. Dimensions printed first (no more guessing how many rows and columns are in the data)
5. Column overflow logic (no more misalignment do to terminal dimensions)
6. Long string/Unicode truncation (no more long strings pushing other data around)
7. Customizable with a dotfile config (bring your own theme)

# Installation

The following install options are available
Expand Down Expand Up @@ -295,7 +306,7 @@ For information on dotfile configuration see `tv --help`. This allows users to s
`tv --help`

```txt
tv 1.4.2
tv 1.4.3
Tidy Viewer (tv) is a csv pretty printer that uses column styling to maximize viewer enjoyment.✨✨📺✨✨
Example Usage:
Expand Down Expand Up @@ -335,12 +346,14 @@ Tidy Viewer (tv) is a csv pretty printer that uses column styling to maximize vi
#neg_num_color = [226, 125, 95]
USAGE:
tv [FLAGS] [OPTIONS] [FILE]
tidy-viewer [FLAGS] [OPTIONS] [FILE]
FLAGS:
-d, --debug-mode Print object details to make it easier for the maintainer to find and resolve bugs.
-h, --help Prints help information
-V, --version Prints version information
-d, --debug-mode Print object details to make it easier for the maintainer to find and resolve bugs.
-a, --color-always Always force color output. Example `tv -a starwars.csv | less -R` or `tv -a starwars.csv | bat
-p`. The `less` cli has the `-R` flag to parse colored output.
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --color <color>
Expand All @@ -359,6 +372,7 @@ OPTIONS:
The lower (minimum) width of columns. Must be 2 or larger. [default: 2]
-n, --number of rows to output <row-display> Show how many rows to display. [default: 25]
-g, --sigfig <sigfig> Significant Digits. Default 3. Max is 7 [default: 3]
-t, --title <title> Add a title to your tv. Example 'Test Data' [default: NA]
-u, --upper-column-width <upper-column-width> The upper (maxiumum) width of columns. [default: 20]
Expand Down
Loading

0 comments on commit 3145b29

Please sign in to comment.