sphinx_terminhtml.directives package

Submodules

sphinx_terminhtml.directives.docs module

class sphinx_terminhtml.directives.docs.SourceType(value)[source]

Bases: str, enum.Enum

An enumeration.

MD = 'markdown'
RST = 'reStructuredText'
class sphinx_terminhtml.directives.docs.TerminHTMLDocsDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: sphinx_terminhtml.directives.terminal.TerminHTMLDirective

run()[source]
Return type

List[Node]

source_type: Optional[sphinx_terminhtml.directives.docs.SourceType] = None
sphinx_terminhtml.directives.docs.docs_node(docs_content)[source]

Creates a literal block node containing the documentation.

Return type

Node

sphinx_terminhtml.directives.terminal module

class sphinx_terminhtml.directives.terminal.TerminHTMLDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: sphinx.util.docutils.SphinxDirective

always_prompt_matchers: List[str] = []
always_setup_commands: List[str] = []
property commands: List[str]
Return type

List[str]

property current_file_folder: pathlib.Path
Return type

Path

property cwd: Optional[pathlib.Path]
Return type

Optional[Path]

has_content = True

May the directive have content?

option_spec = {'allow-exceptions': <function flag>, 'cwd': <function unchanged>, 'cwd-relative-to': <function _validate_cwd_relative_to>, 'disable-cache': <function flag>, 'echo': <function flag>, 'input': <function _get_list>, 'no-force-color': <function flag>, 'prompt-matchers': <function _get_list>, 'setup': <function unchanged>}

Mapping of option names to validator functions.

required_arguments = 0

Number of required directive arguments.

property root_source_dir: pathlib.Path
Return type

Path

run()[source]
Return type

List[Node]

sphinx_terminhtml.directives.terminal.create_terminhtml_directive_with_setup(setup_commands=None, prompt_matchers=None)[source]
Return type

Type[SphinxDirective]

sphinx_terminhtml.directives.terminal.html(content)[source]
Return type

raw