MCPcopy Index your code
hub / github.com/karpathy/reader3 / ChapterContent

Class ChapterContent

reader3.py:20–30  ·  view source on GitHub ↗

Represents a physical file in the EPUB (Spine Item). A single file might contain multiple logical chapters (TOC entries).

Source from the content-addressed store, hash-verified

18
19@dataclass
20class ChapterContent:
21 """
22 Represents a physical file in the EPUB (Spine Item).
23 A single file might contain multiple logical chapters (TOC entries).
24 """
25 id: str # Internal ID (e.g., 'item_1')
26 href: str # Filename (e.g., 'part01.html')
27 title: str # Best guess title from file
28 content: str # Cleaned HTML with rewritten image paths
29 text: str # Plain text for search/LLM context
30 order: int # Linear reading order
31
32
33@dataclass

Callers 1

process_epubFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected