geometor.altshiller_court.compile_edition

Book Codex compiler and scholarly apparatus builder for College Geometry (1952).

Compiles verified diplomatic folio transcriptions (resources/college_geometry/<dir>/<NNNN>.rst and <NNNN>.notes.rst), diagram crops (<NNNN>.g<k>.png), structure_map.json, and apparatus registries (persons.json, citations.json, glossary.json, folio_reviews.json) into a synchronized 2-Track Book Codex (English | Commentary) under docsrc/college_geometry/.

Attributes

CHAPTER_COMMENTARY

Functions

apparatus_slug(key) → str

Deterministic anchor slug matching photon_platform.publish.roles.geometry._apparatus_slug.

parse_folio_rst(rst_path) → tuple[dict[str, str], str]

Parse :key: value metadata header and RST body from a <NNNN>.rst file.

demote_headings_for_frontmatter(body) → str

Demote === headings in individual frontmatter folios to --- (and --- to ~~~).

strip_top_chapter_heading(body) → str

Remove top === chapter heading on the first folio of a chapter when chapter wrapper already emits it.

depaginate_folios(folio_entries[, is_frontmatter]) → str

Assemble consecutive transcribed folios into continuous Book Codex RST with .. folio:: milestones.

build_section_table_rst(chapter) → str

Render a clean RST table of chapter sections, folio spans, printed pages, and articles.

build_chapter_unit(chapter, chapter_folios, ...) → dict[str, Any]

Build <slug>/<slug>-en.rst and <slug>/<slug>-commentary.rst for a single chapter unit.

build_apparatus_pages(volume_dir, book_doc_dir, structure) → dict[str, int]

Generate bibliography.rst, persons.rst, glossary.rst, and scan-inventory.rst.

build_book_index(structure, unit_summaries, ...) → None

Write docsrc/college_geometry/index.rst Book Codex master landing page.

compile_edition(repo_root) → dict[str, Any]

Compile the complete College Geometry Book Codex into docsrc/college_geometry/.

get_edition_status(repo_root) → dict[str, Any]

Return a diagnostic summary of ingested scans, transcriptions, graphics, SVGs, and reviews.

Module Contents

geometor.altshiller_court.compile_edition.apparatus_slug(key: str) → str

Deterministic anchor slug matching photon_platform.publish.roles.geometry._apparatus_slug.

geometor.altshiller_court.compile_edition.CHAPTER_COMMENTARY: dict[str, str]
geometor.altshiller_court.compile_edition.parse_folio_rst(rst_path: pathlib.Path) → tuple[dict[str, str], str]

Parse :key: value metadata header and RST body from a <NNNN>.rst file.

geometor.altshiller_court.compile_edition.demote_headings_for_frontmatter(body: str) → str

Demote === headings in individual frontmatter folios to --- (and --- to ~~~).

geometor.altshiller_court.compile_edition.strip_top_chapter_heading(body: str) → str

Remove top === chapter heading on the first folio of a chapter when chapter wrapper already emits it.

geometor.altshiller_court.compile_edition.depaginate_folios(folio_entries: list[tuple[str, str, dict[str, str], str]], is_frontmatter: bool = False) → str

Assemble consecutive transcribed folios into continuous Book Codex RST with .. folio:: milestones.

geometor.altshiller_court.compile_edition.build_section_table_rst(chapter: dict[str, Any]) → str

Render a clean RST table of chapter sections, folio spans, printed pages, and articles.

geometor.altshiller_court.compile_edition.build_chapter_unit(chapter: dict[str, Any], chapter_folios: list[dict[str, Any]], volume_dir: pathlib.Path, book_doc_dir: pathlib.Path) → dict[str, Any]

Build <slug>/<slug>-en.rst and <slug>/<slug>-commentary.rst for a single chapter unit.

geometor.altshiller_court.compile_edition.build_apparatus_pages(volume_dir: pathlib.Path, book_doc_dir: pathlib.Path, structure: dict[str, Any]) → dict[str, int]

Generate bibliography.rst, persons.rst, glossary.rst, and scan-inventory.rst.

geometor.altshiller_court.compile_edition.build_book_index(structure: dict[str, Any], unit_summaries: list[dict[str, Any]], apparatus_counts: dict[str, int], book_doc_dir: pathlib.Path) → None

Write docsrc/college_geometry/index.rst Book Codex master landing page.

geometor.altshiller_court.compile_edition.compile_edition(repo_root: pathlib.Path) → dict[str, Any]

Compile the complete College Geometry Book Codex into docsrc/college_geometry/.

geometor.altshiller_court.compile_edition.get_edition_status(repo_root: pathlib.Path) → dict[str, Any]

Return a diagnostic summary of ingested scans, transcriptions, graphics, SVGs, and reviews.