Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 3.34 KB

File metadata and controls

60 lines (51 loc) · 3.34 KB

Patch notes

v0.3.0 (2026-07-05)

  • Added an anchorless removal pass. Some producers inject the stamp as plain text with the URL not linked (no <a> to anchor on), e.g. <p>ABC Amber LIT Converter http://www.processtext.com/abclit.html</p> or nested in a <div type="FOOTER">. A text pass now locates the stamp by a text_sig and removes the outermost wrapper whose entire text is the stamp (allowing it to repeat), with the same balanced-element safety. A real sentence that merely mentions the URL is preserved (its wrapper's text is not only the stamp).
  • Watermark entries gained text_sig (a visible-text substring) and phrase (a regex for the stamp's text); href_sig is now optional (a producer may be anchorless-only). Detection keys on both signatures.
  • Found by the first full-library sweep: Jack Ketchum's Off Season and Julia Quinn's The Duke and I both carried the anchorless ABC Amber form that v0.2.0 could not remove.
  • Three new tests: anchorless <p>, anchorless <div type="FOOTER">, and the URL-in-real-prose safety case.

v0.2.0 (2026-07-05)

  • Generalized the single hardcoded OceanofPDF signature into a small watermark registry (WATERMARKS). Each entry is an href signature plus the stamp's visible text; the balanced-element engine, archive rewrite, and detection are now signature-agnostic. Adding a producer is one table entry.

  • Added ABC Amber LIT Converter support (processtext.com/abclit). Its stamp wraps the text in a <b> with the word "Converter" split across the <b> and its inner <a>, so removing only the <a> would orphan "Generated by ABC Amber LIT Conv". The removable-wrapper set now includes the inline elements b/i/em/strong; the "wrapper text must equal the watermark exactly" guard keeps real bold/italic prose safe.

  • Tests cover the ABC Amber <b> removal, a real <b> phrase surviving next to a watermark, and both producers' stamps in one document.

  • --out and -n/--dry-run are now rejected with a clear error (exit 2) in single-file mode instead of being silently ignored. Both flags only ever applied to --batch; in single-file mode oceanstrip book.epub --out dir quietly ignored --out and wrote <name> (cleaned).epub next to the source, which is an easy way to leave a stray file in an import directory. The error points at the fix (positional output path for one file, or --batch).

  • Added a CLI test suite (tests/test_cli.py) covering the guard and the still-valid single-file and batch paths.

v0.1.0 (2026-06-09)

First release. Extracted from a one-off script into a standalone tool.

  • Remove OceanofPDF.com watermark links from EPUB content documents using balanced element matching, so nested wrappers are handled without corrupting the XML.
  • Remove the stray oceanofpdf.com marker file from the archive root.
  • Repair mimetype ordering and compression on rewrite (fixes epubcheck PKG-006 that OceanofPDF's repackaging introduces).
  • Single-file and batch (--batch) modes; --dry-run to report without writing.
  • Originals are never modified.
  • stdlib unittest suite; no third-party dependencies.

Validated on a 3713-book Calibre library: 12 watermarked books found and cleaned with zero epubcheck regressions (three came out with fewer errors than the source, because the watermark link was itself a flagged issue).