bundles / papyri 0.0.10 / papyri / gen / Gen / _scan_narrative_sources
function
papyri.gen:Gen._scan_narrative_sources
source: /papyri/gen.py:1055
Signature
def _scan_narrative_sources(self) → tuple[list[tuple[Path, str, list[Section]]], dict[str, str], dict[str, str], dict[str, str]]Summary
Parse every narrative RST file and collect cross-doc link targets.
Extended Summary
Returns (parsed_files, doc_targets, external_targets, doc_titles): - doc_targets maps each RST label to the doc key that defines it. - external_targets maps each hyperlink label to its external URL. - doc_titles maps each doc key to its first heading so toctree entries can render document titles instead of raw paths.
Cached after the first call: the API pass needs the label maps before the narrative pass runs, so docstrings can resolve :ref: labels defined in narrative docs.
Aliases
papyri.gen.Gen._scan_narrative_sources