Auto-generated by doc-gen from 4 source files.
doc-gen: Project Documentation Generator.
Generate README files, API documentation, project trees, and dependency graphs from any Python project using only the standard library.
Entry point: dispatch to CLI or TUI based on --tui.
Launch the curses-based TUI.
python -m doc_gen entry point.
Delegate to the CLI entry point.
Lightweight metadata about a file in the project.
Wrap text in ANSI colour code unless colour is disabled.
Walk root and return a list of FileInfo entries (files only).
Return number of lines in a text file (fast approximate).
Return all .py files under root, skipping excluded dirs.
Read file as UTF-8, falling back to latin-1.
Human-readable file size.
Heuristic: pyproject.toml name, then directory name.
Heuristic for version from pyproject.toml.
Heuristic for description from pyproject.toml.
Return the first-line docstring of a module, if any.
Generate a README.md for the project at args.directory.
Best-effort reconstruction of a source-code snippet for a node.
Format a single function argument with annotation.
Reconstruct human-readable argument signature.
Parse a single Python file into a ModuleDoc.
Yield Markdown lines for a single module's API docs.
Generate API documentation for args.directory.
Return lines for an ASCII project tree.
Print a project tree with file sizes and line counts.
Yield (module_name, alias_or_name, lineno) for each import.
Return one of 'stdlib', 'third-party', 'local'.
Print a dependency report for args.directory.
Build the top-level argument parser.
Top-level entry point: parse args, dispatch.
A scrollable text buffer rendered into a curses window.
__init__(self, lines: list[str]) -> None
render(self, win: Any, top: int, left: int, height: int, width: int) -> None
Paint visible region of the buffer.
scroll_up(self, n: int=1) -> None
scroll_down(self, n: int=1) -> None
page_up(self) -> None
page_down(self) -> None
home(self) -> None
end(self) -> None
_add_colored(win: Any, y: int, x: int, text: str) -> None _ @staticmethod_
Write text at (y, x) with simple ANSI-like colour markup.
Markers: @G@text@@ = green, @Y@text@@ = yellow, @C@text@@ = cyan, @M@text@@ = magenta, @B@text@@ = blue/bold, @D@text@@ = dim, @@ = reset.
Initialise curses colour pairs if the terminal supports colour.
Render a menu in window win.
Show a one-line text input prompt. Returns the entered string or None on cancel.
Show a scrollable result in a full-screen overlay.
Show project tree.
Show API docs.
Show and optionally write README.
Show dependency report.
Launch the curses TUI. If stdscr is None, we call curses.wrapper().
Internal TUI runner — receives a curses window.