https://github.com/uzimaru0000/tv
Format json into table view
https://github.com/uzimaru0000/tv
cli json rust table terminal tool viewer
Last synced: 11 months ago
JSON representation
Format json into table view
- Host: GitHub
- URL: https://github.com/uzimaru0000/tv
- Owner: uzimaru0000
- License: mit
- Created: 2021-08-26T03:43:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-24T06:49:11.000Z (over 4 years ago)
- Last Synced: 2024-10-09T23:09:45.152Z (over 1 year ago)
- Topics: cli, json, rust, table, terminal, tool, viewer
- Language: Rust
- Homepage:
- Size: 479 KB
- Stars: 344
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-for-oneliner - tv - A command to format JSON into table view (JSON / Open USP Tsukubai)
README
:tv: tv
Format json into table view
[](https://github.com/uzimaru0000/tv/blob/master/LICENSE)
[](https://github.com/uzimaru0000/tv/releases/latest)

## How to install
### For MacOS
```bash
$ brew install uzimaru0000/tap/tv
```
### Use cargo
```bash
$ cargo install tv-cli
```
## How to use
### USAGE
```
tv [FLAGS] [OPTIONS] [PATH]
```
### FLAGS
```
-h, --help Prints help information
--no-headers Specify that the input has no header row
-r, --recursive Recursive display
-V, --version Prints version information
```
### OPTIONS
```
-a, --align Table alignment [default: none]
-s, --sort Options for sorting by key
--style Table style [default: ascii]
```
### ARGS
```
json file path
```
### Example
```
$ cat example.json
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874",
"geo": {
"lat": "-37.3159",
"lng": "81.1496"
}
},
"phone": "1-770-736-8031 x56442",
"website": "hildegard.org",
"company": {
"name": "Romaguera-Crona",
"catchPhrase": "Multi-layered client-server neural-net",
"bs": "harness real-time e-markets"
}
},
...
]
$ tv example.json
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
|id|name |username |email |address|phone |website |company|
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
|1 |Leanne Graham |Bret |Sincere@april.biz |... |1-770-736-8031 x56442|hildegard.org|... |
|2 |Ervin Howell |Antonette |Shanna@melissa.tv |... |010-692-6593 x09125 |anastasia.net|... |
|3 |Clementine Bauch |Samantha |Nathan@yesenia.net |... |1-463-123-4447 |ramiro.info |... |
|4 |Patricia Lebsack |Karianne |Julianne.OConner@kory.org|... |493-170-9623 x156 |kale.biz |... |
|5 |Chelsey Dietrich |Kamren |Lucio_Hettinger@annie.ca |... |(254)954-1289 |demarco.info |... |
|6 |Mrs. Dennis Schulist |Leopoldo_Corkery|Karley_Dach@jasper.info |... |1-477-935-8478 x6430 |ola.org |... |
|7 |Kurtis Weissnat |Elwyn.Skiles |Telly.Hoeger@billy.biz |... |210.067.6132 |elvis.io |... |
|8 |Nicholas Runolfsdottir V|Maxime_Nienow |Sherwood@rosamond.me |... |586.493.6943 x140 |jacynthe.com |... |
|9 |Glenna Reichert |Delphine |Chaim_McDermott@dana.io |... |(775)976-6794 x41206 |conrad.com |... |
|10|Clementina DuBuque |Moriah.Stanton |Rey.Padberg@karina.biz |... |024-648-3804 |ambrose.net |... |
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
```