1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-10-08 23:22:21 +02:00

added airport command parser

This commit is contained in:
Kelly Brazil
2020-03-10 20:35:52 -07:00
parent e3a6c05a58
commit c6c9e06496
7 changed files with 196 additions and 1 deletions

64
docs/parsers/airport.md Normal file
View File

@@ -0,0 +1,64 @@
# jc.parsers.airport
jc - JSON CLI output utility airport Parser
Usage:
specify --airport as the first argument if the piped input is coming from airport
Compatibility:
'darwin'
Examples:
$ airport | jc --airport -p
{
}
$ airport | jc --airport -p -r
{
}
## info
```python
info(self, /, *args, **kwargs)
```
## 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:
{
}
## parse
```python
parse(data, raw=False, quiet=False)
```
Main text parsing function
Parameters:
data: (string) text data to parse
raw: (boolean) output preprocessed JSON if True
quiet: (boolean) suppress warning messages if True
Returns:
Dictionary. Raw or processed structured data.