Added
-
Fix common EPUB issues (
epublift repair). New CLI subcommand that
automatically fixes three specific structural defects in an EPUB's package
document — nothing else, and no per-issue prompts, all applicable fixes are
applied in one pass:- Duplicate spine entries — the same chapter listed twice in the
reading order; the first occurrence is kept, later ones are dropped. - Empty or legacy metadata fields — blank
dc:title,dc:date,
dc:publisher, etc. are removed. Safety guard: the book's only
title/identifier/language, or its unique-identifier anchor, is never
removed even if empty. - Dangling references — a manifest entry pointing at a file that
doesn't exist in the archive, or a spine entry pointing at a manifest
entry that doesn't exist (including one just removed above).
This is deliberately narrow — it doesn't touch content documents (chapter
XHTML), and it's not a substitute forcheck/Validate, which still covers
far more of the spec. Writes a new file; the input is never modified.
--dry-runpreviews the fix without writing anything. Ships in the
default build (no new dependencies). See docs/repair.md. - Duplicate spine entries — the same chapter listed twice in the
Full Changelog: cli-v1.11.0...cli-v1.12.0