1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

update docstring

This commit is contained in:
Kelly Brazil
2022-01-31 13:23:22 -08:00
parent d0fcd523cb
commit a4a4d170b5

View File

@ -1,8 +1,10 @@
"""jc - JSON CLI output utility `rsync` command output parser """jc - JSON CLI output utility `rsync` command output parser
Supports the following options with all levels of verbosity: Supports the `-i` or `--itemize-changes` options with all levels of
- `-i` or `--itemize-changes` verbosity.
- `--log-file`
Will also process the rsync log file generated with the `--log-file`
option.
Usage (cli): Usage (cli):
@ -36,7 +38,7 @@ Schema:
"matches": integer, # need to convert "matches": integer, # need to convert
"hash_hits": integer, # need to convert "hash_hits": integer, # need to convert
"false_alarms": integer, # need to convert "false_alarms": integer, # need to convert
"data": integer?, # need to convert "data": integer, # need to convert
"bytes_sec": float, # need to convert "bytes_sec": float, # need to convert
"speedup": float # need to convert "speedup": float # need to convert
}, },
@ -97,7 +99,10 @@ def _process(proc_data: List[Dict]) -> List[Dict]:
List of Dictionaries. Structured to conform to the schema. List of Dictionaries. Structured to conform to the schema.
""" """
int_list = ['process', 'sent', 'received', 'total_size', 'matches', 'has_hits', 'false_alarms', 'data'] int_list = [
'process', 'sent', 'received', 'total_size', 'matches', 'hash_hits',
'false_alarms', 'data'
]
float_list = ['bytes_sec', 'speedup'] float_list = ['bytes_sec', 'speedup']
for item in proc_data: for item in proc_data:
for key in item['summary']: for key in item['summary']: