mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
doc update
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
jc changelog
|
jc changelog
|
||||||
|
|
||||||
|
20210408 v1.15.1
|
||||||
|
- New feature to show parser documentation interactively with -h --parsername
|
||||||
|
for example: $ jc -h --arp
|
||||||
|
- Add man page to pypi package for easier packaging in homebrew
|
||||||
|
- Add Systeminfo parser tested on Windows 10
|
||||||
|
|
||||||
20210407 v1.15.0
|
20210407 v1.15.0
|
||||||
- Add acpi command parser tested on linux
|
- Add acpi command parser tested on linux
|
||||||
- Add upower command parser tested on linux
|
- Add upower command parser tested on linux
|
||||||
|
@ -17,6 +17,19 @@ Usage (module):
|
|||||||
import jc.parsers.uname
|
import jc.parsers.uname
|
||||||
result = jc.parsers.uname.parse(uname_command_output)
|
result = jc.parsers.uname.parse(uname_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"kernel_name": string,
|
||||||
|
"node_name": string,
|
||||||
|
"kernel_release": string,
|
||||||
|
"operating_system": string,
|
||||||
|
"hardware_platform": string,
|
||||||
|
"processor": string,
|
||||||
|
"machine": string,
|
||||||
|
"kernel_version": string
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'freebsd'
|
'linux', 'darwin', 'freebsd'
|
||||||
@ -40,34 +53,7 @@ Example:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
{
|
|
||||||
"kernel_name": string,
|
|
||||||
"node_name": string,
|
|
||||||
"kernel_release": string,
|
|
||||||
"operating_system": string,
|
|
||||||
"hardware_platform": string,
|
|
||||||
"processor": string,
|
|
||||||
"machine": string,
|
|
||||||
"kernel_version": string
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -19,6 +19,68 @@ Usage (module):
|
|||||||
import jc.parsers.upower
|
import jc.parsers.upower
|
||||||
result = jc.parsers.upower.parse(upower_command_output)
|
result = jc.parsers.upower.parse(upower_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": string,
|
||||||
|
"device_name": string,
|
||||||
|
"native_path": string,
|
||||||
|
"power_supply": boolean,
|
||||||
|
"updated": string,
|
||||||
|
"updated_epoch": integer, # null if date-time conversion fails
|
||||||
|
"updated_epoch_utc": integer, # null if date-time conversion fails
|
||||||
|
"updated_seconds_ago": integer,
|
||||||
|
"has_history": boolean,
|
||||||
|
"has_statistics": boolean,
|
||||||
|
"detail": {
|
||||||
|
"type": string,
|
||||||
|
"warning_level": string, # null if none
|
||||||
|
"online": boolean,
|
||||||
|
"icon_name": string
|
||||||
|
"present": boolean,
|
||||||
|
"rechargeable": boolean,
|
||||||
|
"state": string,
|
||||||
|
"energy": float,
|
||||||
|
"energy_unit": string,
|
||||||
|
"energy_empty": float,
|
||||||
|
"energy_empty_unit": string,
|
||||||
|
"energy_full": float,
|
||||||
|
"energy_full_unit": string,
|
||||||
|
"energy_full_design": float,
|
||||||
|
"energy_full_design_unit": string,
|
||||||
|
"energy_rate": float,
|
||||||
|
"energy_rate_unit": string,
|
||||||
|
"voltage": float,
|
||||||
|
"voltage_unit": string,
|
||||||
|
"time_to_full": float,
|
||||||
|
"time_to_full_unit": string,
|
||||||
|
"percentage": float,
|
||||||
|
"capacity": float,
|
||||||
|
"technology": string
|
||||||
|
},
|
||||||
|
"history_charge": [
|
||||||
|
{
|
||||||
|
"time": integer,
|
||||||
|
"percent_charged": float,
|
||||||
|
"status": string
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"history_rate":[
|
||||||
|
{
|
||||||
|
"time": integer,
|
||||||
|
"percent_charged": float,
|
||||||
|
"status": string
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"daemon_version": string,
|
||||||
|
"on_battery": boolean,
|
||||||
|
"lid_is_closed": boolean,
|
||||||
|
"lid_is_present": boolean,
|
||||||
|
"critical_action": string
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux'
|
'linux'
|
||||||
@ -138,83 +200,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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,
|
|
||||||
"device_name": string,
|
|
||||||
"native_path": string,
|
|
||||||
"power_supply": boolean,
|
|
||||||
"updated": string,
|
|
||||||
"updated_epoch": integer, # null if date-time conversion fails
|
|
||||||
"updated_epoch_utc": integer, # null if date-time conversion fails
|
|
||||||
"updated_seconds_ago": integer,
|
|
||||||
"has_history": boolean,
|
|
||||||
"has_statistics": boolean,
|
|
||||||
"detail": {
|
|
||||||
"type": string,
|
|
||||||
"warning_level": string, # null if none
|
|
||||||
"online": boolean,
|
|
||||||
"icon_name": string
|
|
||||||
"present": boolean,
|
|
||||||
"rechargeable": boolean,
|
|
||||||
"state": string,
|
|
||||||
"energy": float,
|
|
||||||
"energy_unit": string,
|
|
||||||
"energy_empty": float,
|
|
||||||
"energy_empty_unit": string,
|
|
||||||
"energy_full": float,
|
|
||||||
"energy_full_unit": string,
|
|
||||||
"energy_full_design": float,
|
|
||||||
"energy_full_design_unit": string,
|
|
||||||
"energy_rate": float,
|
|
||||||
"energy_rate_unit": string,
|
|
||||||
"voltage": float,
|
|
||||||
"voltage_unit": string,
|
|
||||||
"time_to_full": float,
|
|
||||||
"time_to_full_unit": string,
|
|
||||||
"percentage": float,
|
|
||||||
"capacity": float,
|
|
||||||
"technology": string
|
|
||||||
},
|
|
||||||
"history_charge": [
|
|
||||||
{
|
|
||||||
"time": integer,
|
|
||||||
"percent_charged": float,
|
|
||||||
"status": string
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"history_rate":[
|
|
||||||
{
|
|
||||||
"time": integer,
|
|
||||||
"percent_charged": float,
|
|
||||||
"status": string
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"daemon_version": string,
|
|
||||||
"on_battery": boolean,
|
|
||||||
"lid_is_closed": boolean,
|
|
||||||
"lid_is_present": boolean,
|
|
||||||
"critical_action": string
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -15,6 +15,24 @@ Usage (module):
|
|||||||
import jc.parsers.uptime
|
import jc.parsers.uptime
|
||||||
result = jc.parsers.uptime.parse(uptime_command_output)
|
result = jc.parsers.uptime.parse(uptime_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"time": string,
|
||||||
|
"time_hour": integer,
|
||||||
|
"time_minute": integer,
|
||||||
|
"time_second": integer, # null if not displayed
|
||||||
|
"uptime": string,
|
||||||
|
"uptime_days": integer,
|
||||||
|
"uptime_hours": integer,
|
||||||
|
"uptime_minutes": integer,
|
||||||
|
"uptime_total_seconds": integer,
|
||||||
|
"users": integer,
|
||||||
|
"load_1m": float,
|
||||||
|
"load_5m": float,
|
||||||
|
"load_15m": float
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -53,39 +71,7 @@ Example:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
{
|
|
||||||
"time": string,
|
|
||||||
"time_hour": integer,
|
|
||||||
"time_minute": integer,
|
|
||||||
"time_second": integer, # null if not displayed
|
|
||||||
"uptime": string,
|
|
||||||
"uptime_days": integer,
|
|
||||||
"uptime_hours": integer,
|
|
||||||
"uptime_minutes": integer,
|
|
||||||
"uptime_total_seconds": integer,
|
|
||||||
"users": integer,
|
|
||||||
"load_1m": float,
|
|
||||||
"load_5m": float,
|
|
||||||
"load_15m": float
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -15,6 +15,21 @@ Usage (module):
|
|||||||
import jc.parsers.w
|
import jc.parsers.w
|
||||||
result = jc.parsers.w.parse(w_command_output)
|
result = jc.parsers.w.parse(w_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"user": string, # '-'' = null
|
||||||
|
"tty": string, # '-'' = null
|
||||||
|
"from": string, # '-'' = null
|
||||||
|
"login_at": string, # '-'' = null
|
||||||
|
"idle": string, # '-'' = null
|
||||||
|
"jcpu": string,
|
||||||
|
"pcpu": string,
|
||||||
|
"what": string # '-'' = null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -94,36 +109,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"user": string, # '-'' = null
|
|
||||||
"tty": string, # '-'' = null
|
|
||||||
"from": string, # '-'' = null
|
|
||||||
"login_at": string, # '-'' = null
|
|
||||||
"idle": string, # '-'' = null
|
|
||||||
"jcpu": string,
|
|
||||||
"pcpu": string,
|
|
||||||
"what": string # '-'' = null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -15,6 +15,17 @@ Usage (module):
|
|||||||
import jc.parsers.wc
|
import jc.parsers.wc
|
||||||
result = jc.parsers.wc.parse(wc_command_output)
|
result = jc.parsers.wc.parse(wc_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"filename": string,
|
||||||
|
"lines": integer,
|
||||||
|
"words": integer,
|
||||||
|
"characters": integer
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -49,32 +60,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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,
|
|
||||||
"lines": integer,
|
|
||||||
"words": integer,
|
|
||||||
"characters": integer
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -19,6 +19,23 @@ Usage (module):
|
|||||||
import jc.parsers.who
|
import jc.parsers.who
|
||||||
result = jc.parsers.who.parse(who_command_output)
|
result = jc.parsers.who.parse(who_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"user": string,
|
||||||
|
"event": string,
|
||||||
|
"writeable_tty": string,
|
||||||
|
"tty": string,
|
||||||
|
"time": string,
|
||||||
|
"epoch": integer, # naive timestamp. null if time cannot be converted
|
||||||
|
"idle": string,
|
||||||
|
"pid": integer,
|
||||||
|
"from": string,
|
||||||
|
"comment": string
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -121,38 +138,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"user": string,
|
|
||||||
"event": string,
|
|
||||||
"writeable_tty": string,
|
|
||||||
"tty": string,
|
|
||||||
"time": string,
|
|
||||||
"epoch": integer, # naive timestamp. null if time cannot be converted
|
|
||||||
"idle": string,
|
|
||||||
"pid": integer,
|
|
||||||
"from": string,
|
|
||||||
"comment": string
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -11,6 +11,16 @@ Usage (module):
|
|||||||
import jc.parsers.xml
|
import jc.parsers.xml
|
||||||
result = jc.parsers.xml.parse(xml_file_output)
|
result = jc.parsers.xml.parse(xml_file_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
XML Document converted to a Dictionary
|
||||||
|
See https://github.com/martinblech/xmltodict for details
|
||||||
|
|
||||||
|
{
|
||||||
|
"key1": string/object,
|
||||||
|
"key2": string/object
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||||
@ -66,28 +76,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## process
|
|
||||||
```python
|
|
||||||
process(proc_data)
|
|
||||||
```
|
|
||||||
|
|
||||||
Final processing to conform to the schema.
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
proc_data: (Dictionary) raw structured data to process
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Dictionary representing an XML document:
|
|
||||||
|
|
||||||
{
|
|
||||||
XML Document converted to a Dictionary
|
|
||||||
See https://github.com/martinblech/xmltodict for details
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -11,6 +11,18 @@ Usage (module):
|
|||||||
import jc.parsers.yaml
|
import jc.parsers.yaml
|
||||||
result = jc.parsers.yaml.parse(yaml_file_output)
|
result = jc.parsers.yaml.parse(yaml_file_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
YAML Document converted to a Dictionary
|
||||||
|
See https://pypi.org/project/ruamel.yaml for details
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"key1": string/int/float/boolean/null/array/object,
|
||||||
|
"key2": string/int/float/boolean/null/array/object
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||||
@ -78,30 +90,7 @@ Examples:
|
|||||||
```python
|
```python
|
||||||
info()
|
info()
|
||||||
```
|
```
|
||||||
|
Provides parser metadata (version, author, etc.)
|
||||||
|
|
||||||
## 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. Each dictionary represents a YAML document:
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
YAML Document converted to a Dictionary
|
|
||||||
See https://pypi.org/project/ruamel.yaml for details
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
```python
|
```python
|
||||||
|
@ -15,6 +15,19 @@ Usage (module):
|
|||||||
import jc.parsers.uname
|
import jc.parsers.uname
|
||||||
result = jc.parsers.uname.parse(uname_command_output)
|
result = jc.parsers.uname.parse(uname_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"kernel_name": string,
|
||||||
|
"node_name": string,
|
||||||
|
"kernel_release": string,
|
||||||
|
"operating_system": string,
|
||||||
|
"hardware_platform": string,
|
||||||
|
"processor": string,
|
||||||
|
"machine": string,
|
||||||
|
"kernel_version": string
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'freebsd'
|
'linux', 'darwin', 'freebsd'
|
||||||
@ -37,7 +50,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.4'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.5'
|
||||||
description = '`uname -a` command parser'
|
description = '`uname -a` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -54,7 +68,7 @@ class ParseError(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -64,18 +78,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Dictionary. Structured data with the following schema:
|
Dictionary. Structured data to conform to the schema.
|
||||||
|
|
||||||
{
|
|
||||||
"kernel_name": string,
|
|
||||||
"node_name": string,
|
|
||||||
"kernel_release": string,
|
|
||||||
"operating_system": string,
|
|
||||||
"hardware_platform": string,
|
|
||||||
"processor": string,
|
|
||||||
"machine": string,
|
|
||||||
"kernel_version": string
|
|
||||||
}
|
|
||||||
"""
|
"""
|
||||||
# nothing to process
|
# nothing to process
|
||||||
return proc_data
|
return proc_data
|
||||||
@ -138,4 +141,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -17,6 +17,68 @@ Usage (module):
|
|||||||
import jc.parsers.upower
|
import jc.parsers.upower
|
||||||
result = jc.parsers.upower.parse(upower_command_output)
|
result = jc.parsers.upower.parse(upower_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": string,
|
||||||
|
"device_name": string,
|
||||||
|
"native_path": string,
|
||||||
|
"power_supply": boolean,
|
||||||
|
"updated": string,
|
||||||
|
"updated_epoch": integer, # null if date-time conversion fails
|
||||||
|
"updated_epoch_utc": integer, # null if date-time conversion fails
|
||||||
|
"updated_seconds_ago": integer,
|
||||||
|
"has_history": boolean,
|
||||||
|
"has_statistics": boolean,
|
||||||
|
"detail": {
|
||||||
|
"type": string,
|
||||||
|
"warning_level": string, # null if none
|
||||||
|
"online": boolean,
|
||||||
|
"icon_name": string
|
||||||
|
"present": boolean,
|
||||||
|
"rechargeable": boolean,
|
||||||
|
"state": string,
|
||||||
|
"energy": float,
|
||||||
|
"energy_unit": string,
|
||||||
|
"energy_empty": float,
|
||||||
|
"energy_empty_unit": string,
|
||||||
|
"energy_full": float,
|
||||||
|
"energy_full_unit": string,
|
||||||
|
"energy_full_design": float,
|
||||||
|
"energy_full_design_unit": string,
|
||||||
|
"energy_rate": float,
|
||||||
|
"energy_rate_unit": string,
|
||||||
|
"voltage": float,
|
||||||
|
"voltage_unit": string,
|
||||||
|
"time_to_full": float,
|
||||||
|
"time_to_full_unit": string,
|
||||||
|
"percentage": float,
|
||||||
|
"capacity": float,
|
||||||
|
"technology": string
|
||||||
|
},
|
||||||
|
"history_charge": [
|
||||||
|
{
|
||||||
|
"time": integer,
|
||||||
|
"percent_charged": float,
|
||||||
|
"status": string
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"history_rate":[
|
||||||
|
{
|
||||||
|
"time": integer,
|
||||||
|
"percent_charged": float,
|
||||||
|
"status": string
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"daemon_version": string,
|
||||||
|
"on_battery": boolean,
|
||||||
|
"lid_is_closed": boolean,
|
||||||
|
"lid_is_present": boolean,
|
||||||
|
"critical_action": string
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux'
|
'linux'
|
||||||
@ -135,7 +197,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.0'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.1'
|
||||||
description = '`upower` command parser'
|
description = '`upower` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -149,7 +212,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -159,67 +222,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Structured data with the following schema:
|
List of Dictionaries. Structured data to conform to the schema.
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"type": string,
|
|
||||||
"device_name": string,
|
|
||||||
"native_path": string,
|
|
||||||
"power_supply": boolean,
|
|
||||||
"updated": string,
|
|
||||||
"updated_epoch": integer, # null if date-time conversion fails
|
|
||||||
"updated_epoch_utc": integer, # null if date-time conversion fails
|
|
||||||
"updated_seconds_ago": integer,
|
|
||||||
"has_history": boolean,
|
|
||||||
"has_statistics": boolean,
|
|
||||||
"detail": {
|
|
||||||
"type": string,
|
|
||||||
"warning_level": string, # null if none
|
|
||||||
"online": boolean,
|
|
||||||
"icon_name": string
|
|
||||||
"present": boolean,
|
|
||||||
"rechargeable": boolean,
|
|
||||||
"state": string,
|
|
||||||
"energy": float,
|
|
||||||
"energy_unit": string,
|
|
||||||
"energy_empty": float,
|
|
||||||
"energy_empty_unit": string,
|
|
||||||
"energy_full": float,
|
|
||||||
"energy_full_unit": string,
|
|
||||||
"energy_full_design": float,
|
|
||||||
"energy_full_design_unit": string,
|
|
||||||
"energy_rate": float,
|
|
||||||
"energy_rate_unit": string,
|
|
||||||
"voltage": float,
|
|
||||||
"voltage_unit": string,
|
|
||||||
"time_to_full": float,
|
|
||||||
"time_to_full_unit": string,
|
|
||||||
"percentage": float,
|
|
||||||
"capacity": float,
|
|
||||||
"technology": string
|
|
||||||
},
|
|
||||||
"history_charge": [
|
|
||||||
{
|
|
||||||
"time": integer,
|
|
||||||
"percent_charged": float,
|
|
||||||
"status": string
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"history_rate":[
|
|
||||||
{
|
|
||||||
"time": integer,
|
|
||||||
"percent_charged": float,
|
|
||||||
"status": string
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"daemon_version": string,
|
|
||||||
"on_battery": boolean,
|
|
||||||
"lid_is_closed": boolean,
|
|
||||||
"lid_is_present": boolean,
|
|
||||||
"critical_action": string
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
"""
|
||||||
for entry in proc_data:
|
for entry in proc_data:
|
||||||
# time conversions
|
# time conversions
|
||||||
@ -414,4 +417,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -13,6 +13,24 @@ Usage (module):
|
|||||||
import jc.parsers.uptime
|
import jc.parsers.uptime
|
||||||
result = jc.parsers.uptime.parse(uptime_command_output)
|
result = jc.parsers.uptime.parse(uptime_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"time": string,
|
||||||
|
"time_hour": integer,
|
||||||
|
"time_minute": integer,
|
||||||
|
"time_second": integer, # null if not displayed
|
||||||
|
"uptime": string,
|
||||||
|
"uptime_days": integer,
|
||||||
|
"uptime_hours": integer,
|
||||||
|
"uptime_minutes": integer,
|
||||||
|
"uptime_total_seconds": integer,
|
||||||
|
"users": integer,
|
||||||
|
"load_1m": float,
|
||||||
|
"load_5m": float,
|
||||||
|
"load_15m": float
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -50,7 +68,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.4'
|
||||||
description = '`uptime` command parser'
|
description = '`uptime` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -63,7 +82,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -73,23 +92,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Dictionary. Structured data with the following schema:
|
Dictionary. Structured data to conform to the schema.
|
||||||
|
|
||||||
{
|
|
||||||
"time": string,
|
|
||||||
"time_hour": integer,
|
|
||||||
"time_minute": integer,
|
|
||||||
"time_second": integer, # null if not displayed
|
|
||||||
"uptime": string,
|
|
||||||
"uptime_days": integer,
|
|
||||||
"uptime_hours": integer,
|
|
||||||
"uptime_minutes": integer,
|
|
||||||
"uptime_total_seconds": integer,
|
|
||||||
"users": integer,
|
|
||||||
"load_1m": float,
|
|
||||||
"load_5m": float,
|
|
||||||
"load_15m": float
|
|
||||||
}
|
|
||||||
"""
|
"""
|
||||||
if 'time' in proc_data:
|
if 'time' in proc_data:
|
||||||
time_list = proc_data['time'].split(':')
|
time_list = proc_data['time'].split(':')
|
||||||
@ -186,4 +189,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -13,6 +13,21 @@ Usage (module):
|
|||||||
import jc.parsers.w
|
import jc.parsers.w
|
||||||
result = jc.parsers.w.parse(w_command_output)
|
result = jc.parsers.w.parse(w_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"user": string, # '-'' = null
|
||||||
|
"tty": string, # '-'' = null
|
||||||
|
"from": string, # '-'' = null
|
||||||
|
"login_at": string, # '-'' = null
|
||||||
|
"idle": string, # '-'' = null
|
||||||
|
"jcpu": string,
|
||||||
|
"pcpu": string,
|
||||||
|
"what": string # '-'' = null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -92,7 +107,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.4'
|
||||||
description = '`w` command parser'
|
description = '`w` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -105,7 +121,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -115,20 +131,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Structured data with the following schema:
|
List of Dictionaries. Structured data to conform to the schema.
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"user": string, # '-'' = null
|
|
||||||
"tty": string, # '-'' = null
|
|
||||||
"from": string, # '-'' = null
|
|
||||||
"login_at": string, # '-'' = null
|
|
||||||
"idle": string, # '-'' = null
|
|
||||||
"jcpu": string,
|
|
||||||
"pcpu": string,
|
|
||||||
"what": string # '-'' = null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
"""
|
||||||
for entry in proc_data:
|
for entry in proc_data:
|
||||||
null_list = ['user', 'tty', 'from', 'login_at', 'idle', 'what']
|
null_list = ['user', 'tty', 'from', 'login_at', 'idle', 'what']
|
||||||
@ -196,4 +199,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -13,6 +13,17 @@ Usage (module):
|
|||||||
import jc.parsers.wc
|
import jc.parsers.wc
|
||||||
result = jc.parsers.wc.parse(wc_command_output)
|
result = jc.parsers.wc.parse(wc_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"filename": string,
|
||||||
|
"lines": integer,
|
||||||
|
"words": integer,
|
||||||
|
"characters": integer
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -46,7 +57,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.0'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.1'
|
||||||
description = '`wc` command parser'
|
description = '`wc` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -59,7 +71,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -69,16 +81,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Structured data with the following schema:
|
List of Dictionaries. Structured data to conform to the schema.
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"filename": string,
|
|
||||||
"lines": integer,
|
|
||||||
"words": integer,
|
|
||||||
"characters": integer
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for entry in proc_data:
|
for entry in proc_data:
|
||||||
@ -126,4 +129,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -17,6 +17,23 @@ Usage (module):
|
|||||||
import jc.parsers.who
|
import jc.parsers.who
|
||||||
result = jc.parsers.who.parse(who_command_output)
|
result = jc.parsers.who.parse(who_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"user": string,
|
||||||
|
"event": string,
|
||||||
|
"writeable_tty": string,
|
||||||
|
"tty": string,
|
||||||
|
"time": string,
|
||||||
|
"epoch": integer, # naive timestamp. null if time cannot be converted
|
||||||
|
"idle": string,
|
||||||
|
"pid": integer,
|
||||||
|
"from": string,
|
||||||
|
"comment": string
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||||
@ -119,7 +136,8 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.2'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.3'
|
||||||
description = '`who` command parser'
|
description = '`who` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -133,7 +151,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -143,22 +161,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Structured data with the following schema:
|
List of Dictionaries. Structured data to conform to the schema.
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"user": string,
|
|
||||||
"event": string,
|
|
||||||
"writeable_tty": string,
|
|
||||||
"tty": string,
|
|
||||||
"time": string,
|
|
||||||
"epoch": integer, # naive timestamp. null if time cannot be converted
|
|
||||||
"idle": string,
|
|
||||||
"pid": integer,
|
|
||||||
"from": string,
|
|
||||||
"comment": string
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
"""
|
||||||
for entry in proc_data:
|
for entry in proc_data:
|
||||||
int_list = ['pid']
|
int_list = ['pid']
|
||||||
@ -302,4 +305,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -9,6 +9,16 @@ Usage (module):
|
|||||||
import jc.parsers.xml
|
import jc.parsers.xml
|
||||||
result = jc.parsers.xml.parse(xml_file_output)
|
result = jc.parsers.xml.parse(xml_file_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
XML Document converted to a Dictionary
|
||||||
|
See https://github.com/martinblech/xmltodict for details
|
||||||
|
|
||||||
|
{
|
||||||
|
"key1": string/object,
|
||||||
|
"key2": string/object
|
||||||
|
}
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||||
@ -70,7 +80,8 @@ except Exception:
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.4'
|
||||||
description = 'XML file parser'
|
description = 'XML file parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -83,7 +94,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -93,12 +104,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Dictionary representing an XML document:
|
Dictionary representing an XML document.
|
||||||
|
|
||||||
{
|
|
||||||
XML Document converted to a Dictionary
|
|
||||||
See https://github.com/martinblech/xmltodict for details
|
|
||||||
}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# No further processing
|
# No further processing
|
||||||
@ -131,4 +137,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
@ -9,6 +9,18 @@ Usage (module):
|
|||||||
import jc.parsers.yaml
|
import jc.parsers.yaml
|
||||||
result = jc.parsers.yaml.parse(yaml_file_output)
|
result = jc.parsers.yaml.parse(yaml_file_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
YAML Document converted to a Dictionary
|
||||||
|
See https://pypi.org/project/ruamel.yaml for details
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"key1": string/int/float/boolean/null/array/object,
|
||||||
|
"key2": string/int/float/boolean/null/array/object
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||||
@ -82,7 +94,8 @@ except Exception:
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
|
version = '1.4'
|
||||||
description = 'YAML file parser'
|
description = 'YAML file parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -95,7 +108,7 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def _process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
@ -105,14 +118,7 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Each dictionary represents a YAML document:
|
List of Dictionaries. Each dictionary represents a YAML document.
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
YAML Document converted to a Dictionary
|
|
||||||
See https://pypi.org/project/ruamel.yaml for details
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# No further processing
|
# No further processing
|
||||||
@ -153,4 +159,4 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
else:
|
else:
|
||||||
return process(raw_output)
|
return _process(raw_output)
|
||||||
|
BIN
man/jc.1.gz
BIN
man/jc.1.gz
Binary file not shown.
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='jc',
|
name='jc',
|
||||||
version='1.15.0',
|
version='1.15.1',
|
||||||
author='Kelly Brazil',
|
author='Kelly Brazil',
|
||||||
author_email='kellyjonbrazil@gmail.com',
|
author_email='kellyjonbrazil@gmail.com',
|
||||||
description='Converts the output of popular command-line tools and file-types to JSON.',
|
description='Converts the output of popular command-line tools and file-types to JSON.',
|
||||||
|
Reference in New Issue
Block a user