mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-17 01:32:37 +02:00
#591 checks the input data with jc utils
This commit is contained in:
@ -9,7 +9,7 @@ class info():
|
|||||||
description = '`amixer` command parser'
|
description = '`amixer` command parser'
|
||||||
author = 'Eden Refael'
|
author = 'Eden Refael'
|
||||||
author_email = 'edenraf@hotmail.com'
|
author_email = 'edenraf@hotmail.com'
|
||||||
compatible = ['linux', 'darwin', 'cygwin', 'aix', 'freebsd']
|
compatible = ['linux']
|
||||||
magic_commands = ['amixer']
|
magic_commands = ['amixer']
|
||||||
tags = ['command']
|
tags = ['command']
|
||||||
|
|
||||||
@ -48,23 +48,25 @@ def parse(
|
|||||||
quiet: bool = False
|
quiet: bool = False
|
||||||
) -> List[Dict]:
|
) -> List[Dict]:
|
||||||
"""
|
"""
|
||||||
Main text parsing function
|
Main text parsing function, The amixer is alsa mixer tool and output, Will work with
|
||||||
|
Linux OS only.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
data: (string) text data to parse
|
data: (string) text data to parse
|
||||||
raw: (boolean) unprocessed output if True
|
raw: (boolean) unprocessed output if True
|
||||||
quiet: (boolean) suppress warning messages if True
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Raw or processed structured data.
|
List of Dictionaries. Raw or processed structured data.
|
||||||
push test
|
push test
|
||||||
"""
|
"""
|
||||||
# jc.utils.compatibility(__name__, info.compatible, quiet)
|
# checks os compatibility and print a stderr massage if not compatible. quiet True could remove this check.
|
||||||
# jc.utils.input_type_check(data)
|
jc.utils.compatibility(__name__, info.compatible, quiet)
|
||||||
#
|
|
||||||
# raw_output = []
|
# check if string
|
||||||
|
jc.utils.input_type_check(data)
|
||||||
|
|
||||||
|
raw_output = []
|
||||||
# cleandata = list(filter(None, data.splitlines()))
|
# cleandata = list(filter(None, data.splitlines()))
|
||||||
#
|
#
|
||||||
# if jc.utils.has_data(data):
|
# if jc.utils.has_data(data):
|
||||||
|
Reference in New Issue
Block a user