Skip to main content

Module book

Module book 

Source
Expand description

Pure helpers for navigating an open EPUB: spine-item loading and table-of-contents resolution. Kept free of any TUI dependency so they can be unit-tested without a terminal.

Structs§

SpineData
Raw data describing a single spine item.

Functions§

chapter_titles_from_book
Compute human-readable titles per spine item.
load_spine_data
Read the spine item at idx, sanitise and paginate to width x height.
load_spine_from_html
Same as load_spine_data but takes pre-fetched HTML. Used by the html-only entry point in the CLI.
spine_hrefs
Collect manifest hrefs for every spine item, in order.