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.
jc
command-line optionssh
configuration file parserver
Version string parserzpool iostat
command parserzpool status
command parseracpi
command parser for "will never fully discharge" battery statecrontab
and crontab-u
command and file parsers for cases where only
shortcut schedule items existifconfig
command parser for older-style linux outputxrandr
command parser for proper is_current
outputxrandr
command parser for infinite loop with some device configurationsreflection
key to xrandr
parser schemaxrandr
parserMPX-specific VMA
support for VM Flags in /proc/<pid>/smaps
parserarp
command parsermount
command parserlsusb
command parser when extra hub port status information is outputlsusb
command parser for more code reuseiwconfig
command parserproc
parser magic signature detection for /proc/pid/stat
hacksx509-cert
parser for string serial numbersRelease Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released
openvpn-status.log
file parsercbt
command parser (Google Big Table)ifconfig
parser with interface lane information on BSDifconfig
parser with additional IPv6 scope_id
info for BSDifconfig
parser to capture some IPv6 addresses missed on BSDgit-log
and git-log-s
parsers for failure on empty author nameos-prober
parser with split EFI partition fields.iso
) to jc.utils.timestamp()
Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released/
sshd-conf
parser for sshd
configuration files and sshd -T
outputfindmnt
command parsergit ls-remote
command parseros-prober
command parserifconfig
parser so it can output multiple IPv4 and IPv6 addressesifconfig
parser so it can output additional fields common on BSDxml
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.xml
parser to output a normal Dictionary instead of OrderdDict.
This cleans up YAML output. (No !!omap
comments)csv
and csv-s
parsers for UTF-8 encoded CSV files with leading BOM bytesjc.get_help()
and jc.parser_info()
Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released
udevadm
command parserlspci
command parserpci.ids
file parserproc-pid-stat
parser for command names with spaces and newlinesip-address
parser to add ip_split
fieldiso-datetime
parser to datetime-iso
. A deprecation warning will
display until iso-datetime
is removed in a future version.Release Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released
/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
/proc
files/proc
filesfree
parser to support -w
option integer conversionsini
and kv
parsers so they don't change keynames to lower case
NOTE: This can be a breaking change in your scriptsid
command parser to allow usernames and groupnames with spacesRelease Notes: https://blog.kellybrazil.com/2022/09/27/jc-version-1-22-0-released/
arp -a
parser for cases where incomplete hardware addresses are found in the arp table on linux--meta-out
or -M
option to add metadata to the JSON output, including a UTC timestamp, parser name, magic command, and magic command exit codemdadm
command parser tested on linux-n
support to the traceroute
parserlsusb
command parser for output containing a Device Qualifier
and
Binary Object Store Descriptor
sectionsLANG=C
to LC_ALL=C
in locale instructions__main__.py
to package allowing python -m jc
usageRelease notes: https://blog.kellybrazil.com/2022/08/21/jc-version-1-21-0-released/