You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m happy to announce the release of jc version 1.13.1 available on github and pypi.
jc now supports over 55 commands and file-types, including the new ping, sysctl, traceroute, and tracepath command parsers. The INI file parser has been enhanced to support simple key/value text files and the route command parser now supports IPv6 tables.
Custom local parser plugins are now supported. This allows overriding existing parsers and rapid development of new parsers.
Other updates include verbose debugging, more consistent handling of empty data, and many parser fixes for FreeBSD.
jc can be installed via pip or through several new official OS package repositories, including Fedora, openSUSE, Arch Linux, NixOS Linux, Guix System Linux, FreeBSD, and macOS. For more information on how to get jc, click here.
To upgrade with pip:
$ pip3 install --upgrade jc
New Features
jc is now available on the official Fedora repository (dnf install jc)
jc is now available on the official Arch Linux repository (pacman -S jc)
jc is now available on the official NixOS repository (nix-env -iA nixpkgs.jc)
jc is now available on the official Guix System Linux repository (guix install jc)
jc is now available on the official FreeBSD ports repository (portsnap fetch update && cd /usr/ports/textproc/py-jc && make install clean)
jc is in process (Intent To Package) for Debian packaging.
Local custom parser plugins allow you to override packaged parsers or rapidly create your own.
Verbose debugging is now supported with the -dd command argument.
All parsers now correctly return empty objects when sent empty data.
Older versions of the pygments library (>=2.3.0) are now supported (for Debian packaging)
New Parsers
jc now supports 55 parsers. New parsers include ping, sysctl, tracepath, and traceroute.
Documentation and schemas for all parsers can be found here.
ping command parser
Linux, macOS, and FreeBSD support for the ping command:
There have been many parser updates since v1.11.0. The INI file parser has been enhanced to support files and output that contains simple key/value pairs. The route command parser has been enhanced to add support for IPv6 routing tables. The uname parser provides more intuitive debug messages and an issue in the iptables command parser was fixed, allowing it to convert the last row of a table. Many other parser enhancements including the consistent handling of blank input, FreeBSD support, and minor field additions and fixes are included.
Key/Value Pair Files with the INI File Parser
The INI file parser has been enhanced to now support files containing simple key/value pairs. Files can include comments prepended with # or ; and keys and values can be delimited by = or : with or without spaces. Quotation marks are stripped from quoted values, though they can be kept with the -r (raw output) jc argument.
These types of files can be found in many places, including configuration files in /etc. (e.g. /etc/sysconfig/network-scripts).
$ cat keyvalue.txt
# this file contains key/value pairs
name = John Doe
address=555 California Drive
age: 34
; comments can include # or ;
# delimiter can be = or :
# quoted values have quotation marks stripped by default
# but can be preserved with the -r argument
occupation:"Engineer"
$ cat keyvalue.txt | jc --ini -p
{
"name": "John Doe",
"address": "555 California Drive",
"age": "34",
"occupation": "Engineer"
}
route Command Parser
The route command parser has been enhanced to support IPv6 tables.
airport -I
airport -s
arp
blkid
crontab
crontab-u
CSV
df
dig
dmidecode
du
env
file
free
fstab
/etc/group
/etc/gshadow
history
/etc/hosts
id
ifconfig
INI
iptables
jobs
last and lastb
ls
lsblk
lsmod
lsof
mount
netstat
ntpq
/etc/passwd
ping
pip list
pip show
ps
route
/etc/shadow
ss
stat
sysctl
systemctl
systemctl list-jobs
systemctl list-sockets
systemctl list-unit-files
timedatectl
tracepath
traceroute
uname -a
uptime
w
who
XML
YAML
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m happy to announce the release of
jc
version 1.13.1 available on github and pypi.jc
now supports over 55 commands and file-types, including the newping
,sysctl
,traceroute
, andtracepath
command parsers. The INI file parser has been enhanced to support simple key/value text files and theroute
command parser now supports IPv6 tables.Custom local parser plugins are now supported. This allows overriding existing parsers and rapid development of new parsers.
Other updates include verbose debugging, more consistent handling of empty data, and many parser fixes for FreeBSD.
jc
can be installed viapip
or through several new official OS package repositories, including Fedora, openSUSE, Arch Linux, NixOS Linux, Guix System Linux, FreeBSD, and macOS. For more information on how to getjc
, click here.To upgrade with pip:
New Features
jc
is now available on the official Fedora repository (dnf install jc
)jc
is now available on the official Arch Linux repository (pacman -S jc
)jc
is now available on the official NixOS repository (nix-env -iA nixpkgs.jc
)jc
is now available on the official Guix System Linux repository (guix install jc
)jc
is now available on the official FreeBSD ports repository (portsnap fetch update && cd /usr/ports/textproc/py-jc && make install clean
)jc
is in process (Intent To Package) for Debian packaging.-dd
command argument.pygments
library (>=2.3.0) are now supported (for Debian packaging)New Parsers
jc
now supports 55 parsers. New parsers includeping
,sysctl
,tracepath
, andtraceroute
.Documentation and schemas for all parsers can be found here.
ping
command parserLinux, macOS, and FreeBSD support for the
ping
command:sysctl
command parserLinux, macOS, and FreeBSD support for the
sysctl -a
command:tracepath
command parserLinux support for the
tracepath
command:traceroute
command parserLinux, macOS, and FreeBSD support for the
traceroute
command:Updated Parsers
There have been many parser updates since v1.11.0. The INI file parser has been enhanced to support files and output that contains simple key/value pairs. The
route
command parser has been enhanced to add support for IPv6 routing tables. Theuname
parser provides more intuitive debug messages and an issue in theiptables
command parser was fixed, allowing it to convert the last row of a table. Many other parser enhancements including the consistent handling of blank input, FreeBSD support, and minor field additions and fixes are included.Key/Value Pair Files with the INI File Parser
The INI file parser has been enhanced to now support files containing simple key/value pairs. Files can include comments prepended with
#
or;
and keys and values can be delimited by=
or:
with or without spaces. Quotation marks are stripped from quoted values, though they can be kept with the-r
(raw output)jc
argument.These types of files can be found in many places, including configuration files in
/etc
. (e.g./etc/sysconfig/network-scripts
).route
Command ParserThe
route
command parser has been enhanced to support IPv6 tables.Schema Changes
There are no schema changes in this release.
Full Parser List
Beta Was this translation helpful? Give feedback.
All reactions