github ePubLift/epublift cli-v4.0.0

latest release: web-v1.25.0
2 hours ago

Security

  • rustls 0.23.46 (RUSTSEC-2026-0346 to 0349, published on release day),
    used for the metadata lookups' HTTPS connections.

Changed

  • Breaking: images are kept as they are by default. epublift -i book.epub upgrades the structure and leaves JPEG and PNG untouched; add
    --webp to re-encode them to WebP (size-safe, as before). Many readers,
    Kobo e-ink among them, show WebP blank, so keeping images is the default
    that works everywhere. --keep-images still works (it is now the default),
    --target 3.4 still re-encodes to its formats unless --keep-images is
    given, and --kepub --webp is the same as --kepub --kepub-webp. restore
    follows the same rules, with --webp for WebP on re-target.
  • Breaking: the default report goes beside the output, not beside the
    input. With -o elsewhere/, a run no longer writes <input>_report.txt
    into the input's directory, which may be read-only or shared. Without -o
    nothing changes; -r/--report still sets the path.
  • epublift check runs epubveri 0.28.0 and epublift repair runs
    epubsana 0.29.0.
    epubveri checks <style>, <script>, <meta> and
    <base> in EPUB 2 against XHTML 1.1's attribute lists, grades the encoding
    of every XML file, checks MathML attribute names per element (<mi title>
    is now RSC-005, as in epubcheck) and names the rule and the element path
    on SVG findings. epubsana adds safe fixes, applied without asking: SVG
    attribute and element names back to their camelCase (viewbox →
    viewBox, lineargradient → linearGradient), and dir="LTR"/"RTL"
    lowercased. It now asks before giving a document with no <title> one,
    before giving an NCX navPoint with no id one, and an empty title falls
    back to the book's title. It drops an empty optional metadata element in
    an EPUB 3 package too, where it is an error, not only in EPUB 2. Measured
    on 562 books, epubveri 0.26.0 against 0.28.0: the same findings, statuses
    and exit codes on every book.
  • --kepub runs kepubverto 0.2.0, the family's KEPUB converter, in place
    of epublift's own transform. The span ids are kepubify's, as before, but
    kepubverto inserts its markup without re-serializing the document, so
    every other byte stays as it was, and its Kobo style element is valid.
    Measured on 562 books, graded by epubveri 0.28.0 against the same
    conversion without --kepub: the old transform added findings to every
    book (4,686 RSC-005 errors, 22,128 RSC-036 usage notes); kepubverto
    adds none. --kepub with the experimental Zstandard packaging is now
    refused (Kobo reads only a conformant EPUB).
  • The gen-sample test-book binary needs the gen-sample feature
    (cargo run --features gen-sample --bin gen-sample), so installing the
    crate installs epublift alone. The package sent to crates.io holds only
    the code, README, LICENSE and CHANGELOG.

Fixed

  • An upgraded book stays valid far more often. Measured on 562 books
    (epubveri 0.28.0): of 252 valid inputs, 249 come out valid (54 with
    cli-v3.3.0); 44 invalid inputs come out valid. What changed:
    • EPUB 2 metadata is translated to EPUB 3 instead of carrying
      attributes EPUB 3 forbids. opf:role, opf:file-as and an
      identifier's opf:scheme become <meta refines> (role, with
      scheme="marc:relators" for a MARC code; file-as;
      identifier-type); an empty element just loses them. Of several
      dc:dates one stays (publication first); a modification date gives way
      to dcterms:modified, a creation date becomes dcterms:created.
    • The upgrade finishes with epubsana's EPUB 3 fixes, run on the
      packaged book. Its safe fixes are applied — named entities such as
      &nbsp; become the characters they stand for (the new DOCTYPE declares
      none), inline SVG gets the manifest's svg property — and three fixes
      that EPUB 3 requires of a book EPUB 2 accepted: an empty <title>
      filled from the book's table of contents, heading or title, the
      Content-Type meta spelled as EPUB 3 wants it, an empty metadata
      element dropped. Other fixes that need a decision are left to
      epublift repair.
    • The navigation document generated from toc.ncx escapes its text.
      A label such as A &amp; B was written back as a bare &, which made
      the whole book invalid (RSC-016, fatal).
    • An SVG 1.1 DOCTYPE is dropped (OPF-073: EPUB 3 allows no external
      identifier on SVG), unless it declares entities the file needs.
  • A conversion that makes the book larger says so: "Size grew from 0.86
    MB to 0.92 MB (+6.7%)" instead of "Size reduced … (-6.7% savings)". The
    first line of --help no longer says images are converted to WebP.
  • -V no longer says .dirty for a clean cargo install --git build
    (Cargo's untracked .cargo-ok marker counted as a change), and takes no
    hash from a repository the crate merely sits inside.
  • Help texts: meta enrich --lang applies even when the book has a
    dc:language and is never written into the book; meta set --isbn writes
    a dc:identifier, not dc:source; -q/--quality covers AVIF/JPEG XL too.

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

Don't miss a new epublift release

NewReleases is sending notifications on new releases.