sphinx_terminhtml package

Write bash commands in a Sphinx directive, output an animated HTML/CSS terminal

Subpackages

Submodules

sphinx_terminhtml.assets module

sphinx_terminhtml.assets.download_and_copy_asset_files(app, exc)[source]
sphinx_terminhtml.assets.register_assets(app)[source]

sphinx_terminhtml.cache module

class sphinx_terminhtml.cache.CacheInputs(**data)[source]

Bases: pydantic.main.BaseModel

property cache_key: str
Return type

str

content: Sequence[str]
property file_name: str
Return type

str

options: sphinx_terminhtml.options.RunTerminalOptions
class sphinx_terminhtml.cache.CacheOutput(**data)[source]

Bases: pydantic.main.BaseModel

content: str
property file_name: str
Return type

str

input: sphinx_terminhtml.cache.CacheInputs
class sphinx_terminhtml.cache.TerminalCache(cache_dir=PosixPath('/home/runner/.cache/sphinx-terminhtml'))[source]

Bases: object

__init__(cache_dir=PosixPath('/home/runner/.cache/sphinx-terminhtml'))[source]
get(content, options)[source]
Return type

Optional[CacheOutput]

set(directive_content, options, output_content)[source]
Return type

CacheOutput

sphinx_terminhtml.get_version module

sphinx_terminhtml.get_version.get_sphinx_terminhtml_version()[source]
Return type

str

sphinx_terminhtml.logger module

class sphinx_terminhtml.logger.LogLevel(value)[source]

Bases: str, enum.Enum

An enumeration.

DEBUG = 'DEBUG'
INFO = 'INFO'
class sphinx_terminhtml.logger.LoggingConfig(_env_file='<object object>', _env_file_encoding=None, _env_nested_delimiter=None, _secrets_dir=None, **values)[source]

Bases: pydantic.env_settings.BaseSettings

class Config[source]

Bases: object

env_prefix = 'SPHINX_TERMINHTML_LOG_'
classmethod cast_log_level(v)[source]
level: sphinx_terminhtml.logger.LogLevel

sphinx_terminhtml.options module

class sphinx_terminhtml.options.CWDRelativeTo(value)[source]

Bases: str, enum.Enum

An enumeration.

CURRENT_SOURCE = 'current_source'
CWD = 'cwd'
SOURCES_ROOT = 'sources_root'
class sphinx_terminhtml.options.RunTerminalOptions(_typename, _fields=None, /, **kwargs)

Bases: dict

cwd: Optional[str]
echo: Optional[bool]
input: List[Optional[str]]
setup: str

sphinx_terminhtml.sphinx_setup module

sphinx_terminhtml.sphinx_setup.setup(app)[source]

sphinx_terminhtml.wipe_cache module

sphinx_terminhtml.wipe_cache.wipe_cache_contents(cache_dir=PosixPath('/home/runner/.cache/sphinx-terminhtml'))[source]