How diocrafts/ai-book-summarizer works
AI EPUB Book Summarizer turns an EPUB into Spanish chapter summaries and a combined book summary. The documented workflow extracts the EPUB, converts its contents into ordered chapter text, summarizes chapters with OpenAI, then summarizes the chapter outputs. The source excerpts show the top-level orchestration and prompt handling; extractor and processor internals were not sampled, so their detailed behavior and internal links are limited to the README’s description.
Main entry points: summarize_book.py Workflow runner · send_prompts.py Prompt processor · epub_processor.py Chapter preparation · epub_extractor.py EPUB extraction
Components 12
EPUB ingestion
- Workflow runner
summarize_book.py - EPUB extraction
epub_extractor.py - Chapter preparation
epub_processor.py - Ordered chapter text
Summary generation
- Prompt processor
send_prompts.py - Base prompt
base_prompt.txt - OpenAI API
Generated outputs
- Chapter summaries
- Book summary
Other components
- Book reader
- EPUB book
- Summary reader
Connections 15
- Book reader → Workflow runner: runs
README.md - Book reader → EPUB book: provides
README.md - Workflow runner → EPUB extraction: calls extract
summarize_book.py - EPUB extraction → Chapter preparation: extracts for processing
README.md - Workflow runner → Chapter preparation: calls process_epub
summarize_book.py - Chapter preparation → Ordered chapter text: creates chapter text
README.md - Workflow runner → Prompt processor: creates processor
summarize_book.py - Prompt processor → Ordered chapter text: reads ordered chapters
send_prompts.py - Prompt processor → Base prompt: reads prompt
send_prompts.py - Prompt processor → OpenAI API: requests completions
send_prompts.py - Prompt processor → Chapter summaries: writes summaries
send_prompts.py - Workflow runner → Chapter summaries: reads summaries
summarize_book.py - Workflow runner → Prompt processor: sends combined prompt
summarize_book.py - Workflow runner → Book summary: writes global summary
summarize_book.py - Summary reader → Book summary: reads
README.md