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.25.3 Latest Release

Published by kellyjonbrazil 4 months ago

  • Enhance bluetoothctl parser with added battery_percentage field
  • Enhance git-log standard and streaming parsers with added lines_changed field under file_stats
  • Fix pci-ids parser to correctly handle multiple subdevices
  • Fix pip-show parser to handle multi-line fields with a beginning blank line
  • Fix ss parser to correctly handle the Recv-Q field being too close to the Status field
  • Fix top parsers to quiet uptime info parsing
  • Fix traceroute parser to correctly handle hops with multiple IPs
  • Fix zpool-status parser for config items lacking data values
  • Optimize some tests by removing timezone settings and using quiet=True
  • Documentation updates
jc - JC version 1.25.2

Published by kellyjonbrazil 7 months ago

  • Add apt-cache-show command parser
  • Add apt-get-sqq command parser
  • Add ethtool command parser
  • Add needrestart command parser
  • Enhance df parser to add human readable output support. Note: the size
    field has been changed to an integer and all size values have been normalized
    to bytes.
  • Enhance free parser to add human readable output support. All size values
    have been normalizd to bytes.
  • Enhance iptables parser to handle -x output
  • Enhance /proc/pid/stat parser to support "Idle" state
  • Enhance rpm_qi and pkg_index_deb parsers to split list fields into arrays
  • Fix iwconfig parser to handle more special characters in the SSID name
  • Fix xrandr parser to ignore extra horizontal and vertical stats lines
  • Add aarch64 binaries to Releases for macOS and Linux
  • Documentation and doc build updates
jc - JC version 1.25.1

Published by kellyjonbrazil 8 months ago

  • Fix for crash when optional libraries are not installed (e.g. xmltodict)
  • Fix for ini parser crashing with some keys with no values
  • Fix xrandr parser to extract more EDID data
  • Enhance uptime parser to support output with no user information
  • Enhance --quiet CLI option to cover more warning messages
  • Add tests for missing optional libraries
  • Documentation updates
jc - JC version 1.25.0

Published by kellyjonbrazil 9 months ago

  • Add --slurp functionality to wrap output from multiple lines into a single array.
    Note, this only works with single-line input parsers. (e.g. date, ip-address, url, etc.)
    Streaming parsers are not supported. Use jc -hhh to find parsers compatible with the slurp option.
  • Enhance /proc file magic syntax to allow slurping when multiple files are selected
    and to include the _file metadata field in the data
  • Enhance --meta-out functionality to include a list of the input data when using --slurp
    or /proc file magic syntax. For slurpable parsers, this is a list of string inputs in order.
    For /proc file magic syntax, this is a list of /proc filenames in order. This can help with
    identifying which input matches to which output when using --slurp or when converting multiple
    files via /proc file magic syntax.
  • Add curl-head command parser for curl --head or curl -I with verbose support
  • Add efibootmgr command parser
  • Add http-headers parser for plain HTTP header output
  • Add kv-dup parser for Key/Value files with duplicate keys
  • Add path string parser to parse posix path
  • Add path-list string parser to parse path list strings found in env variables
  • Add source link to online parser documentation
  • Add snap package build scripts
  • Add remove_quotes function to utils.py
  • Add normalize_key function to utils.py
  • Add line_slice function to utils.py
  • Add get_parser function to lib.py
  • Enhance nsd-control parser to support more zone information
  • Enhance ping and ping-s parsers to support the -I command option
  • Enhance proc-net-tcp parser to add opposite endian support for architectures
    like the s390x
  • Enhance url parser to add parent, filename, stem, and extension fields
  • Fix ini and ini-dup parsers to consistently handle null values as empty strings
  • Fix line slicer to not skip blank lines
  • Refactor parser aliases for kv, pkg_index_deb, lsb_release, and os-release
  • Update copyright date
jc - JC version 1.24.0

Published by kellyjonbrazil 10 months ago

  • Add debconf-show command parser
  • Add iftop command parser
  • Add pkg-index-apk parser for Alpine Linux Package Index files
  • Add pkg-index-deb parser for Debian/Ubuntu Package Index files
  • Add proc-cmdline parser for /proc/cmdline file
  • Add swapon command parser
  • Add tune2fs command parser
  • Remove iso-datetime parser deprecated since v1.22.1. (use datetime-iso instead)
  • Update timezone change in Github Actions for node v16 requirement
  • Add Python 3.12 tests to Github Actions
  • Refactor acpi command parser for code cleanup
  • Refactor vendored libraries to remove Python 2 support
  • Fix iptables parser for cases where the target field is blank in a rule
  • Fix vmstat parsers for some cases where wide output is used
  • Fix mount parser for cases with spaces in the mount point name
  • Fix xrandr parser for infinite loop issues
jc - JC version 1.23.6

