What does HackerNews think of jc?
CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
If you're not already aware of it, you may wish to check out `jc`[0] which describes itself as a "CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq..."
The `jc` documentation[1] & parser[2] for `ls` also demonstrates that reliable & cross-platform parsing of even "basic" commands can be non-trivial.
[0] https://github.com/kellyjonbrazil/jc
[1] https://kellyjonbrazil.github.io/jc/docs/parsers/ls
[2] https://github.com/kellyjonbrazil/jc/blob/4cd721be8595db52b6...
https://github.com/multiprocessio/dsq
https://github.com/jqnatividad/qsv
https://csvkit.readthedocs.io/en/latest
https://github.com/kellyjonbrazil/jc
https://github.com/TomWright/dasel
https://github.com/johnkerl/miller
...
It's an attempt to do this from outside the house.
Very interesting project that helps with that is https://wiki.freebsd.org/LibXo
Meanwhile, there is jc so that
jc df
returns JSON. See https://github.com/kellyjonbrazil/jc
Hope this helps.
I looked a little harder and then found jc[1] which made parsing the ini file easy, and since I didn't need full CRUD support I threw my hands up and used that instead. I _would_ like to find a fast and easy way to convert json/yaml to simple INI file syntax at the command line, or do idempotent modifications to the INI files without writing a command where 99% of it is describing to jq or awk what an INI file looks like.