geometor.altshiller_court.ingest

Standardized 300 DPI folio ingestion for Altshiller-Court’s College Geometry.

Attributes

DEFAULT_ROOT_PDF_NAME

Functions

ensure_source_pdf(repo_root) → pathlib.Path

Ensure resources/college_geometry/pdfs/college_geometry.pdf exists.

load_structure_map(volume_dir) → dict[str, Any]

Load structure_map.json from resources/college_geometry/.

ingest_folios(repo_root[, dpi, force]) → dict[str, Any]

Render all 334 PDF pages at dpi and route into chapter directories.

Module Contents

geometor.altshiller_court.ingest.DEFAULT_ROOT_PDF_NAME = 'College Geometry_ An Introduction to the M - Nathan Altshiller-Court.pdf'
geometor.altshiller_court.ingest.ensure_source_pdf(repo_root: pathlib.Path) → pathlib.Path

Ensure resources/college_geometry/pdfs/college_geometry.pdf exists.

Copies from the root Dover PDF if not yet present in pdfs/, leaving the root file intact.

geometor.altshiller_court.ingest.load_structure_map(volume_dir: pathlib.Path) → dict[str, Any]

Load structure_map.json from resources/college_geometry/.

geometor.altshiller_court.ingest.ingest_folios(repo_root: pathlib.Path, dpi: int = 300, force: bool = False) → dict[str, Any]

Render all 334 PDF pages at dpi and route into chapter directories.

Cover folios (0001 and 0334) preserve full RGB color; interior text and diagram folios (0002–0333) are saved as crisp 8-bit grayscale PNGs with zero loss of line stroke or anti-aliasing fidelity.