diff --git a/README.md b/README.md index 909e8196..3be52081 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The `jc` parsers can also be used as python modules. In this case the output wil 'when_epoch': 1618614780, 'when_epoch_utc': None}] ``` -> For `jc` Python package documentation, use `help('jc')`, `help('jc.lib')`, or see the [online documentation](https://kellyjonbrazil.github.io/jc/docs/). +> For `jc` Python package documentation, use `help('jc')`, `help('jc.lib')`, or see the [online documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs). Two representations of the data are available. The default representation uses a strict schema per parser and converts known numbers to int/float JSON values. Certain known values of `None` are converted to JSON `null`, known boolean values are converted, and, in some cases, additional semantic context fields are added. diff --git a/docs/lib.md b/docs/lib.md index a8a65017..4601a0bb 100644 --- a/docs/lib.md +++ b/docs/lib.md @@ -65,7 +65,7 @@ Parameters: Returns: Standard Parsers: Dictionary or List of Dictionaries - Streaming Parsers: Generator Object + Streaming Parsers: Generator Object containing Dictionaries ## parser_mod_list @@ -78,10 +78,13 @@ Returns a list of all available parser module names. ```python plugin_parser_mod_list() ``` -Returns a list of plugin parser module names. + +Returns a list of plugin parser module names. This function is a +subset of `parser_mod_list()`. + ## get_help ```python get_help(parser_mod_name) ``` -Show help screen for the selected parser +Show help screen for the selected parser. diff --git a/docs/readme.md b/docs/readme.md index a6d7c1a5..c2f10482 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -7,9 +7,16 @@ JC - JSON CLI output utility This package serializes the output of many standard unix command line tools to dictionaries and lists of dictionaries. -For documentation on each parser, see the -[documentation site](https://kellyjonbrazil.github.io/jc/) or use -`jc.get_help('parser_module_name')` +Interactive Documentation + + >>> help(jc) + >>> help(jc.lib) + >>> help(jc.util) + >>> jc.get_help('parser_module_name') + +Online Documentation + +https://github.com/kellyjonbrazil/jc/tree/master/docs Example: diff --git a/jc/__init__.py b/jc/__init__.py index ca1e8aab..ff2d7e66 100644 --- a/jc/__init__.py +++ b/jc/__init__.py @@ -5,9 +5,16 @@ This package serializes the output of many standard unix command line tools to dictionaries and lists of dictionaries. -For documentation on each parser, see the -[documentation site](https://kellyjonbrazil.github.io/jc/) or use -`jc.get_help('parser_module_name')` +Interactive Documentation + + >>> help(jc) + >>> help(jc.lib) + >>> help(jc.util) + >>> jc.get_help('parser_module_name') + +Online Documentation + +https://github.com/kellyjonbrazil/jc/tree/master/docs Example: diff --git a/jc/lib.py b/jc/lib.py index 39985c77..33b87c85 100644 --- a/jc/lib.py +++ b/jc/lib.py @@ -183,7 +183,7 @@ def parse(parser_mod_name, data, Returns: Standard Parsers: Dictionary or List of Dictionaries - Streaming Parsers: Generator Object + Streaming Parsers: Generator Object containing Dictionaries """ jc_parser = _get_parser(parser_mod_name) @@ -198,9 +198,12 @@ def parser_mod_list(): return [_cliname_to_modname(p) for p in parsers] def plugin_parser_mod_list(): - """Returns a list of plugin parser module names.""" + """ + Returns a list of plugin parser module names. This function is a + subset of `parser_mod_list()`. + """ return [_cliname_to_modname(p) for p in local_parsers] def get_help(parser_mod_name): - """Show help screen for the selected parser""" + """Show help screen for the selected parser.""" help(_get_parser(parser_mod_name)) diff --git a/man/jc.1 b/man/jc.1 index 4761a15c..ceca045d 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -1,4 +1,4 @@ -.TH jc 1 2022-01-19 1.18.0 "JSON CLI output utility" +.TH jc 1 2022-01-20 1.18.0 "JSON CLI output utility" .SH NAME jc \- JSONifies the output of many CLI tools and file-types .SH SYNOPSIS diff --git a/templates/readme_template b/templates/readme_template index da14b2e0..a7918715 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -46,7 +46,7 @@ The `jc` parsers can also be used as python modules. In this case the output wil 'when_epoch': 1618614780, 'when_epoch_utc': None}] ``` -> For `jc` Python package documentation, use `help('jc')`, `help('jc.lib')`, or see the [online documentation](https://kellyjonbrazil.github.io/jc/docs/). +> For `jc` Python package documentation, use `help('jc')`, `help('jc.lib')`, or see the [online documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs). Two representations of the data are available. The default representation uses a strict schema per parser and converts known numbers to int/float JSON values. Certain known values of `None` are converted to JSON `null`, known boolean values are converted, and, in some cases, additional semantic context fields are added.