Build both editions into validated EPUBs, print PDFs, and covers - #1
Open
parhamofski46-cyber wants to merge 2 commits into
Open
Build both editions into validated EPUBs, print PDFs, and covers#1parhamofski46-cyber wants to merge 2 commits into
parhamofski46-cyber wants to merge 2 commits into
Conversation
Turns the two source HTML editions into sellable ebooks via a repeatable
build, so the manuscript can keep being revised.
Pipeline per edition:
- covers rendered from src/cover.html in headless Chromium, after
document.fonts.ready so Persian is not captured as tofu, at exactly
1600x2560 plus 600x960 web versions
- source HTML restructured into semantic markup for pandoc: part
dividers promoted to h1 and chapters to h2 so --toc-depth=2 reaches
every chapter, the chapter number folded into its heading so the
navigation reads "Chapter One - Nights", the screen cover and
hand-written contents page dropped in favour of a real cover image
and generated nav, and the decorative part SVGs lifted out to image
files so the XHTML stays valid
- EPUB 3 with all fonts embedded, then the OPF spine and every XHTML
root patched for direction and the archive repacked with mimetype
stored first
- 6x9in interior PDF via Chromium print-to-PDF
Both EPUBs pass epubcheck 5.1.0 with zero errors and zero warnings.
Notes on two decisions that depart from the brief:
Direction is set with the dir attribute and page-progression-direction
rather than CSS. EPUB 3.3 forbids the CSS direction property outright
and epubcheck fails on it (CSS-001), so the CSS route cannot coexist
with the zero-error requirement.
The Persian edition drops its drop cap. A floated ::first-letter lifts
the initial letter out of its word, and in Arabic script that breaks the
joined form - the opening word set as a lone letter followed by a
stranded remainder. The English edition keeps its drop cap.
tools/verify-epub.py re-checks chapter numbering, the interlude's
position between 17 and 18, navigation targets, embedded fonts, and the
absence of letter-spacing in the Persian stylesheet, so manuscript edits
surface as failed checks instead of broken uploads.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019bdYpcXoWnzpRYmF6KKhaw
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bdYpcXoWnzpRYmF6KKhaw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the two source HTML editions into sellable ebooks via a repeatable
build, so the manuscript can keep being revised.
Pipeline per edition:
document.fonts.ready so Persian is not captured as tofu, at exactly
1600x2560 plus 600x960 web versions
dividers promoted to h1 and chapters to h2 so --toc-depth=2 reaches
every chapter, the chapter number folded into its heading so the
navigation reads "Chapter One - Nights", the screen cover and
hand-written contents page dropped in favour of a real cover image
and generated nav, and the decorative part SVGs lifted out to image
files so the XHTML stays valid
root patched for direction and the archive repacked with mimetype
stored first
Both EPUBs pass epubcheck 5.1.0 with zero errors and zero warnings.
Notes on two decisions that depart from the brief:
Direction is set with the dir attribute and page-progression-direction
rather than CSS. EPUB 3.3 forbids the CSS direction property outright
and epubcheck fails on it (CSS-001), so the CSS route cannot coexist
with the zero-error requirement.
The Persian edition drops its drop cap. A floated ::first-letter lifts
the initial letter out of its word, and in Arabic script that breaks the
joined form - the opening word set as a lone letter followed by a
stranded remainder. The English edition keeps its drop cap.
tools/verify-epub.py re-checks chapter numbering, the interlude's
position between 17 and 18, navigation targets, embedded fonts, and the
absence of letter-spacing in the Persian stylesheet, so manuscript edits
surface as failed checks instead of broken uploads.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_019bdYpcXoWnzpRYmF6KKhaw