diff --git a/README.md b/README.md index e760af25..745aae0e 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio ### Options - `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of course!) - `-d` debug mode. Prints trace messages if parsing issues are encountered (use `-dd` for verbose debugging) -- `-h` `jc` help +- `-h` `jc` help. Use `jc -h --parser_name` for parser documentation - `-m` monochrome JSON output - `-p` pretty format the JSON output - `-q` quiet mode. Suppresses parser warning messages diff --git a/docs/parsers/acpi.md b/docs/parsers/acpi.md index 0e2f918a..a8c32623 100644 --- a/docs/parsers/acpi.md +++ b/docs/parsers/acpi.md @@ -15,6 +15,45 @@ Usage (module): import jc.parsers.acpi result = jc.parsers.acpi.parse(acpi_command_output) +Schema: + + [ + { + "type": string, + "id": integer, + "state": string, + "charge_percent": integer, + "until_charged": string, + "until_charged_hours": integer, + "until_charged_minuts": integer, + "until_charged_seconds": integer, + "until_charged_total_seconds": integer, + "charge_remaining": string, + "charge_remaining_hours": integer, + "charge_remaining_minutes": integer, + "charge_remaining_seconds": integer, + "charge_remaining_total_seconds": integer, + "design_capacity_mah": integer, + "last_full_capacity": integer, + "last_full_capacity_percent": integer, + "on-line": boolean, + "mode": string, + "temperature": float, + "temperature_unit": string, + "trip_points": [ + { + "id": integer, + "switches_to_mode": string, + "temperature": float, + "temperature_unit": string + } + ], + "messages": [ + string + ] + } + ] + Compatibility: 'linux' @@ -194,60 +233,7 @@ Examples: ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (List of Dictionaries) raw structured data to process - -Returns: - - List of Dictionaries. Structured data with the following schema: - - [ - { - "type": string, - "id": integer, - "state": string, - "charge_percent": integer, - "until_charged": string, - "until_charged_hours": integer, - "until_charged_minuts": integer, - "until_charged_seconds": integer, - "until_charged_total_seconds": integer, - "charge_remaining": string, - "charge_remaining_hours": integer, - "charge_remaining_minutes": integer, - "charge_remaining_seconds": integer, - "charge_remaining_total_seconds": integer, - "design_capacity_mah": integer, - "last_full_capacity": integer, - "last_full_capacity_percent": integer, - "on-line": boolean, - "mode": string, - "temperature": float, - "temperature_unit": string, - "trip_points": [ - { - "id": integer, - "switches_to_mode": string, - "temperature": float, - "temperature_unit": string - } - ], - "messages": [ - string - ] - } - ] - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/docs/parsers/airport.md b/docs/parsers/airport.md index 765be260..fa81499a 100644 --- a/docs/parsers/airport.md +++ b/docs/parsers/airport.md @@ -17,6 +17,26 @@ Usage (module): import jc.parsers.airport result = jc.parsers.airport.parse(airport_command_output) +Schema: + + { + "agrctlrssi": integer, + "agrextrssi": integer, + "agrctlnoise": integer, + "agrextnoise": integer, + "state": string, + "op_mode": string, + "lasttxrate": integer, + "maxrate": integer, + "lastassocstatus": integer, + "802_11_auth": string, + "link_auth": string, + "bssid": string, + "ssid": string, + "mcs": integer, + "channel": string + } + Compatibility: 'darwin' @@ -66,41 +86,7 @@ Examples: ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (Dictionary) raw structured data to process - -Returns: - - Dictionary. Structured data with the following schema: - - { - "agrctlrssi": integer, - "agrextrssi": integer, - "agrctlnoise": integer, - "agrextnoise": integer, - "state": string, - "op_mode": string, - "lasttxrate": integer, - "maxrate": integer, - "lastassocstatus": integer, - "802_11_auth": string, - "link_auth": string, - "bssid": string, - "ssid": string, - "mcs": integer, - "channel": string - } - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/docs/parsers/blkid.md b/docs/parsers/blkid.md index f4436988..2b061b95 100644 --- a/docs/parsers/blkid.md +++ b/docs/parsers/blkid.md @@ -15,6 +15,42 @@ Usage (module): import jc.parsers.blkid result = jc.parsers.blkid.parse(blkid_command_output) +Schema: + + [ + { + "device": string, + "uuid": string, + "type": string, + "usage": string, + "part_entry_scheme": string, + "part_entry_type": string, + "part_entry_flags": string, + "part_entry_number": integer, + "part_entry_offset": integer, + "part_entry_size": integer, + "part_entry_disk": string, + "id_fs_uuid": string, + "id_fs_uuid_enc": string, + "id_fs_version": string, + "id_fs_type": string, + "id_fs_usage": string, + "id_part_entry_scheme": string, + "id_part_entry_type": string, + "id_part_entry_flags": string, + "id_part_entry_number": integer, + "id_part_entry_offset": integer, + "id_part_entry_size": integer, + "id_iolimit_minimum_io_size": integer, + "id_iolimit_physical_sector_size": integer, + "id_iolimit_logical_sector_size": integer, + "id_part_entry_disk": string, + "minimum_io_size": integer, + "physical_sector_size": integer, + "logical_sector_size": integer + } + ] + Compatibility: 'linux' @@ -90,57 +126,7 @@ Examples: ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (List of Dictionaries) raw structured data to process - -Returns: - - List of Dictionaries. Structured data with the following schema: - - [ - { - "device": string, - "uuid": string, - "type": string, - "usage": string, - "part_entry_scheme": string, - "part_entry_type": string, - "part_entry_flags": string, - "part_entry_number": integer, - "part_entry_offset": integer, - "part_entry_size": integer, - "part_entry_disk": string, - "id_fs_uuid": string, - "id_fs_uuid_enc": string, - "id_fs_version": string, - "id_fs_type": string, - "id_fs_usage": string, - "id_part_entry_scheme": string, - "id_part_entry_type": string, - "id_part_entry_flags": string, - "id_part_entry_number": integer, - "id_part_entry_offset": integer, - "id_part_entry_size": integer, - "id_iolimit_minimum_io_size": integer, - "id_iolimit_physical_sector_size": integer, - "id_iolimit_logical_sector_size": integer, - "id_part_entry_disk": string, - "minimum_io_size": integer, - "physical_sector_size": integer, - "logical_sector_size": integer - } - ] - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/docs/parsers/cksum.md b/docs/parsers/cksum.md index dc1aee57..82512167 100644 --- a/docs/parsers/cksum.md +++ b/docs/parsers/cksum.md @@ -19,6 +19,16 @@ Usage (module): import jc.parsers.cksum result = jc.parsers.cksum.parse(cksum_command_output) +Schema: + + [ + { + "filename": string, + "checksum": integer, + "blocks": integer + } + ] + Compatibility: 'linux', 'darwin', 'cygwin', 'aix', 'freebsd' @@ -50,31 +60,7 @@ Examples: ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (List of Dictionaries) raw structured data to process - -Returns: - - List of Dictionaries. Structured data with the following schema: - - [ - { - "filename": string, - "checksum": integer, - "blocks": integer - } - ] - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/docs/parsers/crontab.md b/docs/parsers/crontab.md index 0b9507d1..4a99a774 100644 --- a/docs/parsers/crontab.md +++ b/docs/parsers/crontab.md @@ -17,6 +17,37 @@ Usage (module): import jc.parsers.crontab result = jc.parsers.crontab.parse(crontab_output) +Schema: + + { + "variables": [ + "name": string, + "value": string + ], + "schedule": [ + { + "occurrence" string, + "minute": [ + string + ], + "hour": [ + string + ], + "day_of_month": [ + string + ], + "month": [ + string + ], + "day_of_week": [ + string + ], + "occurrence": string, + "command": string + } + ] + } + Compatibility: 'linux', 'darwin', 'aix', 'freebsd' @@ -145,53 +176,7 @@ Examples: ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (Dictionary) raw structured data to process - -Returns: - - Dictionary. Structured data with the following schema: - - { - "variables": [ - "name": string, - "value": string - ], - "schedule": [ - { - "occurrence" string, - "minute": [ - string - ], - "hour": [ - string - ], - "day_of_month": [ - string - ], - "month": [ - string - ], - "day_of_week": [ - string - ], - "occurrence": string, - "command": string - } - ] - } - - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/docs/parsers/crontab_u.md b/docs/parsers/crontab_u.md index ef2523f7..d4a273f2 100644 --- a/docs/parsers/crontab_u.md +++ b/docs/parsers/crontab_u.md @@ -13,6 +13,38 @@ Usage (module): import jc.parsers.crontab_u result = jc.parsers.crontab_u.parse(crontab_u_output) +Schema: + + { + "variables": [ + "name": string, + "value": string + ], + "schedule": [ + { + "occurrence" string, + "minute": [ + string + ], + "hour": [ + string + ], + "day_of_month": [ + string + ], + "month": [ + string + ], + "day_of_week": [ + string + ], + "occurrence": string, + "user": string, + "command": string + } + ] + } + Compatibility: 'linux', 'darwin', 'aix', 'freebsd' @@ -136,60 +168,11 @@ Examples: } - - ## info ```python info() ``` - - -## process -```python -process(proc_data) -``` - -Final processing to conform to the schema. - -Parameters: - - proc_data: (Dictionary) raw structured data to process - -Returns: - - Dictionary. Structured data with the following schema: - - { - "variables": [ - "name": string, - "value": string - ], - "schedule": [ - { - "occurrence" string, - "minute": [ - string - ], - "hour": [ - string - ], - "day_of_month": [ - string - ], - "month": [ - string - ], - "day_of_week": [ - string - ], - "occurrence": string, - "user": string, - "command": string - } - ] - } - - +Provides parser metadata (version, author, etc.) ## parse ```python diff --git a/jc/cli.py b/jc/cli.py index b463e520..7146449f 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -320,7 +320,7 @@ def helptext(): Options: -a about jc -d debug - show traceback (-dd for verbose traceback) - -h help (use -h --parser_name for detailed parser info) + -h help (use -h --parser_name for parser documentation) -m monochrome output -p pretty print output -q quiet - suppress parser warnings @@ -334,9 +334,9 @@ def helptext(): jc -p ls -al - For detailed parser information: + For parser documentation: - jc -h --arp + jc -h --ls ''' return textwrap.dedent(helptext_string) diff --git a/jc/parsers/acpi.py b/jc/parsers/acpi.py index 9bcfa636..baeead9c 100644 --- a/jc/parsers/acpi.py +++ b/jc/parsers/acpi.py @@ -13,6 +13,45 @@ Usage (module): import jc.parsers.acpi result = jc.parsers.acpi.parse(acpi_command_output) +Schema: + + [ + { + "type": string, + "id": integer, + "state": string, + "charge_percent": integer, + "until_charged": string, + "until_charged_hours": integer, + "until_charged_minuts": integer, + "until_charged_seconds": integer, + "until_charged_total_seconds": integer, + "charge_remaining": string, + "charge_remaining_hours": integer, + "charge_remaining_minutes": integer, + "charge_remaining_seconds": integer, + "charge_remaining_total_seconds": integer, + "design_capacity_mah": integer, + "last_full_capacity": integer, + "last_full_capacity_percent": integer, + "on-line": boolean, + "mode": string, + "temperature": float, + "temperature_unit": string, + "trip_points": [ + { + "id": integer, + "switches_to_mode": string, + "temperature": float, + "temperature_unit": string + } + ], + "messages": [ + string + ] + } + ] + Compatibility: 'linux' @@ -191,7 +230,8 @@ import jc.utils class info(): - version = '1.0' + """Provides parser metadata (version, author, etc.)""" + version = '1.1' description = '`acpi` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -204,7 +244,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -214,44 +254,7 @@ def process(proc_data): Returns: - List of Dictionaries. Structured data with the following schema: - - [ - { - "type": string, - "id": integer, - "state": string, - "charge_percent": integer, - "until_charged": string, - "until_charged_hours": integer, - "until_charged_minuts": integer, - "until_charged_seconds": integer, - "until_charged_total_seconds": integer, - "charge_remaining": string, - "charge_remaining_hours": integer, - "charge_remaining_minutes": integer, - "charge_remaining_seconds": integer, - "charge_remaining_total_seconds": integer, - "design_capacity_mah": integer, - "last_full_capacity": integer, - "last_full_capacity_percent": integer, - "on-line": boolean, - "mode": string, - "temperature": float, - "temperature_unit": string, - "trip_points": [ - { - "id": integer, - "switches_to_mode": string, - "temperature": float, - "temperature_unit": string - } - ], - "messages": [ - string - ] - } - ] + List of Dictionaries. Structured data to conform to the schema. """ int_list = ['id', 'charge_percent', 'design_capacity_mah', 'last_full_capacity', 'last_full_capacity_percent'] float_list = ['temperature'] @@ -406,4 +409,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/jc/parsers/airport.py b/jc/parsers/airport.py index f8c032e9..a5bb3947 100644 --- a/jc/parsers/airport.py +++ b/jc/parsers/airport.py @@ -15,6 +15,26 @@ Usage (module): import jc.parsers.airport result = jc.parsers.airport.parse(airport_command_output) +Schema: + + { + "agrctlrssi": integer, + "agrextrssi": integer, + "agrctlnoise": integer, + "agrextnoise": integer, + "state": string, + "op_mode": string, + "lasttxrate": integer, + "maxrate": integer, + "lastassocstatus": integer, + "802_11_auth": string, + "link_auth": string, + "bssid": string, + "ssid": string, + "mcs": integer, + "channel": string + } + Compatibility: 'darwin' @@ -63,7 +83,8 @@ import jc.utils class info(): - version = '1.1' + """Provides parser metadata (version, author, etc.)""" + version = '1.2' description = '`airport -I` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -77,7 +98,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -87,25 +108,7 @@ def process(proc_data): Returns: - Dictionary. Structured data with the following schema: - - { - "agrctlrssi": integer, - "agrextrssi": integer, - "agrctlnoise": integer, - "agrextnoise": integer, - "state": string, - "op_mode": string, - "lasttxrate": integer, - "maxrate": integer, - "lastassocstatus": integer, - "802_11_auth": string, - "link_auth": string, - "bssid": string, - "ssid": string, - "mcs": integer, - "channel": string - } + Dictionary. Structured data to conform to the schema. """ # integer changes int_list = ['agrctlrssi', 'agrextrssi', 'agrctlnoise', 'agrextnoise', @@ -148,4 +151,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/jc/parsers/blkid.py b/jc/parsers/blkid.py index 67e2e3df..c8d1c393 100644 --- a/jc/parsers/blkid.py +++ b/jc/parsers/blkid.py @@ -13,6 +13,42 @@ Usage (module): import jc.parsers.blkid result = jc.parsers.blkid.parse(blkid_command_output) +Schema: + + [ + { + "device": string, + "uuid": string, + "type": string, + "usage": string, + "part_entry_scheme": string, + "part_entry_type": string, + "part_entry_flags": string, + "part_entry_number": integer, + "part_entry_offset": integer, + "part_entry_size": integer, + "part_entry_disk": string, + "id_fs_uuid": string, + "id_fs_uuid_enc": string, + "id_fs_version": string, + "id_fs_type": string, + "id_fs_usage": string, + "id_part_entry_scheme": string, + "id_part_entry_type": string, + "id_part_entry_flags": string, + "id_part_entry_number": integer, + "id_part_entry_offset": integer, + "id_part_entry_size": integer, + "id_iolimit_minimum_io_size": integer, + "id_iolimit_physical_sector_size": integer, + "id_iolimit_logical_sector_size": integer, + "id_part_entry_disk": string, + "minimum_io_size": integer, + "physical_sector_size": integer, + "logical_sector_size": integer + } + ] + Compatibility: 'linux' @@ -88,7 +124,8 @@ import jc.utils class info(): - version = '1.2' + """Provides parser metadata (version, author, etc.)""" + version = '1.3' description = '`blkid` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -102,7 +139,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -112,41 +149,7 @@ def process(proc_data): Returns: - List of Dictionaries. Structured data with the following schema: - - [ - { - "device": string, - "uuid": string, - "type": string, - "usage": string, - "part_entry_scheme": string, - "part_entry_type": string, - "part_entry_flags": string, - "part_entry_number": integer, - "part_entry_offset": integer, - "part_entry_size": integer, - "part_entry_disk": string, - "id_fs_uuid": string, - "id_fs_uuid_enc": string, - "id_fs_version": string, - "id_fs_type": string, - "id_fs_usage": string, - "id_part_entry_scheme": string, - "id_part_entry_type": string, - "id_part_entry_flags": string, - "id_part_entry_number": integer, - "id_part_entry_offset": integer, - "id_part_entry_size": integer, - "id_iolimit_minimum_io_size": integer, - "id_iolimit_physical_sector_size": integer, - "id_iolimit_logical_sector_size": integer, - "id_part_entry_disk": string, - "minimum_io_size": integer, - "physical_sector_size": integer, - "logical_sector_size": integer - } - ] + List of Dictionaries. Structured data to conform to the schema. """ for entry in proc_data: if 'devname' in entry: @@ -225,4 +228,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/jc/parsers/cksum.py b/jc/parsers/cksum.py index 521b0961..7d7b3abe 100644 --- a/jc/parsers/cksum.py +++ b/jc/parsers/cksum.py @@ -17,6 +17,16 @@ Usage (module): import jc.parsers.cksum result = jc.parsers.cksum.parse(cksum_command_output) +Schema: + + [ + { + "filename": string, + "checksum": integer, + "blocks": integer + } + ] + Compatibility: 'linux', 'darwin', 'cygwin', 'aix', 'freebsd' @@ -47,7 +57,8 @@ import jc.utils class info(): - version = '1.0' + """Provides parser metadata (version, author, etc.)""" + version = '1.1' description = '`cksum` and `sum` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -60,7 +71,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -70,15 +81,7 @@ def process(proc_data): Returns: - List of Dictionaries. Structured data with the following schema: - - [ - { - "filename": string, - "checksum": integer, - "blocks": integer - } - ] + List of Dictionaries. Structured data to conform to the schema. """ for entry in proc_data: @@ -124,4 +127,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/jc/parsers/crontab.py b/jc/parsers/crontab.py index 7a066f9d..ef333bf6 100644 --- a/jc/parsers/crontab.py +++ b/jc/parsers/crontab.py @@ -15,6 +15,37 @@ Usage (module): import jc.parsers.crontab result = jc.parsers.crontab.parse(crontab_output) +Schema: + + { + "variables": [ + "name": string, + "value": string + ], + "schedule": [ + { + "occurrence" string, + "minute": [ + string + ], + "hour": [ + string + ], + "day_of_month": [ + string + ], + "month": [ + string + ], + "day_of_week": [ + string + ], + "occurrence": string, + "command": string + } + ] + } + Compatibility: 'linux', 'darwin', 'aix', 'freebsd' @@ -143,7 +174,8 @@ import jc.parsers.universal class info(): - version = '1.4' + """Provides parser metadata (version, author, etc.)""" + version = '1.5' description = '`crontab` command and file parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -157,7 +189,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -167,37 +199,7 @@ def process(proc_data): Returns: - Dictionary. Structured data with the following schema: - - { - "variables": [ - "name": string, - "value": string - ], - "schedule": [ - { - "occurrence" string, - "minute": [ - string - ], - "hour": [ - string - ], - "day_of_month": [ - string - ], - "month": [ - string - ], - "day_of_week": [ - string - ], - "occurrence": string, - "command": string - } - ] - } - + Dictionary. Structured data to conform to the schema. """ # put itmes in lists try: @@ -280,4 +282,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/jc/parsers/crontab_u.py b/jc/parsers/crontab_u.py index b52242c3..9b11e624 100644 --- a/jc/parsers/crontab_u.py +++ b/jc/parsers/crontab_u.py @@ -11,6 +11,38 @@ Usage (module): import jc.parsers.crontab_u result = jc.parsers.crontab_u.parse(crontab_u_output) +Schema: + + { + "variables": [ + "name": string, + "value": string + ], + "schedule": [ + { + "occurrence" string, + "minute": [ + string + ], + "hour": [ + string + ], + "day_of_month": [ + string + ], + "month": [ + string + ], + "day_of_week": [ + string + ], + "occurrence": string, + "user": string, + "command": string + } + ] + } + Compatibility: 'linux', 'darwin', 'aix', 'freebsd' @@ -132,15 +164,14 @@ Examples: } ] } - - """ import jc.utils import jc.parsers.universal class info(): - version = '1.5' + """Provides parser metadata (version, author, etc.)""" + version = '1.6' description = '`crontab` file parser with user support' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -153,7 +184,7 @@ class info(): __version__ = info.version -def process(proc_data): +def _process(proc_data): """ Final processing to conform to the schema. @@ -163,38 +194,7 @@ def process(proc_data): Returns: - Dictionary. Structured data with the following schema: - - { - "variables": [ - "name": string, - "value": string - ], - "schedule": [ - { - "occurrence" string, - "minute": [ - string - ], - "hour": [ - string - ], - "day_of_month": [ - string - ], - "month": [ - string - ], - "day_of_week": [ - string - ], - "occurrence": string, - "user": string, - "command": string - } - ] - } - + Dictionary. Structured data to conform to the schema. """ # put itmes in lists try: @@ -279,4 +279,4 @@ def parse(data, raw=False, quiet=False): if raw: return raw_output else: - return process(raw_output) + return _process(raw_output) diff --git a/man/jc.1 b/man/jc.1 index dfde8e31..65d61e53 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -385,7 +385,7 @@ debug - show traceback (\fB-dd\fP for verbose traceback) .TP .B \fB-h\fP -help +help - use `-h --parser_name` for parser documentation .TP .B \fB-m\fP @@ -450,6 +450,12 @@ or using the magic syntax: jc \fB-p\fP ls \fB-al\fP + +For parser documentation: + + +jc \fB-h\fP \fB--ls\fP + .SH AUTHOR Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/templates/manpage_template b/templates/manpage_template index 22b89831..a5b6c96c 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -40,7 +40,7 @@ debug - show traceback (\fB-dd\fP for verbose traceback) .TP .B \fB-h\fP -help +help - use `-h --parser_name` for parser documentation .TP .B \fB-m\fP @@ -105,6 +105,12 @@ or using the magic syntax: jc \fB-p\fP ls \fB-al\fP + +For parser documentation: + + +jc \fB-h\fP \fB--ls\fP + .SH AUTHOR {{ jc.author }} ({{ jc.author_email }}) diff --git a/templates/readme_template b/templates/readme_template index 4d16fced..5642888d 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -130,7 +130,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio ### Options - `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of course!) - `-d` debug mode. Prints trace messages if parsing issues are encountered (use `-dd` for verbose debugging) -- `-h` `jc` help +- `-h` `jc` help. Use `jc -h --parser_name` for parser documentation - `-m` monochrome JSON output - `-p` pretty format the JSON output - `-q` quiet mode. Suppresses parser warning messages