From 40208a9f761315588ce74aa58841eb5fafe1b1af Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 15 Jun 2022 11:25:21 -0700 Subject: [PATCH] doc update --- docs/parsers/asciitable.md | 5 +++- docs/parsers/asciitable_m.md | 5 +++- docs/parsers/postconf.md | 52 +++++++++++++++++++++++++++++++++--- man/jc.1 | 2 +- 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/docs/parsers/asciitable.md b/docs/parsers/asciitable.md index bd1e9d23..16f428ae 100644 --- a/docs/parsers/asciitable.md +++ b/docs/parsers/asciitable.md @@ -59,6 +59,9 @@ etc... Headers (keys) are converted to snake-case. All values are returned as strings, except empty strings, which are converted to None/null. +> Note: To preserve the case of the keys use the `-r` cli option or +> `raw=True` argument in `parse()`. + Usage (cli): $ cat table.txt | jc --asciitable @@ -141,4 +144,4 @@ Returns: ### Parser Information Compatibility: linux, darwin, cygwin, win32, aix, freebsd -Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com) +Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/docs/parsers/asciitable_m.md b/docs/parsers/asciitable_m.md index cd034c56..05e4e353 100644 --- a/docs/parsers/asciitable_m.md +++ b/docs/parsers/asciitable_m.md @@ -29,6 +29,9 @@ Headers (keys) are converted to snake-case and newlines between multi-line headers are joined with an underscore. All values are returned as strings, except empty strings, which are converted to None/null. +> Note: To preserve the case of the keys use the `-r` cli option or +> `raw=True` argument in `parse()`. + > Note: table column separator characters (e.g. `|`) cannot be present > inside the cell data. If detected, a warning message will be printed to > `STDERR` and the line will be skipped. The warning message can be @@ -126,4 +129,4 @@ Returns: ### Parser Information Compatibility: linux, darwin, cygwin, win32, aix, freebsd -Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com) +Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/docs/parsers/postconf.md b/docs/parsers/postconf.md index 6f481375..2ef586da 100644 --- a/docs/parsers/postconf.md +++ b/docs/parsers/postconf.md @@ -39,11 +39,55 @@ Schema: Examples: - $ postconf | jc --postconf -p - [] + $ postconf -M | jc --postconf -p + [ + { + "service_name": "smtp", + "service_type": "inet", + "private": false, + "unprivileged": null, + "chroot": true, + "wake_up_time": null, + "process_limit": null, + "command": "smtpd", + "no_wake_up_before_first_use": null + }, + { + "service_name": "pickup", + "service_type": "unix", + "private": false, + "unprivileged": null, + "chroot": true, + "wake_up_time": 60, + "process_limit": 1, + "command": "pickup", + "no_wake_up_before_first_use": false + } + ] - $ postconf | jc --postconf -p -r - [] + $ postconf -M | jc --postconf -p -r + [ + { + "service_name": "smtp", + "service_type": "inet", + "private": "n", + "unprivileged": "-", + "chroot": "y", + "wake_up_time": "-", + "process_limit": "-", + "command": "smtpd" + }, + { + "service_name": "pickup", + "service_type": "unix", + "private": "n", + "unprivileged": "-", + "chroot": "y", + "wake_up_time": "60", + "process_limit": "1", + "command": "pickup" + } + ] diff --git a/man/jc.1 b/man/jc.1 index 280104fb..b61e76ea 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -1,4 +1,4 @@ -.TH jc 1 2022-06-06 1.20.1 "JSON Convert" +.TH jc 1 2022-06-15 1.20.1 "JSON Convert" .SH NAME \fBjc\fP \- JSON Convert JSONifies the output of many CLI tools and file-types .SH SYNOPSIS