Published by kellyjonbrazil 12 months ago

  • Fix XML parser for xmltodict library versions < 0.13.0
  • Fix who command parser for cases when the from field contains spaces
jc - JC version 1.23.5

Published by kellyjonbrazil 12 months ago

  • Add host command parser
  • Add nsd-control command parser
  • Add lsb_release command parser
  • Add /etc/os-release file parser
  • Enhance env command parser to support multi-line values
  • Enhance ping and ping-s parsers to add error and corrupted support
  • Enhance xml parser to include comments in the JSON output
  • Fix pidstat command parser when using -T ALL
  • Fix x509-cert parser to allow negative serial numbers
  • Fix x509-cert parser for cases when bitstrings are larger than standard
  • Fix xrandr command parser for associated device issues
  • Fix error when pygments library is not installed
jc - JC version 1.23.4

Published by kellyjonbrazil about 1 year ago

  • Add /etc/resolve.conf file parser
  • Add /proc/net/tcp and /proc/net/tcp6 file parser
  • Add find command parser
  • Add ip route command parser
  • Fix certbot command parser to be more robust with different line endings
jc - JC version 1.23.3

Published by kellyjonbrazil over 1 year ago

  • Add lsattr command parser
  • Add srt file parser
  • Add veracrypt command parser
  • Add X509 Certificate Request file parser
  • Enhance X509 Certificate parser to allow non-compliant email addresses with a warning
  • Enhance dig command parser to support the +nsid option
  • Enhance last and lastb command parser to support the -x option
  • Enhance route command parser to add Windows support
  • Enhnace netstat command parser to add Windows support
  • Enhance ss command parser to support extended options
  • Enhance the compatibility warning message
  • Fix bluetoothctl command parser for some mouse devices
  • Fix ping command parsers for output with missing hostname
  • Fix stat command parser for older versions that may not contain all fields
  • Fix deprecated option in setup.cfg
jc - JC version 1.23.2

Published by kellyjonbrazil over 1 year ago

  • Add bluetoothctl command parser
  • Add certbot command parser for certificates and show_account options
  • Fix acpi command parser for "Not charging" battery status lines
  • Fix iwconfig command parser for SSIDs with dashes in the name
  • Fix crontab command parsers for incorrect variable parsing in some cases
  • Fix git-log and git-log-s command parsers for incorrect insertion/deletion parsing
  • Fix ufw-appinfo command parser for parsing errors on multiline description fields
  • Fix pytest warnings
jc - JC version 1.23.1

Published by kellyjonbrazil over 1 year ago

  • Fix zpool-status command parser for lines that start with tab
  • Fix timedatectl command parser when RTC set to local
  • Fix to ensure py.typed file is included in the package wheel
  • Fix lsusb command parser to support CDC MBIM and CDC MBIM Extended fields
  • Add support for the timesync-status for the timedatectl command parser
  • Fix to ignore non-parser-plugins in the parser plugin directory
jc - JC version 1.23.0

Published by kellyjonbrazil over 1 year ago

  • Add input slicing as a jc command-line option
  • Add ssh configuration file parser
  • Add ver Version string parser
  • Add zpool iostat command parser
  • Add zpool status command parser
  • Fix acpi command parser for "will never fully discharge" battery state
  • Fix crontab and crontab-u command and file parsers for cases where only
    shortcut schedule items exist
  • Fix ifconfig command parser for older-style linux output
  • Fix xrandr command parser for proper is_current output
  • Fix xrandr command parser for infinite loop with some device configurations
  • Add reflection key to xrandr parser schema
  • Add display model info from EDID to xrandr parser
  • Add MPX-specific VMA support for VM Flags in /proc/<pid>/smaps parser
jc - JC version 1.22.5

Published by kellyjonbrazil almost 2 years ago

  • Add TOML file parser
  • Add INI with duplicate key support file parser
  • Add AIX support for the arp command parser
  • Add AIX support for the mount command parser
  • Fix lsusb command parser when extra hub port status information is output
  • Refactor lsusb command parser for more code reuse
  • Fix INI file parser to include top-level values with no section header
  • Fix INI file parser to not specially handle the [DEFAULT] section
  • Fix INI file and Key/Value parsers to only remove one quotation mark from the
    beginning and end of values.
  • Update copyright dates
jc - JC version 1.22.4

Published by kellyjonbrazil almost 2 years ago

  • Add iwconfig command parser
  • Add NeXTSTEP format support to the PLIST file parser
  • Fix proc parser magic signature detection for /proc/pid/stat hacks
  • Fix x509-cert parser for string serial numbers
  • Add category tags to parser metadata: generic, standard, file, string, binary, command
  • Add "list parsers by category" view to help
  • Fix python 3.6-related issues
  • Add python 3.6 to automated tests

Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released

jc - JC version 1.22.3

