Release Notes: JC version 1.15.0 #132
kellyjonbrazil
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m excited to announce the release of
jc
version 1.15.0 available on github and pypi. This is a significant release that includes dozens of new features and parsers.jc
now supports over 70 commands and file-types, including the newacpi
,upower
,/usr/bin/time
,dpkg -l
,rpm -qi
,finger
, anddir
command parsers. Several existing parsers have been updated to include calculated time fields for convenience. These includedate
,uptime
,stat
,timedatectl
,who
,dig
, andls
.The CLI experience has been enhanced with new
-h
help and-v
version options. External library dependencies are now optional, sojc
will work just fine without them, albeit with limited functionality. JSON output is now more compact so less data is being piped between programs and unencoded unicode characters are now supported in JSON strings.jc
can be installed viapip
or through several official OS package repositories, including Debian, Ubuntu, 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
-h
option displays help and the parser list.jc
no longer displays the help text on error. Now that there are so many parsers, the-h
option prints to STDOUT so the output can be piped to more or less for paging.-v
option displays the version, github site, and copyright informationdate
,stat
,timedatectl
,who
,dig
, andls
. These fields are also available in many of the new parsers, includingupower
,rpm -qi
, anddir
._utc
‘. No other timezones are supported for aware timestamps.uptime
parser.pygments
,ruamel.yaml
, andxmltodict
are now optional. If a dependency is missing,jc
will still run, but will have limited functionality. For example, if thepygments
library is not installed, then all JSON output will be monochrome. If theruamel.yaml
orxmltodict
libraries are not installed, then the--yaml
or--xml
parsers, respectively, will not run.-p
option is used to pretty-print the JSON output. This reduces the amount of data that needs to be piped between programs and can save some disk space if JSON output is being stored to disk.New Parsers
jc
now supports 70 parsers. New parsers includeacpi
,upower
,/usr/bin/time
,dpkg -l
,rpm -qi
,finger
, anddir
. Thedir
parser is the first Windows command parser to be included injc
!Documentation and schemas for all parsers can be found here.
acpi
command parserLinux support for the
acpi
command. (Documentation):upower
command parserLinux support for the
upower
command. (Documentation):/usr/bin/time
command parserLinux, macOS, and BSD support for the
/usr/bin/time
command. (Documentation):dpkg -l
command parserLinux support for the
dpkg -l
command. (Documentation):rpm -qi
command parserLinux support for the
rpm -qi
command. (Documentation):finger
command parserLinux, macOS, and BSD support for the
finger
command. (Documentation):dir
command parserWindows support for the
dir
command – written by Rasheed Elsaleh. (Documentation):Updated Parsers
Several parsers have been updated to include calculated epoch timestamp fields, including:
date
,stat
,timedatectl
,who
,dig
, andls
. See the Schema Changes section for more details.The
uptime
parser has been enhanced with additional calculated time fields. See the Schema Changes section for more details.Schema Changes
date
command parserThe
date
command parser has been completely rewritten and enhanced with several new fields, including:epoch
,epoch_utc
,hour_24
,utc_offset
,day_of_year
,week_of_year
,iso
, andtimezone_aware
. Theweekday_num
field has also been updated to conform to ISO 8601 compliant numbering. (Documentation)stat
command parserThe
stat
parser has been updated to add the following fields:access_time_epoch
,access_time_epoch_utc
,modify_time_epoch
,modify_time_epoch_utc
,change_time_epoch
,change_time_epoch_utc
,birth_time_epoch
,birth_time_epoch_utc
. (Documentation)timedatectl
command parserThe
epoch_utc
field has been added to thetimedatectl
command parser. ([Documentation])(https://kellyjonbrazil.github.io/jc/docs/parsers/timedatectl))who
command parserThe
epoch
field has been added to thewho
command parser. (Documentation)dig
command parserThe
when_epoch
andwhen_epoch_utc
fields have been added to thedig
command parser. (Documentation)ls
command parserThe
epoch
andepoch_utc
fields have been added to thels
command parser. Note, that these fields are only available if the--full-time
or-l --time-style=full-iso
options are used when runningls
. (Documentation)uptime
command parserSeveral calculated time fields have been added to the
uptime
command parser, including:uptime_days
,uptime_hours
,uptime_minutes
,uptime_total_seconds
,time_hour
,time_minute
, andtime_second
. (Documentation)Full Parser List
acpi
airport -I
airport -s
arp
blkid
cksum
crontab
crontab (with user info)
csv
date
df
dig
dir
dmidecode
dpkg -l
du
env
file
finger
free
fstab
group
gshadow
hash
hashsum (various hash sum programs: md5, md5sum, shasum, etc.)
hciconfig
history
hosts
id
ifconfig
ini
iptables
iw_scan
jobs
kv
last
ls
lsblk
lsmod
lsof
mount
netstat
ntpq
passwd
ping
pip list
pip show
ps
route
rpm -qi
shadow
ss
stat
sysctl
systemctl
systemctl list-jobs
systemctl list-sockets
systemctl list-unit-files
time (/usr/bin/time)
timedatectl
tracepath
traceroute
uname -a
upower
uptime
w
wc
who
xml
yaml
Version 1.15.1 Updates
-h --parser_name
. For example:$ jc -h --arp
rpm-qi
parser to add two calculated timestamp fields:install_date_epoch
andinstall_date_epoch_utc
Schema Changes
The
rpm-qi
parser has been updated to add two calculated timestamp fields:install_date_epoch
(naive) andinstall_date_epoch_utc
(timezone-aware).Version 1.15.2 Updates
systeminfo
parser tested on Windowsdig
parser to fix an issue with IPv6 addresses in the server fielddig
parser to fix an issue whenaxfr
entries contain a semicolondig
parser to add support forAdditional Section
andOpt Pseudosection
dig
parser to addquery_size
fielddig
parser as the main example in readme, documentation, and man pageint
,float
, andboolean
conversion rules with functions injc.utils
New Parsers
systeminfo
command parser (Windows)Windows support for the
systeminfo
command – written by Jon Smith. (Documentation):Schema Changes
dig
Command ParserSupport for the
opt_pseudosection
andadditional
Section have been added. Thequery_size
field has also been added.Version 1.15.3 Updates
ufw
status command parser tested on linuxufw-appinfo
command parser tested on linuxNew Parsers
ufw
command parserLinux support for the
ufw status
command. (Documentation):ufw-appinfo
command parserLinux support for the
ufw app info [application]
andufw app info all
commands. (Documentation):Version 1.15.4 Updates
ping
parser to support error responses in OSX and BSDping
parser to be more resilient against parsing errors for unknown error typesdig
parser to support+noall
+answer
use casedig
parser compatibility to all platformsVersion 1.15.5 Updates
xmltodict
)ParseError
andLibraryNotFound
exceptionsBeta Was this translation helpful? Give feedback.
All reactions