src.geometor.euclid.ingest.stitch_propositions

Module for stitching cropped proposition images into single images.

Attributes

HEATH_DIR

PAGE_WIDTH

CROP_WIDTH

Functions

ensure_dir(path) → None

Ensures a directory exists, creating it if necessary.

load_json(path) → Any

Loads JSON data from a file.

get_book_slug_from_path(path) → Optional[str]

Extracts the book slug from a given path.

stitch_propositions([target_book]) → None

Stitches cropped images for each proposition into a single image.

Module Contents

src.geometor.euclid.ingest.stitch_propositions.HEATH_DIR
src.geometor.euclid.ingest.stitch_propositions.PAGE_WIDTH = 755
src.geometor.euclid.ingest.stitch_propositions.CROP_WIDTH = 640
src.geometor.euclid.ingest.stitch_propositions.ensure_dir(path: pathlib.Path) → None

Ensures a directory exists, creating it if necessary.

src.geometor.euclid.ingest.stitch_propositions.load_json(path: pathlib.Path) → Any

Loads JSON data from a file.

src.geometor.euclid.ingest.stitch_propositions.get_book_slug_from_path(path: pathlib.Path) → str | None

Extracts the book slug from a given path.

src.geometor.euclid.ingest.stitch_propositions.stitch_propositions(target_book: str | None = None) → None

Stitches cropped images for each proposition into a single image.

Parameters:

target_book – Optional book identifier to filter stitching.