Turn drafts, manuscripts, and chapter files into professional, validation-passing EPUB 3 ebooks. Builds the package correctly (container, OPF metadata, TOC, spine), styles conservatively for Kindle, Apple Books, and Kobo, audits the result, and maps each distributor's upload specs. Triggers when the user asks to make, fix, convert, audit, or publish an ebook or EPUB.
./install.sh epub-ebook-craftname: epub_ebook_craft description: Turn drafts, manuscripts, and chapter files into professional, validation-passing EPUB 3 ebooks. Builds the package correctly (container, OPF metadata, TOC, spine), styles conservatively for Kindle, Apple Books, and Kobo, audits the result, and maps each distributor's upload specs. Triggers when the user asks to make, fix, convert, audit, or publish an ebook or EPUB.
Take a manuscript from draft to a professional EPUB 3 file that passes epubcheck with zero errors and meets the upload specs of the major distributors (KDP, Apple Books, Kobo, Draft2Digital). Covers the full pipeline: source prep, package construction, metadata, navigation and TOC, styling, validation, and the distributor gate checklist.
scripts/epub_build.py with a manifest (copy assets/manifest-template.json): python3 scripts/epub_build.py manifest.json -o book.epub --assets ./assets
Chapters can be .md (converted by a conservative mini-markdown: headings, bold, italic, lists, quotes, images) or .xhtml (used as-is). The builder emits title page, copyright page, cover page, nav TOC with landmarks, a reader-safe stylesheet, and a correctly ordered container (mimetype first, stored uncompressed). See references/epub3-package.md if you need to hand-edit a package.
references/safe-css.md. python3 scripts/epub_audit.py book.epub
Then the real epubcheck (the official W3C/DAISY conformance checker). Java-free route:
npx epubcheck-standalone-cli book.epub
Or the official jar: java -jar epubcheck.jar book.epub. Zero errors is the bar. Fix warnings when cheap. Common error codes and fixes live in references/validation.md.
references/distributor-specs.md holds the per-platform checklist: cover dimensions, file limits, metadata matching rules, TOC requirements. Title and author must match the cover, the title page, and the store metadata exactly, character for character.A finished EPUB must satisfy all of these:
mimetype is the first ZIP entry, stored uncompressed, exactly application/epub+zip.dc:identifier (matching unique-identifier), dc:title, dc:language, and dcterms:modified as YYYY-MM-DDTHH:MM:SSZ.properties="nav") with a working, hyperlinked TOC; every link resolves; landmarks point at spine items.properties="cover-image".references/distributor-specs.md. If a number is not there, look it up from the distributor's own docs. Do not guess.schema:accessibilitySummary and friends) is increasingly required by stores. Add it when publishing to retail; the fields are listed in references/distributor-specs.md.publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.