mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-06 22:32:54 +02:00
add compatibility
This commit is contained in:
@ -78,6 +78,7 @@ $ arp -a | jc --arp -p -r
|
||||
}
|
||||
]
|
||||
"""
|
||||
import jc
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
@ -103,6 +104,8 @@ def process(proc_data):
|
||||
|
||||
|
||||
def parse(data, raw=False):
|
||||
jc.jc.compatibility(__name__,
|
||||
['linux'])
|
||||
|
||||
# code adapted from Conor Heine at:
|
||||
# https://gist.github.com/cahna/43a1a3ff4d075bcd71f9d7120037a501
|
||||
|
@ -63,6 +63,7 @@ $ df | jc --df -p -r
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
@ -106,6 +107,9 @@ def process(proc_data):
|
||||
|
||||
|
||||
def parse(data, raw=False):
|
||||
jc.jc.compatibility(__name__,
|
||||
['linux'])
|
||||
|
||||
cleandata = data.splitlines()
|
||||
fix_headers = cleandata[0].lower().replace('avail ', 'available ')
|
||||
fix_headers = fix_headers.replace('use%', 'use_percent')
|
||||
|
@ -135,6 +135,7 @@ $ ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)'
|
||||
}
|
||||
"""
|
||||
import re
|
||||
import jc
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
@ -165,6 +166,9 @@ def process(proc_data):
|
||||
|
||||
|
||||
def parse(data, raw=False):
|
||||
jc.jc.compatibility(__name__,
|
||||
['linux', 'darwin'])
|
||||
|
||||
raw_output = []
|
||||
|
||||
linedata = data.splitlines()
|
||||
|
Reference in New Issue
Block a user