doxysphinx.sphinx#

The sphinx module contains classes that are tied to sphinx or resemble sphinx logic.

Module Contents#

Classes#

DirectoryMapper

Mapper that will calculate the output file path for an input file.

SphinxHtmlBuilderDirectoryMapper

Mapper that will calculate the output file path for an input file.

class doxysphinx.sphinx.DirectoryMapper(sphinx_source_dir: pathlib.Path, sphinx_output_dir: pathlib.Path)[source]#

Bases: Protocol

Inheritance diagram of doxysphinx.sphinx.DirectoryMapper

Mapper that will calculate the output file path for an input file.

In docs-as-code tooling (e.g. sphinx) often files from a source dir structure are processed and written to result files in a target dir structure.

The make this mapping an implementation detail this protocol exists. It should be implemented for any special handling in mapping files.

map(path: pathlib.Path) pathlib.Path[source]#

Calculate the path in output for a given path in input.

class doxysphinx.sphinx.SphinxHtmlBuilderDirectoryMapper(sphinx_source_dir: pathlib.Path, sphinx_output_dir: pathlib.Path)[source]#

Mapper that will calculate the output file path for an input file.

This is based on the logic that the sphinx html builder would use.

map(path: pathlib.Path) pathlib.Path[source]#

Calculate the path in output for a given path in input.