Skip to content

Latest commit

 

History

History
117 lines (67 loc) · 2.09 KB

getopt2json.md

File metadata and controls

117 lines (67 loc) · 2.09 KB

Getopt2json

Cli2gui Index / Cli2gui / Tojson / Getopt2json

Auto-generated documentation for cli2gui.tojson.getopt2json module.

actionToJson

Show source in getopt2json.py:13

Convert an arg to json, behave in the same way as argparse hence the large amount of duplication.

Signature

def actionToJson(action: str, widget: ItemType, short: bool = True) -> Item: ...

See also

catLong

Show source in getopt2json.py:28

Categorize long args.

Signature

def catLong(actions: list[str]) -> Generator[Item, None, None]: ...

See also

catShort

Show source in getopt2json.py:38

Categorize short args.

Signature

def catShort(actions: list[str]) -> Generator[Item, None, None]: ...

See also

convert

Show source in getopt2json.py:64

Convert getopt to a dict.

Arguments


parser (tuple[list[str], list[str]]): getopt parser

Returns


  • ParserRep - dictionary representing parser object

Signature

def convert(parser: tuple[list[str], list[str]]) -> ParserRep: ...

See also

process

Show source in getopt2json.py:55

Generate a group (or section).

Signature

def process(
    group: list[str],
    groupName: str,
    categorize: Callable[[list[str]], Generator[Item, None, None]],
) -> list[Group]: ...

See also