Wikin
Documentation generated by Wikin.
Module: Parser (wikin.parser)
Classes
Holds documentation data for a single Python module.
A parser that scans Python files for docstrings and specially formatted variable comments.
__init__(self, root_dir)
Initialize the parser with a root directory or a single file path.
_load_ignore_spec(self)
Loads ignore patterns from docs/.wikinignore if it exists.
parse(self)
Perform a recursive search for Python files and extract documentation from them.
Returns: List[ModuleDoc]: A list of documented modules found.
_parse_file(self, file_path, module_name)
Parses a single Python file using the ast module.
Args: file_path: Path to the .py file. module_name: Dot-separated module name.
Returns: ModuleDoc containing extracted documentation.
_extract_metadata(self, docstring, original_name)
Extracts Wikin-specific metadata from the module docstring.
Args: docstring: The raw module docstring. original_name: The default dot-separated module name.
Returns: tuple: (display_name, cleaned_docstring)
_parse_function(self, node)
Internal helper to create a FunctionDoc from an AST node.