github ePubLift/epublift cli-v3.0.0

latest release: web-v1.21.0
5 hours ago

Major: repair changes how it decides and what its exit code means; see
the first item. Nothing else in the command line changes.

Changed

  • epublift repair now runs epubsana, the veripublica family's repairer,
    in place of epublift's own three OPF fixes. It fixes what check finds
    wherever a fix is certain to be right: undeclared HTML entities, invalid ids
    and the links that point at them, repeated or dangling spine and manifest
    entries, empty metadata, unrecognised package versions, font rules for missing
    fonts, and more. On tests/Project_Hail_Mary(Andy_Weir).epub it clears 87 of
    1,171 errors and 33 of 37 usage notes, where the old repair cleared one error.
    On the 544-book test shelf, graded by the same epubveri 0.20.0, 346 books are
    valid after repair --yes against 251 after the old repair (247 before), and
    fatal plus error findings fall from 48,253 to 22,382 (old repair: 48,209). No
    valid book became invalid. The old repair also deleted the description of 3
    of those books (see web-v1.20.0); the new one keeps it.
    • Safe fixes are applied; a fix that needs a decision is asked about in a
      terminal, skipped without one, and applied without asking under the new
      -y/--yes. The old repair applied all of its fixes without asking, so a
      script that relied on it dropping a repeated spine entry now needs --yes.
    • A fix that makes the book worse is undone, and the report says which and
      why.
    • A second pass runs by itself when a fix lets epubveri check part of the
      book for the first time (an unrecognised package version, a fatal error that
      hid a chapter). A book whose version="1.0" showed one error is valid after
      one repair.
    • New: --goal valid|openable and --format json (the veripublica envelope,
      the same shape epubsana --format json prints).
    • A run that applies no fix writes no file, and the output path may not be
      the input.
    • Exit codes now say whether the goal was met, like check: 0 met, 1
      not met, 2 the book could not be repaired at all. repair used to exit 0
      whenever it wrote a file.
    • The web Repair mode still runs the old repair; it moves to epubsana in a
      later release. See docs/repair.md.
  • The validator moves to epubveri 0.20.0, on the CLI and in the browser.
    It adds one error, PKG-021, for an image whose header stops before its width
    and height (a JPEG with no complete SOF segment, a PNG whose IHDR is cut short,
    a GIF that ends before its first image descriptor). epubcheck reports the same
    thing on the same files, so a book with such an image now fails where it
    passed before. On the 544-book test shelf no book's report changes. A
    truncated cover JPEG made for the purpose draws PKG-021 from both epublift check and the browser's Validate mode, which still give identical findings,
    in identical order, for every book. The browser build is epubveri's published
    npm package, as before (vendor/VENDOR.md).

What's Changed

  • build(deps): bump actions/upload-artifact from 5 to 7 by @dependabot[bot] in #57
  • build(deps): bump actions/download-artifact from 5 to 8 by @dependabot[bot] in #56
  • build(deps): bump docker/login-action from 3 to 4 by @dependabot[bot] in #58
  • build(deps): bump structured-zstd from 0.0.55 to 0.0.56 by @dependabot[bot] in #55

Full Changelog: cli-v2.3.0...cli-v3.0.0

Don't miss a new epublift release

NewReleases is sending notifications on new releases.