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.

MIT License

Downloads
289.2K
Stars
7.5K
Committers
46

Bot releases are hidden (Show)

jc - JC version 1.21.0

Published by kellyjonbrazil about 2 years ago

  • Add --meta-out or -M option to add metadata to the JSON output, including a UTC timestamp, parser name, magic command, and magic command exit code
  • Add IP Address string parser
  • Add Syslog standard and streaming string parsers (RFC 3164 and RFC 5424)
  • Add CEF standard and streaming string parsers
  • Add PLIST file parser (XML and binary support)
  • Add mdadm command parser tested on linux
  • Add -n support to the traceroute parser
  • Fix lsusb command parser for output containing a Device Qualifier and
    Binary Object Store Descriptor sections
  • Change LANG=C to LC_ALL=C in locale instructions
  • Add __main__.py to package allowing python -m jc usage
  • Add an enclosing top-level folder inside the windows.zip package

Release notes: https://blog.kellybrazil.com/2022/08/21/jc-version-1-21-0-released/

jc - JC version 1.20.4

Published by kellyjonbrazil about 2 years ago

20220723 v1.20.4

  • Fix URL string parser path list for URLs ending in a forward slash

20220723 v1.20.3

  • Add URL string parser
  • Add Email Address string parser
  • Add JWT string parser
  • Add ISO 8601 Datetime string parser
  • Add UNIX Epoch Timestamp string parser
  • Add M3U/M3U8 file parser
  • Add pager functionality to help (parser documentation only)
  • Minor parser performance optimizations

Release Notes: https://blog.kellybrazil.com/2022/05/31/jc-version-1-20-0-released/

jc - JC version 1.20.2

Published by kellyjonbrazil over 2 years ago

  • Add gpg --with-colons parser tested on linux
  • Add DER and PEM encoded X.509 Certificate parser
  • Add Bash and Zsh completion scripts to DEB and RPM packages

Release notes: https://blog.kellybrazil.com/2022/05/31/jc-version-1-20-0-released/

jc - JC version 1.20.1

Published by kellyjonbrazil over 2 years ago

  • Add postconf -M parser tested on linux
  • Update asciitable and asciitable-m parsers to preserve case in key names when using the -r or raw=True options.
  • Add long options (e.g. --help, --about, --pretty, etc.)
  • Add shell completions for Bash and Zsh
  • Fix id parser for cases where the user or group name is not present

Release Notes: https://blog.kellybrazil.com/2022/05/31/jc-version-1-20-0-released/

jc - JC version 1.20.0

Published by kellyjonbrazil over 2 years ago

  • Add YAML output option with -y
  • Add top -b standard and streaming parsers tested on linux
  • Add plugin_parser_count, standard_parser_count, and streaming_parser_count
    keys to jc -a output
  • Add is_compatible function to the utils module
  • Fix pip-show parser for packages with a multi-line license field
  • Fix ASCII Table parser for cases where centered headers cause mis-aligned fields

Release Notes: https://blog.kellybrazil.com/2022/05/31/jc-version-1-20-0-released/

jc - JC version 1.19.0

Published by kellyjonbrazil over 2 years ago

jc now comes bundled with 100 parsers!

  • Add chage --list command parser tested on linux
  • Add git log command streaming parser
  • Fix git log standard parser for corner-cases where hash values are in messages
  • Fix df command parser for rare instances when a newline is found at the end
  • Allow jc to pip install on unsupported python version 3.6
  • Fix asciitable-m parser to skip some rows that contain column separator
    characters in cell data. A warning message will be printed to STDERR
    unless -q or quiet=True is used.
  • New zip package for Windows

Release Notes: https://blog.kellybrazil.com/2022/05/17/jc-version-1-19-0-released/

jc - JC version 1.18.8

Published by kellyjonbrazil over 2 years ago

  • Fix update-alternatives --query parser for cases where slaves are not present
  • Fix UnicodeEncodeError on some systems where LANG=C is set and unicode characters are in the output
  • Update history parser: do not drop non-ASCII characters if the system is configured for UTF-8 encoding
  • Enhance "magic syntax" to always use UTF-8 encoding

Updates from v1.18.7

  • Add git log command parser
  • Add update-alternatives --query parser
  • Add update-alternatives --get-selections parser
  • Fix key/value and INI parsers to allow duplicate keys
  • Fix YAML file parser for files including timestamp objects
  • Update xrandr parser: add a rotation field
  • Fix failing tests by moving template files
  • Add python interpreter version and path to -v and -a output
