pyparam.help
Help assembler for pyparam
THEMES(dict(str: Theme)) — The theme for the help page.
ProgHighlighter— Apply style to anything that looks like a program name.</>OptnameHighlighter— Apply style to anything that looks like a option name.</>OpttypeHighlighter— Apply style to anything that looks like a option type.</>DefaultHighlighter— Apply style to anything that looks like default value in option desc.</>HelpSection— Base class for all help sections.</>HelpSectionPlain— Plain text section</>HelpSectionUsage— Usage section in help</>HelpSectionOption— Options section in help</>HelpAssembler— Assemble a help page</>
pyparam.help.ProgHighlighter(prog)
Apply style to anything that looks like a program name.
prog(str) — The program name
__call__(text)
Highlight a str or Text instance.
text(Union[str, ~Text]) — Text to highlight.
TypeError— If not called with text or str.
A test instance with highlighting applied.
highlight(text)
Highlight :class:rich.text.Text using regular expressions.
text(~Text) — Text to highlighted.
pyparam.help.OptnameHighlighter()
Apply style to anything that looks like a option name.
Highlight -b and --box in -b, --box <INT>, and all in commands:
i, install
__call__(text)
Highlight a str or Text instance.
text(Union[str, ~Text]) — Text to highlight.
TypeError— If not called with text or str.
A test instance with highlighting applied.
highlight(text)
Highlight :class:rich.text.Text using regular expressions.
text(~Text) — Text to highlighted.
pyparam.help.OpttypeHighlighter()
Apply style to anything that looks like a option type.
__call__(text)
Highlight a str or Text instance.
text(Union[str, ~Text]) — Text to highlight.
TypeError— If not called with text or str.
A test instance with highlighting applied.
highlight(text)
Highlight :class:rich.text.Text using regular expressions.
text(~Text) — Text to highlighted.
pyparam.help.DefaultHighlighter()
Apply style to anything that looks like default value in option desc.
__call__(text)
Highlight a str or Text instance.
text(Union[str, ~Text]) — Text to highlight.
TypeError— If not called with text or str.
A test instance with highlighting applied.
highlight(text)
Highlight :class:rich.text.Text using regular expressions.
text(~Text) — Text to highlighted.
pyparam.help.HelpSection(iterable=())
Base class for all help sections.
__rich_console__(console,_)(ConsoleRenderable, RichCast, str, or Segment) — Implement API from rich to print the help page</>
__rich_console__(console, _) → ConsoleRenderable, RichCast, str, or Segment
Implement API from rich to print the help page
pyparam.help.HelpSectionPlain(iterable=())
Plain text section
__rich_console__(console,_)(ConsoleRenderable, RichCast, str, or Segment) — Implement API from rich to print the help page</>
__rich_console__(console, _) → ConsoleRenderable, RichCast, str, or Segment
Implement API from rich to print the help page
pyparam.help.HelpSectionUsage(iterable=())
Usage section in help
__rich_console__(console,_)(ConsoleRenderable, RichCast, str, or Segment) — Implement API from rich to print the help page</>
__rich_console__(console, _) → ConsoleRenderable, RichCast, str, or Segment
Implement API from rich to print the help page
pyparam.help.HelpSectionOption(iterable=())
Options section in help
__rich_console__(console,_)(ConsoleRenderable, RichCast, str, or Segment) — Implement API from rich to print the help page</>
__rich_console__(console, _) → ConsoleRenderable, RichCast, str, or Segment
Implement API from rich to print the help page
pyparam.help.HelpAssembler(prog, theme, callback)
Assemble a help page
prog(str) — The name of the programtheme(str or Theme) — The theme for the help page
callback(callable) — The callback to modify the help pageconsole(Console) — The console to print the help page