doxysphinx.writer
#
The writer module contains classes that write the docs-as-code output files.
Module Contents#
Classes#
Protocol representing a Writer that write docs-as-code files. |
|
Writes sphinx-rst files to disk. |
- class doxysphinx.writer.Writer(source_directory: pathlib.Path, toc_generator_type: Type[doxysphinx.toc.TocGenerator] = DoxygenTocGenerator)[source]#
Bases:
Protocol
Protocol representing a Writer that write docs-as-code files.
- write(parse_result: doxysphinx.html_parser.HtmlParseResult, target_file: pathlib.Path, html_hash: str) pathlib.Path [source]#
Write a parsed html result to a target file.
The format of that file is controlled by the concreate Writer implementation.
- Parameters:
parse_result – The result of a previous html parser run
target_file – The target file to write
- Returns:
The written file (should be always identical to target_file input, but allows chaining…)
- class doxysphinx.writer.RstWriter(source_directory: pathlib.Path, toc_generator_type: Type[doxysphinx.toc.TocGenerator] = DoxygenTocGenerator)[source]#
Writes sphinx-rst files to disk.
- write(parse_result: doxysphinx.html_parser.HtmlParseResult, target_file: pathlib.Path, html_hash: str) pathlib.Path [source]#
Write html content to the target_file.
- Parameters:
parse_result – The result of the html parsing (=content + metadata)
target_file – The target docs-as-code (e.g. rst) file
- Returns:
The path the file was written to.