From 583a5757e454a4e36b331057d1266279b55ee16a Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 19 Jan 2022 21:32:21 -0800 Subject: [PATCH] formatting --- docs/parsers/dig.md | 2 +- docs/parsers/dmidecode.md | 2 +- docs/parsers/file.md | 2 +- docs/parsers/last.md | 6 +++--- docs/parsers/ls.md | 5 +++-- docs/parsers/ls_s.md | 9 +++++---- docs/parsers/ping_s.md | 2 +- docs/parsers/traceroute.md | 2 +- docs/parsers/ufw_appinfo.md | 2 +- jc/parsers/dig.py | 2 +- jc/parsers/dmidecode.py | 2 +- jc/parsers/file.py | 2 +- jc/parsers/last.py | 6 +++--- jc/parsers/ls.py | 5 +++-- jc/parsers/ls_s.py | 9 +++++---- jc/parsers/ping_s.py | 2 +- jc/parsers/traceroute.py | 2 +- jc/parsers/ufw_appinfo.py | 2 +- 18 files changed, 34 insertions(+), 30 deletions(-) diff --git a/docs/parsers/dig.md b/docs/parsers/dig.md index d655d140..4e74243b 100644 --- a/docs/parsers/dig.md +++ b/docs/parsers/dig.md @@ -108,7 +108,7 @@ Schema: } ] - [0] naive timestamp if when field is parsable, else null + [0] naive timestamp if "when" field is parsable, else null [1] timezone aware timestamp availabe for UTC, else null Examples: diff --git a/docs/parsers/dmidecode.md b/docs/parsers/dmidecode.md index 214b0fb1..bf600e76 100644 --- a/docs/parsers/dmidecode.md +++ b/docs/parsers/dmidecode.md @@ -29,7 +29,7 @@ Schema: "type": integer, "bytes": integer, "description": string, - "values": { (null if empty) + "values": { # null if empty "lowercase_no_spaces_keys": string, "multiline_key_values": [ string, diff --git a/docs/parsers/file.md b/docs/parsers/file.md index d5a66b54..472fdd97 100644 --- a/docs/parsers/file.md +++ b/docs/parsers/file.md @@ -26,7 +26,7 @@ Schema: [ { "filename": string, - "type ": string + "type": string } ] diff --git a/docs/parsers/last.md b/docs/parsers/last.md index 38362c89..1b8a54f0 100644 --- a/docs/parsers/last.md +++ b/docs/parsers/last.md @@ -37,9 +37,9 @@ Schema: "login": string, "logout": string, "duration": string, - "login_epoch": integer, # (naive) available with last -F option - "logout_epoch": integer, # (naive) available with last -F option - "duration_seconds": integer # available with last -F option + "login_epoch": integer, # (naive) available w/last -F option + "logout_epoch": integer, # (naive) available w/last -F option + "duration_seconds": integer # available w/last -F option } ] diff --git a/docs/parsers/ls.md b/docs/parsers/ls.md index ce7e0e8a..a6d46a84 100644 --- a/docs/parsers/ls.md +++ b/docs/parsers/ls.md @@ -54,8 +54,9 @@ Schema: } ] - [0] naive timestamp if date field exists and can be converted - [1] timezone aware timestamp if date field is in UTC and can be converted + [0] naive timestamp if date field exists and can be converted. + [1] timezone aware timestamp if date field is in UTC and can + be converted. Examples: diff --git a/docs/parsers/ls_s.md b/docs/parsers/ls_s.md index a0e51224..8befacb3 100644 --- a/docs/parsers/ls_s.md +++ b/docs/parsers/ls_s.md @@ -12,8 +12,8 @@ in the filename, then make sure to use the `-b` option on `ls`. The `jc` `-qq` option can be used to ignore parsing errors. (e.g. filenames with newline characters, but `-b` was not used) -The `epoch` calculated timestamp field is naive (i.e. based on the local time -of the system the parser is run on) +The `epoch` calculated timestamp field is naive (i.e. based on the local +time of the system the parser is run on) The `epoch_utc` calculated timestamp field is timezone-aware and is only available if the timezone field is UTC. @@ -62,8 +62,9 @@ Schema: } } - [0] naive timestamp if date field exists and can be converted - [1] timezone aware timestamp if date field is in UTC and can be converted + [0] naive timestamp if date field exists and can be converted. + [1] timezone aware timestamp if date field is in UTC and can + be converted Examples: diff --git a/docs/parsers/ping_s.md b/docs/parsers/ping_s.md index 3139e821..748c4ec4 100644 --- a/docs/parsers/ping_s.md +++ b/docs/parsers/ping_s.md @@ -15,7 +15,7 @@ Usage (cli): appear the output is hanging due to the OS pipe buffers. This is because `ping` output is too small to quickly fill up the buffer. Use the `-u` option to unbuffer the `jc` output if you would like immediate output. - See the[readme](https://github.com/kellyjonbrazil/jc/tree/master#unbuffering-output) + See the [readme](https://github.com/kellyjonbrazil/jc/tree/master#unbuffering-output) for more information. Usage (module): diff --git a/docs/parsers/traceroute.md b/docs/parsers/traceroute.md index 4f134946..fc8fbe37 100644 --- a/docs/parsers/traceroute.md +++ b/docs/parsers/traceroute.md @@ -10,7 +10,7 @@ Note: On some operating systems you will need to redirect `STDERR` to `STDERR`. A warning message will be printed to `STDERR` if the header row is not found. -e.g. `$ traceroute 8.8.8.8 2>&1 | jc --traceroute` + e.g. `$ traceroute 8.8.8.8 2>&1 | jc --traceroute` Usage (cli): diff --git a/docs/parsers/ufw_appinfo.md b/docs/parsers/ufw_appinfo.md index 6f35c0e3..478fb0a3 100644 --- a/docs/parsers/ufw_appinfo.md +++ b/docs/parsers/ufw_appinfo.md @@ -41,7 +41,7 @@ Schema: ], "tcp_ranges": [ { - "start": integer, # 'any' is converted to start/end: 0/65535 + "start": integer, # [0] "end": integer } ], diff --git a/jc/parsers/dig.py b/jc/parsers/dig.py index bfe61e1d..48e87aa6 100644 --- a/jc/parsers/dig.py +++ b/jc/parsers/dig.py @@ -105,7 +105,7 @@ Schema: } ] - [0] naive timestamp if when field is parsable, else null + [0] naive timestamp if "when" field is parsable, else null [1] timezone aware timestamp availabe for UTC, else null Examples: diff --git a/jc/parsers/dmidecode.py b/jc/parsers/dmidecode.py index b9be6975..fa47bd73 100644 --- a/jc/parsers/dmidecode.py +++ b/jc/parsers/dmidecode.py @@ -26,7 +26,7 @@ Schema: "type": integer, "bytes": integer, "description": string, - "values": { (null if empty) + "values": { # null if empty "lowercase_no_spaces_keys": string, "multiline_key_values": [ string, diff --git a/jc/parsers/file.py b/jc/parsers/file.py index 12d986c2..3454fc3c 100644 --- a/jc/parsers/file.py +++ b/jc/parsers/file.py @@ -23,7 +23,7 @@ Schema: [ { "filename": string, - "type ": string + "type": string } ] diff --git a/jc/parsers/last.py b/jc/parsers/last.py index 9480621e..85a2b7f6 100644 --- a/jc/parsers/last.py +++ b/jc/parsers/last.py @@ -34,9 +34,9 @@ Schema: "login": string, "logout": string, "duration": string, - "login_epoch": integer, # (naive) available with last -F option - "logout_epoch": integer, # (naive) available with last -F option - "duration_seconds": integer # available with last -F option + "login_epoch": integer, # (naive) available w/last -F option + "logout_epoch": integer, # (naive) available w/last -F option + "duration_seconds": integer # available w/last -F option } ] diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index 2fa42e69..5440e593 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -51,8 +51,9 @@ Schema: } ] - [0] naive timestamp if date field exists and can be converted - [1] timezone aware timestamp if date field is in UTC and can be converted + [0] naive timestamp if date field exists and can be converted. + [1] timezone aware timestamp if date field is in UTC and can + be converted. Examples: diff --git a/jc/parsers/ls_s.py b/jc/parsers/ls_s.py index 2a1e792b..a27e2df9 100644 --- a/jc/parsers/ls_s.py +++ b/jc/parsers/ls_s.py @@ -9,8 +9,8 @@ in the filename, then make sure to use the `-b` option on `ls`. The `jc` `-qq` option can be used to ignore parsing errors. (e.g. filenames with newline characters, but `-b` was not used) -The `epoch` calculated timestamp field is naive (i.e. based on the local time -of the system the parser is run on) +The `epoch` calculated timestamp field is naive (i.e. based on the local +time of the system the parser is run on) The `epoch_utc` calculated timestamp field is timezone-aware and is only available if the timezone field is UTC. @@ -59,8 +59,9 @@ Schema: } } - [0] naive timestamp if date field exists and can be converted - [1] timezone aware timestamp if date field is in UTC and can be converted + [0] naive timestamp if date field exists and can be converted. + [1] timezone aware timestamp if date field is in UTC and can + be converted Examples: diff --git a/jc/parsers/ping_s.py b/jc/parsers/ping_s.py index 0a76b6de..eee724a7 100644 --- a/jc/parsers/ping_s.py +++ b/jc/parsers/ping_s.py @@ -12,7 +12,7 @@ Usage (cli): appear the output is hanging due to the OS pipe buffers. This is because `ping` output is too small to quickly fill up the buffer. Use the `-u` option to unbuffer the `jc` output if you would like immediate output. - See the[readme](https://github.com/kellyjonbrazil/jc/tree/master#unbuffering-output) + See the [readme](https://github.com/kellyjonbrazil/jc/tree/master#unbuffering-output) for more information. Usage (module): diff --git a/jc/parsers/traceroute.py b/jc/parsers/traceroute.py index 062638db..3f2770ef 100644 --- a/jc/parsers/traceroute.py +++ b/jc/parsers/traceroute.py @@ -7,7 +7,7 @@ Note: On some operating systems you will need to redirect `STDERR` to `STDERR`. A warning message will be printed to `STDERR` if the header row is not found. -e.g. `$ traceroute 8.8.8.8 2>&1 | jc --traceroute` + e.g. `$ traceroute 8.8.8.8 2>&1 | jc --traceroute` Usage (cli): diff --git a/jc/parsers/ufw_appinfo.py b/jc/parsers/ufw_appinfo.py index c34ef8fa..d6abe4c7 100644 --- a/jc/parsers/ufw_appinfo.py +++ b/jc/parsers/ufw_appinfo.py @@ -38,7 +38,7 @@ Schema: ], "tcp_ranges": [ { - "start": integer, # 'any' is converted to start/end: 0/65535 + "start": integer, # [0] "end": integer } ],