Skip to main content
`Ctrl`+`K`

# doxysphinx.sphinx

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

## 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.

## Module Contents

class doxysphinx.sphinx.DirectoryMapper(sphinx_source_dir: pathlib.Path, sphinx_output_dir: pathlib.Path)

  Bases: `Protocol`

  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

    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)

  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.

  source
  output
  map(path: pathlib.Path) → pathlib.Path

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