Published by kellyjonbrazil almost 2 years ago

  • Add Common Log Format and Combined Log Format file parser (standard and streaming)
  • Add PostgreSQL password file parser
  • Add openvpn-status.log file parser
  • Add cbt command parser (Google Big Table)
  • Enhance ifconfig parser with interface lane information on BSD
  • Enhance ifconfig parser with additional IPv6 scope_id info for BSD
  • Fix ifconfig parser to capture some IPv6 addresses missed on BSD
  • Fix git-log and git-log-s parsers for failure on empty author name
  • Update os-prober parser with split EFI partition fields
  • Add ISO string attribute (.iso) to jc.utils.timestamp()
  • Fix several documentation typos

Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released/

jc - JC version 1.22.2

Published by kellyjonbrazil almost 2 years ago

  • add sshd-conf parser for sshd configuration files and sshd -T output
  • add findmnt command parser
  • add git ls-remote command parser
  • add os-prober command parser
  • add SemVer string parser
  • enhance the ifconfig parser so it can output multiple IPv4 and IPv6 addresses
  • enhance the ifconfig parser so it can output additional fields common on BSD
  • enhance xml parser with optional _ prefix for attributes instead of
    @ by using the --raw option. This can make it easier to filter the
    JSON output in some tools.
  • fix the xml parser to output a normal Dictionary instead of OrderdDict.
    This cleans up YAML output. (No !!omap comments)
  • fix csv and csv-s parsers for UTF-8 encoded CSV files with leading BOM bytes
  • fix exit code to be non-zero on interrupt
  • allow parser module objects to be used as arguments to jc.get_help() and jc.parser_info()
  • catch unexpected exceptions in the CLI
  • add error message on interrupt to STDERR
  • add python 3.11 tests to github actions
  • fix XML parser in macOS binary

Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released

jc - JC version 1.22.1

Published by kellyjonbrazil almost 2 years ago

  • add udevadm command parser
  • add lspci command parser
  • add pci.ids file parser
  • fix proc-pid-stat parser for command names with spaces and newlines
  • enhance ip-address parser to add ip_split field
  • rename iso-datetime parser to datetime-iso. A deprecation warning will
    display until iso-datetime is removed in a future version.
  • refactor cli module
  • optimize performance of calculated timestamps
  • add more type annotations
  • add support for deprecating parsers
  • move jc-web demo site from heroku to render.com

Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released

jc - JC version 1.22.0

Published by kellyjonbrazil about 2 years ago

  • Add /proc file parsers for linux. Support for the following files:
    /proc/buddyinfo
    /proc/consoles
    /proc/cpuinfo
    /proc/crypto
    /proc/devices
    /proc/diskstats
    /proc/filesystems
    /proc/interrupts
    /proc/iomem
    /proc/ioports
    /proc/loadavg
    /proc/locks
    /proc/meminfo
    /proc/modules
    /proc/mtrr
    /proc/pagetypeinfo
    /proc/partitions
    /proc/slabinfo
    /proc/softirqs
    /proc/stat
    /proc/swaps
    /proc/uptime
    /proc/version
    /proc/vmallocinfo
    /proc/vmstat
    /proc/zoneinfo
    /proc/driver/rtc
    /proc/net/arp
    /proc/net/dev
    /proc/net/dev_mcast
    /proc/net/if_inet6
    /proc/net/igmp
    /proc/net/igmp6
    /proc/net/ipv6_route
    /proc/net/netlink
    /proc/net/netstat
    /proc/net/packet
    /proc/net/protocols
    /proc/net/route
    /proc/net/unix
    /proc/<pid>/fdinfo/<fd>
    /proc/<pid>/io
    /proc/<pid>/maps
    /proc/<pid>/mountinfo
    /proc/<pid>/numa_maps
    /proc/<pid>/smaps
    /proc/<pid>/stat
    /proc/<pid>/statm
    /proc/<pid>/status
  • Magic syntax support for /proc files
  • Enhance bash and zsh autocompletions for /proc files
  • Enhance free parser to support -w option integer conversions
  • Fix ini and kv parsers so they don't change keynames to lower case
    NOTE: This can be a breaking change in your scripts
  • Fix id command parser to allow usernames and groupnames with spaces
  • Enhance metadata output to output metadata even when results are empty
  • Optimize tests
  • Optimize documentation build script

Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released/

jc - JC version 1.21.2

Published by kellyjonbrazil about 2 years ago

  • Fix IP Address string parser for older python versions that don't cleanly accept decimal input format - IPv6 fix (e.g. python 3.6)
jc - JC version 1.21.1

Published by kellyjonbrazil about 2 years ago

  • Fix IP Address string parser for older python versions that don't cleanly accept decimal input format (e.g. python 3.6)
  • Fix arp -a parser for cases where incomplete hardware addresses are found in the arp table on linux