From 8a850be85746ee9f56ffafe92d441183e3ffaab1 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 7 Nov 2022 13:26:16 -0800 Subject: [PATCH] doc update --- docs/parsers/os_prober.md | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/parsers/os_prober.md diff --git a/docs/parsers/os_prober.md b/docs/parsers/os_prober.md new file mode 100644 index 00000000..92733454 --- /dev/null +++ b/docs/parsers/os_prober.md @@ -0,0 +1,63 @@ +[Home](https://kellyjonbrazil.github.io/jc/) + + +# jc.parsers.os\_prober + +jc - JSON Convert `os-prober` command output parser + +Usage (cli): + + $ os-prober | jc --os-prober + +or + + $ jc os-prober + +Usage (module): + + import jc + result = jc.parse('os_prober', os_prober_command_output) + +Schema: + + { + 'partition': string, + 'name': string, + 'short_name': string, + 'type': string + } + +Examples: + + $ os-prober | jc --os-prober -p + { + "partition": "/dev/sda1", + "name": "Windows 10", + "short_name": "Windows", + "type": "chain" + } + + + +### parse + +```python +def parse(data: str, raw: bool = False, quiet: bool = False) -> JSONDictType +``` + +Main text parsing function + +Parameters: + + data: (string) text data to parse + raw: (boolean) unprocessed output if True + quiet: (boolean) suppress warning messages if True + +Returns: + + Dictionary. Raw or processed structured data. + +### Parser Information +Compatibility: linux + +Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)