Cli2gui Index / Cli2gui / Tojson / Docopt2json
Auto-generated documentation for cli2gui.tojson.docopt2json module.
Show source in docopt2json.py:11
Generate json for an action and set the widget - used by the application.
def actionToJson(
action: tuple[str, str, int, Any, str], widget: ItemType, isPos: bool
) -> Item: ...
Show source in docopt2json.py:37
Catergorise each action and generate json.
Each action is in the form (short, long, argcount, value, help_message)
def categorize(
actions: list[tuple[str, str, int, Any, str]], isPos: bool = False
) -> Iterator[Item]: ...
Show source in docopt2json.py:117
Convert getopt to a dict.
parser
Any - docopt parser
ParserRep
- dictionary representing parser object
def convert(parser: Any) -> ParserRep: ...
Show source in docopt2json.py:55
Get the actions as json for the parser.
def extract(parser: Any) -> list[Group]: ...
Show source in docopt2json.py:76
Parse an option help text, adapted from docopt.
def parse(optionDescription: str) -> tuple[str, str, int, Any, str]: ...
Show source in docopt2json.py:94
Parse an option help text, adapted from docopt.
def parseOpt(doc: Any) -> list[tuple[str, str, int, Any, str]]: ...
Show source in docopt2json.py:106
Parse positional arguments from docstring.
def parsePos(doc: str) -> list[tuple[str, str]]: ...
Show source in docopt2json.py:67
Taken from docopt.
def parseSection(name: str, source: str) -> list[str]: ...