jc - JC version 1.18.6

Published by kellyjonbrazil over 2 years ago

  • Add pidstat command parser tested on linux
  • Add pidstat command streaming parser tested on linux
  • Add mpstat command parser tested on linux
  • Add mpstat command streaming parser tested on linux
  • Add single-line ASCII and Unicode table parser
  • Add multi-line ASCII and Unicode table parser
  • Add documentation option to parser_info() and all_parser_info()

Release notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.18.5

Published by kellyjonbrazil over 2 years ago

  • Fix date parser to ensure AM/PM period string is always uppercase. This fixes tests that would fail on some locales.

Release notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.18.4

Published by kellyjonbrazil over 2 years ago

  • Add nmcli command parser tested on linux
  • Enhance parse error messages at the cli
  • Add standard and streaming parser list functions to the public API
  • Enhance python developer documentation formatting

Release notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.18.3

Published by kellyjonbrazil over 2 years ago

  • Add rsync command and log file parser tested on linux and macOS
  • Add rsync command and log file streaming parser tested on linux and macOS
  • Add xrandr command parser tested on linux
  • Enhance timestamp performance with caching and format hints
  • Refactor ignore_exceptions functionality in streaming parsers
  • Fix man page in packages

Release notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.18.2

Published by kellyjonbrazil over 2 years ago

  • Fix for plugin parsers with underscores in the name
  • Add type hints to public API functions
  • Add plugin attribute to plugin parser metadata
  • Add C locale hint to parsing error messages
  • Refactor more cli code into lib

Release notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.18.1

Published by kellyjonbrazil over 2 years ago

  • Add high-level parse API for built-in and plugin parsers
  • Add python module developer documentation
  • Enhance magic syntax exception messages
  • Enhance documentation formatting

Release Notes: https://blog.kellybrazil.com/2022/01/27/jc-version-1-18-1-released/

jc - JC version 1.17.6

Published by kellyjonbrazil almost 3 years ago

  • Add jar-manifest file parser (for MANIFEST.MF files)
  • Fix CSV parsers for some files that include doublequotes

Release Notes: https://blog.kellybrazil.com/2021/09/26/jc-version-1-17-0-released/

jc - JC version 1.17.5

Published by kellyjonbrazil almost 3 years ago

  • Add zipinfo parser tested on linux and macOS

Release notes: https://blog.kellybrazil.com/2021/09/26/jc-version-1-17-0-released/

jc - JC version 1.17.4

Published by kellyjonbrazil almost 3 years ago

  • Add support for the NO_COLOR environment variable to set mono (http://no-color.org/)
  • Add -C option to force color output even when using pipes (overrides -m and NO_COLOR)

Release notes: https://blog.kellybrazil.com/2021/09/26/jc-version-1-17-0-released/

jc - JC version 1.17.3

Published by kellyjonbrazil almost 3 years ago

  • Update parsers to exit with error if non-string input is detected (raise TypeError)
  • Update streaming parsers to exit with error if non-iterable input is detected (raise TypeError)
  • Simplify quiet-checking in parsers
  • Add iostat parser tested on linux
  • Add iostat streaming parser tested on linux

Release Notes: https://blog.kellybrazil.com/2021/09/26/jc-version-1-17-0-released/

jc - JC version 1.17.1

Published by kellyjonbrazil almost 3 years ago

  • Fix file parser for gzip files
  • Fix uname parser for cases where the 'processor' and/or 'hardware_platform' fields are missing on linux
  • Fix uname parser on FreeBSD
  • Add lsusb parser tested on linux
  • Add CSV file streaming parser
  • Add testing for Python 3.10.0

Release Notes

jc - JC version 1.17.0

Published by kellyjonbrazil about 3 years ago

  • Add wrapping of warning and error messages
  • Add vmstat parser tested on linux
  • Add support for streaming parsers
  • Add ls -l command streaming parser tested on linux, macOS, and freeBSD
  • Add ping and ping6 command streaming parser tested on linux, macOS, and freeBSD
  • Add vmstat command streaming parser tested on linux
  • Add -u option to allow unbuffered output

Release Notes

jc - JC version 1.16.1

Published by kellyjonbrazil about 3 years ago

  • Fix issue with process substitution with the magic syntax
  • Fix issue with globs not including filenames with spaces with magic syntax
  • Fix stat parser to properly handle filenames with spaces on macOS/BSD