github ePubLift/epublift cli-v5.0.0

3 hours ago

Changed (breaking)

  • The command line follows veripublica conventions v0.7. What 4.x accepted
    with a warning is now an error, and docs/usage.md has the table:
    • a path without -i, and several paths to archive or restore;
    • -q and -r on the default command and restore: use --quality and
      --report;
    • meta show --json, and meta enrich --lang and --cover.
  • An existing output or report file is refused (exit 2) without -f. 4.x
    replaced it with a warning.
  • A run that fails exits 2, not 1, on every command. check and repair still
    use 1 for a book with problems.
  • The upgrade, import and a re-targeting restore exit 1 when the book they
    wrote still has errors,
    where 4.x exited 0. The file is written and the
    message says how many errors remain.

Added

  • The upgrade deletes direction: ltr from a style sheet, which EPUB 3 forbids
    and EPUB 2 allowed, through epubsana 0.39.0. epubsana declines on any sign of
    right-to-left text in the book. The new fixer that turns http://name%40domain
    into mailto: is not applied by the upgrade: it changes where a link goes, so
    repair asks about it.
  • The upgrade repairs a book labelled older than EPUB 2 first. version="1.0"
    stops a validator at the package document, so errors behind it reached the
    upgraded book. Such a book now gets what repair -y does before it is upgraded.
    The 6 such books on the 562-book shelf come out the same as with repair -y
    run by hand.
  • The upgrade writes align as CSS on tables (float, or centred with
    auto margins), paragraphs and headings (text-align) and images (float or
    vertical-align), as the HTML Standard maps them. <img align="middle"> stays,
    and is counted in the report: no standard CSS gives it exactly. align on div
    and table cells stays too.

Fixed

  • The upgrade keeps a folder spelled two ways. On macOS and Windows, a book
    with both images/ and Images/ came out with one folder and a manifest that
    no longer matched, so the file was lost to the reader. A book with two files
    that differ only in case is now refused on such a system, where one used to
    replace the other silently.
  • A guide entry for an image no longer makes a landmark. EPUB 3 does not allow
    nav.xhtml to link to an image, so a book with its cover image in <guide> came
    out with a new error. The rest of the guide still becomes landmarks.
  • An imported book says when it was made. import wrote a fixed
    dcterms:modified of 2026-01-01 on every book; it now writes the real time.
  • The upgrade keeps an attribute a pseudo-element rule reads. td[width]::before
    would have lost its box when width was written as CSS; the check that the
    book's selectors match as before now covers pseudo-elements.
  • An upgrade no longer leaves a layout attribute the book's CSS already
    overrides.
    <table cellspacing="0" style="border-spacing:0"> kept its
    cellspacing, which EPUB 3 doesn't allow, so a valid EPUB 2 book came out
    invalid. Such an attribute has no effect, so it is now removed and no rule is
    written. An attribute whose property the CSS sets only in part, or may set, stays.

Measured

On the 562-book shelf, cli-v4.6.0 vs this release, repair -y then upgrade then
check with one grader: no book gains errors and 14 lose some (16,276 → 16,243);
valid books go from 429 to 435. Body text and image counts are the same in every
book. The upgrade's exit code is 1 exactly for the 127 books with errors left.

Full Changelog: cli-v4.6.0...cli-v5.0.0

Don't miss a new epublift release

NewReleases is sending notifications on new releases.