idea>> tv>> 返回
项目作者: uzimaru0000

项目描述 :
Format json into table view
高级语言: Rust
项目地址: git://github.com/uzimaru0000/tv.git
创建时间: 2021-08-26T03:43:23Z
项目社区:https://github.com/uzimaru0000/tv

开源协议:MIT License

下载


:tv: tv



Format json into table view



How to install

For MacOS

  1. $ brew install uzimaru0000/tap/tv

Use cargo

  1. $ cargo install tv-cli

How to use

USAGE

  1. tv [FLAGS] [OPTIONS] [PATH]

FLAGS

  1. -h, --help Prints help information
  2. --no-headers Specify that the input has no header row
  3. -r, --recursive Recursive display
  4. -V, --version Prints version information

OPTIONS

  1. -a, --align <left | center | right | none> Table alignment [default: none]
  2. -s, --sort <SORT_KEY> Options for sorting by key
  3. --style <ascii | sharp | rounded | markdown | plain> Table style [default: ascii]

ARGS

  1. <PATH> json file path

Example

  1. $ cat example.json
  2. [
  3. {
  4. "id": 1,
  5. "name": "Leanne Graham",
  6. "username": "Bret",
  7. "email": "Sincere@april.biz",
  8. "address": {
  9. "street": "Kulas Light",
  10. "suite": "Apt. 556",
  11. "city": "Gwenborough",
  12. "zipcode": "92998-3874",
  13. "geo": {
  14. "lat": "-37.3159",
  15. "lng": "81.1496"
  16. }
  17. },
  18. "phone": "1-770-736-8031 x56442",
  19. "website": "hildegard.org",
  20. "company": {
  21. "name": "Romaguera-Crona",
  22. "catchPhrase": "Multi-layered client-server neural-net",
  23. "bs": "harness real-time e-markets"
  24. }
  25. },
  26. ...
  27. ]
  28. $ tv example.json
  29. +--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
  30. |id|name |username |email |address|phone |website |company|
  31. +--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
  32. |1 |Leanne Graham |Bret |Sincere@april.biz |... |1-770-736-8031 x56442|hildegard.org|... |
  33. |2 |Ervin Howell |Antonette |Shanna@melissa.tv |... |010-692-6593 x09125 |anastasia.net|... |
  34. |3 |Clementine Bauch |Samantha |Nathan@yesenia.net |... |1-463-123-4447 |ramiro.info |... |
  35. |4 |Patricia Lebsack |Karianne |Julianne.OConner@kory.org|... |493-170-9623 x156 |kale.biz |... |
  36. |5 |Chelsey Dietrich |Kamren |Lucio_Hettinger@annie.ca |... |(254)954-1289 |demarco.info |... |
  37. |6 |Mrs. Dennis Schulist |Leopoldo_Corkery|Karley_Dach@jasper.info |... |1-477-935-8478 x6430 |ola.org |... |
  38. |7 |Kurtis Weissnat |Elwyn.Skiles |Telly.Hoeger@billy.biz |... |210.067.6132 |elvis.io |... |
  39. |8 |Nicholas Runolfsdottir V|Maxime_Nienow |Sherwood@rosamond.me |... |586.493.6943 x140 |jacynthe.com |... |
  40. |9 |Glenna Reichert |Delphine |Chaim_McDermott@dana.io |... |(775)976-6794 x41206 |conrad.com |... |
  41. |10|Clementina DuBuque |Moriah.Stanton |Rey.Padberg@karina.biz |... |024-648-3804 |ambrose.net |... |
  42. +--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+