Build EPUB
Generate an EPUB from a novel's translated chapters using the build_epub.py script.
Arguments
- •
$ARGUMENTSshould be the novel folder name insidetranslated/ - •Example:
/build-epub after-villain-lies-low - •Example:
/build-epub "No Daughter of Luck Shall Be Spared!" - •If no argument given, list available novels in
translated/and ask which to build
Steps
- •Verify the novel folder exists in
translated/and has ametadata.json - •Check chapter count: Report how many chapter files exist vs how many titles are in metadata.json. Warn if there's a mismatch (missing titles = missing metadata.json entries)
- •Run the build script:
bash
python scripts/build_epub.py "translated/$ARGUMENTS"
- •Report results: Confirm the EPUB was created, its location in
output/, file size, and chapter count
Troubleshooting
- •If
metadata.jsonis missing chapter titles, offer to generate them from context - •If
ebooklibis not installed, runpip install ebooklib - •If the script fails, show the error and suggest fixes