generator
Documentation generator — renders parsed code into Markdown and HTML.
Contents
Classes
class
class MarkdownGenerator
Generates Markdown documentation from parsed project data.
Methods
def
def __init__(self)
Initializes a Jinja2 Environment instance.
Args:
TEMPLATES_DIR: The path to the templates directory.
Returns:
A Jinja2 Environment instance configured for file system template loading.
Raises:
None
def
def generate(self, project: ProjectDoc, output_dir: str | Path) -> list[Path]
Generate Markdown files for the entire project. Returns list of created files.
class
class HTMLGenerator
Generates styled HTML documentation from parsed project data.
Methods
def
def __init__(self)
Initialize a Jinja2 template environment and load CSS styles.
Args:
None
Returns:
None
Raises:
None
def
def _relative_prefix(self, file_path: Path, output_dir: Path) -> str
Compute the relative prefix from a file back to the output root.
Example: if file is at output/sub/page.html, prefix is '../'
def
def generate(self, project: ProjectDoc, output_dir: str | Path) -> list[Path]
Generate HTML files for the entire project. Returns list of created files.