1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-21 00:19:42 +02:00

update documentation

This commit is contained in:
Kelly Brazil
2021-04-08 12:42:01 -07:00
parent a4b6846f63
commit e28c08b136
46 changed files with 976 additions and 1209 deletions

View File

@ -15,6 +15,15 @@ Usage (module):
import jc.parsers.env
result = jc.parsers.env.parse(env_command_output)
Schema:
[
{
"name": string,
"value": string
}
]
Compatibility:
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
@ -63,7 +72,8 @@ import jc.utils
class info():
version = '1.2'
"""Provides parser metadata (version, author, etc.)"""
version = '1.3'
description = '`env` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -76,7 +86,7 @@ class info():
__version__ = info.version
def process(proc_data):
def _process(proc_data):
"""
Final processing to conform to the schema.
@ -86,14 +96,7 @@ def process(proc_data):
Returns:
List of Dictionaries. Structured data with the following schema:
[
{
"name": string,
"value": string
}
]
List of Dictionaries. Structured data to conform to the schema.
"""
# rebuild output for added semantic information
@ -139,4 +142,4 @@ def parse(data, raw=False, quiet=False):
if raw:
return raw_output
else:
return process(raw_output)
return _process(raw_output)