1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-08-08 22:36:48 +02:00

add compatibility to docs

This commit is contained in:
Kelly Brazil
2019-12-12 09:35:42 -08:00
parent d615fa3b93
commit 78fa44fd9a
24 changed files with 75 additions and 3 deletions

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility netstat Parser
Usage: Usage:
Specify --netstat as the first argument if the piped input is coming from netstat Specify --netstat as the first argument if the piped input is coming from netstat
Compatibility:
'linux'
Examples: Examples:
$ sudo netstat -apee | jc --netstat -p $ sudo netstat -apee | jc --netstat -p

View File

@@ -8,6 +8,9 @@ Usage:
- ef - ef
- axu - axu
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Examples: Examples:
$ ps -ef | jc --ps -p $ ps -ef | jc --ps -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility route Parser
Usage: Usage:
specify --route as the first argument if the piped input is coming from route specify --route as the first argument if the piped input is coming from route
Compatibility:
'linux'
Examples: Examples:
$ route -ee | jc --route -p $ route -ee | jc --route -p

View File

@@ -7,6 +7,9 @@ Usage:
Limitations: Limitations:
Extended information options like -e and -p are not supported and may cause parsing irregularities Extended information options like -e and -p are not supported and may cause parsing irregularities
Compatibility:
'linux'
Examples: Examples:
$ sudo ss -a | jc --ss -p $ sudo ss -a | jc --ss -p

View File

@@ -2,7 +2,10 @@
jc - JSON CLI output utility stats Parser jc - JSON CLI output utility stats Parser
Usage: Usage:
specify --stats as the first argument if the piped input is coming from stats specify --stat as the first argument if the piped input is coming from stat
Compatibility:
'linux'
Examples: Examples:

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility systemctl Parser
Usage: Usage:
specify --systemctl as the first argument if the piped input is coming from systemctl specify --systemctl as the first argument if the piped input is coming from systemctl
Compatibility:
'linux'
Examples: Examples:
$ systemctl -a | jc --systemctl -p $ systemctl -a | jc --systemctl -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility systemctl-lj Parser
Usage: Usage:
specify --systemctl-lj as the first argument if the piped input is coming from systemctl list-jobs specify --systemctl-lj as the first argument if the piped input is coming from systemctl list-jobs
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-jobs| jc --systemctl-lj -p $ systemctl list-jobs| jc --systemctl-lj -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility systemctl-ls Parser
Usage: Usage:
specify --systemctl-ls as the first argument if the piped input is coming from systemctl list-sockets specify --systemctl-ls as the first argument if the piped input is coming from systemctl list-sockets
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-sockets | jc --systemctl-ls -p $ systemctl list-sockets | jc --systemctl-ls -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility systemctl-luf Parser
Usage: Usage:
specify --systemctl-luf as the first argument if the piped input is coming from systemctl list-unit-files specify --systemctl-luf as the first argument if the piped input is coming from systemctl list-unit-files
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-unit-files | jc --systemctl-luf -p $ systemctl list-unit-files | jc --systemctl-luf -p

View File

@@ -7,6 +7,9 @@ Usage:
Limitations: Limitations:
must use 'uname -a' must use 'uname -a'
Compatibility:
'linux'
Example: Example:
$ uname -a | jc --uname -p $ uname -a | jc --uname -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility uptime Parser
Usage: Usage:
specify --uptime as the first argument if the piped input is coming from uptime specify --uptime as the first argument if the piped input is coming from uptime
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Example: Example:
$ uptime | jc --uptime -p $ uptime | jc --uptime -p

View File

@@ -4,6 +4,9 @@ jc - JSON CLI output utility w Parser
Usage: Usage:
specify --w as the first argument if the piped input is coming from w specify --w as the first argument if the piped input is coming from w
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Examples: Examples:
$ w | jc --w -p $ w | jc --w -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
Specify --netstat as the first argument if the piped input is coming from netstat Specify --netstat as the first argument if the piped input is coming from netstat
Compatibility:
'linux'
Examples: Examples:
$ sudo netstat -apee | jc --netstat -p $ sudo netstat -apee | jc --netstat -p

View File

@@ -7,6 +7,9 @@ Usage:
- ef - ef
- axu - axu
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Examples: Examples:
$ ps -ef | jc --ps -p $ ps -ef | jc --ps -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --route as the first argument if the piped input is coming from route specify --route as the first argument if the piped input is coming from route
Compatibility:
'linux'
Examples: Examples:
$ route -ee | jc --route -p $ route -ee | jc --route -p
@@ -151,7 +154,7 @@ def parse(data, raw=False, quiet=False):
""" """
# compatible options: linux, darwin, cygwin, win32, aix, freebsd # compatible options: linux, darwin, cygwin, win32, aix, freebsd
compatible = ['linux', 'aix', 'freebsd'] compatible = ['linux']
if not quiet: if not quiet:
jc.utils.compatibility(__name__, compatible) jc.utils.compatibility(__name__, compatible)

View File

@@ -6,6 +6,9 @@ Usage:
Limitations: Limitations:
Extended information options like -e and -p are not supported and may cause parsing irregularities Extended information options like -e and -p are not supported and may cause parsing irregularities
Compatibility:
'linux'
Examples: Examples:
$ sudo ss -a | jc --ss -p $ sudo ss -a | jc --ss -p

View File

@@ -1,7 +1,10 @@
"""jc - JSON CLI output utility stats Parser """jc - JSON CLI output utility stats Parser
Usage: Usage:
specify --stats as the first argument if the piped input is coming from stats specify --stat as the first argument if the piped input is coming from stat
Compatibility:
'linux'
Examples: Examples:

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --systemctl as the first argument if the piped input is coming from systemctl specify --systemctl as the first argument if the piped input is coming from systemctl
Compatibility:
'linux'
Examples: Examples:
$ systemctl -a | jc --systemctl -p $ systemctl -a | jc --systemctl -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --systemctl-lj as the first argument if the piped input is coming from systemctl list-jobs specify --systemctl-lj as the first argument if the piped input is coming from systemctl list-jobs
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-jobs| jc --systemctl-lj -p $ systemctl list-jobs| jc --systemctl-lj -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --systemctl-ls as the first argument if the piped input is coming from systemctl list-sockets specify --systemctl-ls as the first argument if the piped input is coming from systemctl list-sockets
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-sockets | jc --systemctl-ls -p $ systemctl list-sockets | jc --systemctl-ls -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --systemctl-luf as the first argument if the piped input is coming from systemctl list-unit-files specify --systemctl-luf as the first argument if the piped input is coming from systemctl list-unit-files
Compatibility:
'linux'
Examples: Examples:
$ systemctl list-unit-files | jc --systemctl-luf -p $ systemctl list-unit-files | jc --systemctl-luf -p

View File

@@ -6,6 +6,9 @@ Usage:
Limitations: Limitations:
must use 'uname -a' must use 'uname -a'
Compatibility:
'linux'
Example: Example:
$ uname -a | jc --uname -p $ uname -a | jc --uname -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --uptime as the first argument if the piped input is coming from uptime specify --uptime as the first argument if the piped input is coming from uptime
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Example: Example:
$ uptime | jc --uptime -p $ uptime | jc --uptime -p

View File

@@ -3,6 +3,9 @@
Usage: Usage:
specify --w as the first argument if the piped input is coming from w specify --w as the first argument if the piped input is coming from w
Compatibility:
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
Examples: Examples:
$ w | jc --w -p $ w | jc --w -p