An open API service indexing awesome lists of open source software.

https://github.com/dhth/tbll

tbll outputs data in tabular format
https://github.com/dhth/tbll

Last synced: 4 months ago
JSON representation

tbll outputs data in tabular format

Awesome Lists containing this project

README

          

# tbll

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/dhth/tbll/main.yml?style=flat-square)](https://github.com/dhth/tbll/actions)
[![Crates.io Version](https://img.shields.io/crates/v/tbll?style=flat-square)](https://crates.io/crates/tbll)
[![Latest Release](https://img.shields.io/github/release/dhth/tbll.svg?style=flat-square&label=github%20release)](https://github.com/dhth/tbll/releases/latest)
[![Commits Since Latest Release](https://img.shields.io/github/commits-since/dhth/tbll/latest?style=flat-square)](https://github.com/dhth/tbll/releases)

✨ Overview
---

`tbll` outputs data in tabular format.

```bash
cat << EOF | tbll
Movie,Year,Director,Genre
The Matrix,1999,Lana & Lilly Wachowski,Science Fiction
Fight Club,1999,David Fincher,Drama
Pulp Fiction,1994,Quentin Tarantino,Crime
The Shawshank Redemption,1994,Frank Darabont,Drama
Jurassic Park,1993,Steven Spielberg,Adventure
Forrest Gump,1994,Robert Zemeckis,Drama
EOF
```

```text
┌──────────────────────────┬──────┬────────────────────────┬─────────────────┐
│ Movie │ Year │ Director │ Genre │
├──────────────────────────┼──────┼────────────────────────┼─────────────────┤
│ The Matrix │ 1999 │ Lana & Lilly Wachowski │ Science Fiction │
│ Fight Club │ 1999 │ David Fincher │ Drama │
│ Pulp Fiction │ 1994 │ Quentin Tarantino │ Crime │
│ The Shawshank Redemption │ 1994 │ Frank Darabont │ Drama │
│ Jurassic Park │ 1993 │ Steven Spielberg │ Adventure │
│ Forrest Gump │ 1994 │ Robert Zemeckis │ Drama │
└──────────────────────────┴──────┴────────────────────────┴─────────────────┘
```

💾 Installation
---

**homebrew**:

```sh
brew install dhth/tap/tbll
```

**cargo**:

```sh
cargo install tbll
cargo install --git https://github.com/dhth/tbll.git
```

Or get the binaries directly from a Github [release][1]. Read more about
verifying the authenticity of released artifacts
[here](#-verifying-release-artifacts).

⚡️ Usage
---

### Help

```text
tbll outputs data in tabular format

Usage: tbll [OPTIONS]

Options:
-p, --input-path Input file path; tbll will read from stdin if this is not provided
-d, --delimiter Delimiter to use [default: ,]
--headers Command separated list of headers
-c, --cols Indices of columns (starting from zero) to display
-s, --style Border Style [default: sharp] [possible values: ascii, ascii-rounded, blank, dots, empty, extended, markdown, modern, modern-rounded, psql, re-structured-text, rounded, sharp]
-l, --left-pad Left padding for cells [default: 1]
-r, --right-pad Right padding for cells [default: 1]
-h, --help Print help
```

### Basic Usage

```bash
cat </dev/null | xargs)"
message,"$(git log -1 --pretty=format:'%B' 2>/dev/null | xargs)"
stat,"$(git diff HEAD~1..HEAD --shortstat 2>/dev/null | xargs)"
author,"$(git log -1 --pretty=format:'%ae' 2>/dev/null | xargs)"
EOF
```

```text
┌───────────┬────────────────────────────────────────────────────┐
│ attribute │ value │
├───────────┼────────────────────────────────────────────────────┤
│ event │ COMMIT_PUSHED │
│ system │ tbll │
│ env │ prod │
│ commit │ dfe3823 │
│ message │ chore(deps): bump clap from 4.5.27 to 4.5.31 (#19) │
│ stat │ 2 files changed, 7 insertions(+), 7 deletions(-) │
│ author │ 49699333+dependabot[bot]@users.noreply.github.com │
└───────────┴────────────────────────────────────────────────────┘
```

🔐 Verifying release artifacts
---

In case you get the `tbll` binary directly from a [release][1], you may want to
verify its authenticity. Checksums are applied to all released artifacts, and
the resulting checksum file is attested using [Github Attestations][2].

Steps to verify (replace `A.B.C` in the commands below with the version you
want):

1. Download the sha256 checksum file for your platform from the release:

```shell
curl -sSLO https://github.com/dhth/tbll/releases/download/vA.B.C/tbll-x86_64-unknown-linux-gnu.tar.xz.sha256
```

2. Verify the integrity of the checksum file using [gh][3].

```shell
gh attestation verify tbll-x86_64-unknown-linux-gnu.tar.xz.sha256 --repo dhth/tbll
```

3. Download the compressed archive you want, and validate its checksum:

```shell
curl -sSLO https://github.com/dhth/tbll/releases/download/vA.B.C/tbll-x86_64-unknown-linux-gnu.tar.xz
sha256sum --ignore-missing -c tbll-x86_64-unknown-linux-gnu.tar.xz.sha256
```

3. If checksum validation goes through, uncompress the archive:

```shell
tar -xzf tbll-x86_64-unknown-linux-gnu.tar.xz
./tbll
# profit!
```

[1]: https://github.com/dhth/tbll/releases
[2]: https://github.blog/news-insights/product-news/introducing-artifact-attestations-now-in-public-beta/
[3]: https://github.com/cli/cli