mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
add info class
This commit is contained in:
@ -39,6 +39,16 @@ Examples:
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = 'systemctl parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux']
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
@ -79,12 +89,8 @@ def parse(data, raw=False, quiet=False):
|
||||
|
||||
dictionary raw or processed structured data
|
||||
"""
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, systemctlbsd
|
||||
compatible = ['linux']
|
||||
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, compatible)
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
linedata = data.splitlines()
|
||||
# Clear any blank lines
|
||||
|
Reference in New Issue
Block a user