doxysphinx.writer#
The writer module contains classes that write the docs-as-code output files.
Classes#
Module Contents#
- class doxysphinx.writer.Writer(source_directory: pathlib.Path, toc_generator_type: Type[doxysphinx.toc.TocGenerator] = DoxygenTocGenerator)#
Bases:
digraph inheritance746b9ee29b { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Generic" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "Protocol" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for protocol classes."]; "Generic" -> "Protocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Writer" [URL="#doxysphinx.writer.Writer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Protocol representing a Writer that write docs-as-code files."]; "Protocol" -> "Writer" [arrowsize=0.5,style="setlinewidth(0.5)"]; }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 #
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)#
Writes sphinx-rst files to disk.
- write(parse_result: doxysphinx.html_parser.HtmlParseResult, target_file: pathlib.Path, html_hash: str) pathlib.Path #
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.