Cli2gui Index / Cli2gui / Tojson / Getopt2json
Auto-generated documentation for cli2gui.tojson.getopt2json module.
Show source in getopt2json.py:13
Convert an arg to json, behave in the same way as argparse hence the large amount of duplication.
def actionToJson(action: str, widget: ItemType, short: bool = True) -> Item: ...
Show source in getopt2json.py:28
Categorize long args.
def catLong(actions: list[str]) -> Generator[Item, None, None]: ...
Show source in getopt2json.py:38
Categorize short args.
def catShort(actions: list[str]) -> Generator[Item, None, None]: ...
Show source in getopt2json.py:64
Convert getopt to a dict.
parser (tuple[list[str], list[str]]): getopt parser
ParserRep
- dictionary representing parser object
def convert(parser: tuple[list[str], list[str]]) -> ParserRep: ...
Show source in getopt2json.py:55
Generate a group (or section).
def process(
group: list[str],
groupName: str,
categorize: Callable[[list[str]], Generator[Item, None, None]],
) -> list[Group]: ...