[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#962239: RFP: jc -- converts command output to JSON



Package: wnpp
Severity: wishlist

I am the developer of jc, which is now packaged on OpenSUSE, NixOS, macOS (Homebrew), and FreeBSD (ports). jc is currently in process for packaging on Fedora.

jc is licensed under the MIT license.

https://github.com/kellyjonbrazil/jc
https://pypi.org/project/jc/

JSON CLI output utility

jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. This allows further command-line processing of output with tools like jq by piping commands:

$ ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)'
{
  "filename": "docker",
  "flags": "-rwxr-xr-x",
  "links": 1,
  "owner": "root",
  "group": "root",
  "size": 68677120,
  "date": "Aug 14 19:41"
}

or using the alternative "magic" syntax:

$ jc ls -l /usr/bin | jq '.[] | select(.size > 50000000)'
{
  "filename": "docker",
  "flags": "-rwxr-xr-x",
  "links": 1,
  "owner": "root",
  "group": "root",
  "size": 68677120,
  "date": "Aug 14 19:41"
}

Thank you,
Kelly Brazil

Reply to: