1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

doc update

This commit is contained in:
Kelly Brazil
2022-08-04 11:43:49 -07:00
parent ba39f35a01
commit 3166600ac6
11 changed files with 31 additions and 8 deletions

View File

@ -2,6 +2,9 @@ jc changelog
xxxxxxxx v1.20.5
- Add IP Address string parser
- Add PLIST file parser (XML and binary support)
- Add `mdadm` command parser tested on linux (IN PROGRESS)
- Add `--time-out` or `-t` option to add a UTC timestamp to the JSON output
- 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

View File

@ -240,7 +240,7 @@ option.
| ` --systeminfo` | `systeminfo` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/systeminfo) |
| ` --time` | `/usr/bin/time` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/time) |
| ` --timedatectl` | `timedatectl status` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/timedatectl) |
| ` --timestamp` | UNIX Epoch Timestamp string parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/timestamp) |
| ` --timestamp` | Unix Epoch Timestamp string parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/timestamp) |
| ` --top` | `top -b` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/top) |
| ` --top-s` | `top -b` command streaming parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/top_s) |
| ` --tracepath` | `tracepath` and `tracepath6` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/tracepath) |
@ -276,6 +276,7 @@ option.
| `-p` | `--pretty` | Pretty format the JSON output |
| `-q` | `--quiet` | Quiet mode. Suppresses parser warning messages (use `-qq` to ignore streaming parser errors) |
| `-r` | `--raw` | Raw output. Provides more literal output, typically with string values and no additional semantic processing |
| `-t` | `--time-out` | Add UTC Unix timestamp information to output |
| `-u` | `--unbuffer` | Unbuffer output |
| `-v` | `--version` | Version information |
| `-y` | `--yaml-out` | YAML output |

View File

@ -5,7 +5,7 @@ _jc()
jc_commands=(acpi airport arp blkid chage cksum crontab date df dig dmidecode dpkg du env file finger free git gpg hciconfig id ifconfig iostat iptables iw jobs last lastb ls lsblk lsmod lsof lsusb md5 md5sum mount mpstat netstat nmcli ntpq pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss stat sum sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 ufw uname update-alternatives upower uptime vdir vmstat w wc who xrandr zipinfo)
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --chage --cksum --crontab --crontab-u --csv --csv-s --date --df --dig --dir --dmidecode --dpkg-l --du --email-address --env --file --finger --free --fstab --git-log --git-log-s --gpg --group --gshadow --hash --hashsum --hciconfig --history --hosts --id --ifconfig --ini --iostat --iostat-s --ip-address --iptables --iso-datetime --iw-scan --jar-manifest --jobs --jwt --kv --last --ls --ls-s --lsblk --lsmod --lsof --lsusb --m3u --mount --mpstat --mpstat-s --netstat --nmcli --ntpq --passwd --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --plist --postconf --ps --route --rpm-qi --rsync --rsync-s --sfdisk --shadow --ss --stat --stat-s --sysctl --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --top --top-s --tracepath --traceroute --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --vmstat --vmstat-s --w --wc --who --x509-cert --xml --xrandr --yaml --zipinfo)
jc_options=(--force-color -C --debug -d --monochrome -m --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
jc_options=(--force-color -C --debug -d --monochrome -m --pretty -p --quiet -q --raw -r --time-out -t --unbuffer -u --yaml-out -y)
jc_about_options=(--about -a)
jc_about_mod_options=(--pretty -p --yaml-out -y --monochrome -m --force-color -C)
jc_help_options=(--help -h)

View File

@ -186,7 +186,7 @@ _jc() {
'--systeminfo:`systeminfo` command parser'
'--time:`/usr/bin/time` command parser'
'--timedatectl:`timedatectl status` command parser'
'--timestamp:UNIX Epoch Timestamp string parser'
'--timestamp:Unix Epoch Timestamp string parser'
'--top:`top -b` command parser'
'--top-s:`top -b` command streaming parser'
'--tracepath:`tracepath` and `tracepath6` command parser'
@ -210,7 +210,7 @@ _jc() {
'--yaml:YAML file parser'
'--zipinfo:`zipinfo` command parser'
)
jc_options=(--force-color -C --debug -d --monochrome -m --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
jc_options=(--force-color -C --debug -d --monochrome -m --pretty -p --quiet -q --raw -r --time-out -t --unbuffer -u --yaml-out -y)
jc_options_describe=(
'--force-color:force color output even when using pipes (overrides -m)'
'-C:force color output even when using pipes (overrides -m)'
@ -224,6 +224,8 @@ _jc() {
'-q:suppress warnings (double to ignore streaming errors)'
'--raw:raw output'
'-r:raw output'
'--time-out:add UTC Unix timestamp information to output'
'-t:add UTC Unix timestamp information to output'
'--unbuffer:unbuffer output'
'-u:unbuffer output'
'--yaml-out:YAML output'

View File

@ -7,6 +7,12 @@ jc - JSON Convert PLIST file parser
Converts binary and XML PLIST files.
Binary values are converted into an ASCII hex representation.
Datetime objects are converted into Unix epoch timestamps and ISO strings.
The timestamp and ISO string will maintain the same naive or timezone-aware
properties as the object in the original PLIST file.
Usage (cli):
$ cat file.plist | jc --plist

View File

@ -3,7 +3,7 @@
# jc.parsers.timestamp
jc - JSON Convert UNIX Epoch Timestamp string parser
jc - JSON Convert Unix Epoch Timestamp string parser
The naive fields are based on the local time of the system the parser is
run on.

View File

@ -155,7 +155,7 @@ Schema:
]
}
Signed Certificate Timestamp List
Signed Certificate Timestamp List:
{
"extn_id": "signed_certificate_timestamp_list",
"critical": boolean,

View File

@ -5,6 +5,8 @@ Converts binary and XML PLIST files.
Binary values are converted into an ASCII hex representation.
Datetime objects are converted into Unix epoch timestamps and ISO strings.
The timestamp and ISO string will maintain the same naive or timezone-aware
properties as the object in the original PLIST file.
Usage (cli):

View File

@ -1,4 +1,4 @@
.TH jc 1 2022-07-31 1.20.5 "JSON Convert"
.TH jc 1 2022-08-04 1.20.5 "JSON Convert"
.SH NAME
\fBjc\fP \- JSON Convert JSONifies the output of many CLI tools and file-types
.SH SYNOPSIS
@ -470,7 +470,7 @@ PLIST file parser
.TP
.B
\fB--timestamp\fP
UNIX Epoch Timestamp string parser
Unix Epoch Timestamp string parser
.TP
.B
@ -623,6 +623,10 @@ Quiet mode. Suppresses parser warning messages (use -qq to ignore streaming pars
Raw output. Provides more literal output, typically with string values and no additional semantic processing
.TP
.B
\fB-t\fP, \fB--time-out\fP
Add UTC Unix timestamp information to output
.TP
.B
\fB-u\fP, \fB--unbuffer\fP
Unbuffer output (useful for slow streaming data with streaming parsers)
.TP

View File

@ -63,6 +63,10 @@ Quiet mode. Suppresses parser warning messages (use -qq to ignore streaming pars
Raw output. Provides more literal output, typically with string values and no additional semantic processing
.TP
.B
\fB-t\fP, \fB--time-out\fP
Add UTC Unix timestamp information to output
.TP
.B
\fB-u\fP, \fB--unbuffer\fP
Unbuffer output (useful for slow streaming data with streaming parsers)
.TP

View File

@ -164,6 +164,7 @@ option.
| `-p` | `--pretty` | Pretty format the JSON output |
| `-q` | `--quiet` | Quiet mode. Suppresses parser warning messages (use `-qq` to ignore streaming parser errors) |
| `-r` | `--raw` | Raw output. Provides more literal output, typically with string values and no additional semantic processing |
| `-t` | `--time-out` | Add UTC Unix timestamp information to output |
| `-u` | `--unbuffer` | Unbuffer output |
| `-v` | `--version` | Version information |
| `-y` | `--yaml-out` | YAML output |