epubveri for Sigil 0.1.0
Validates the book open in Sigil with
epubveri — no Java, sub-second, and
reporting epubcheck's own message IDs. It reads your book and reports; it
changes nothing.
Install: Plugins → Manage Plugins → Add Plugin, choose
epubveri_v0.1.0.zip. Do not rename the file — Sigil takes the plugin's
folder name from the part before the first underscore. Then run it from
Plugins → Validation → epubveri.
On first use it downloads the epubveri binary for your platform (~3 MB) and
verifies it against that release's SHA256SUMS.txt. The zip contains no
binary.
What it does
- Every finding in Sigil's validation panel with its file, line and character
offset, so double-clicking lands on the character rather than the file. - Validates what Sigil currently holds, including unsaved edits.
- Labels every line —
ERROR,WARNING,USAGE,ADVISORY— and each
advisory says "epubcheck does not report this; the verdict is unaffected".
Only errors, fatals and warnings decide the verdict. A book that passes
epubcheck passes epubveri. - Verifies the binary before every run, not only when it was downloaded —
1.8 ms for 2.8 MB. If the file has changed since it was verified, nothing is
run and the plugin says so. - Keeps epubveri current, at most once an hour, by reading 842 bytes of
checksums rather than asking an API. Turn it off with
"autoupdate": falseinplugins_prefs/epubveri/epubveri.json; then it
never touches the network. - Offline is silent. No error, nothing missing from the report.
What has not been tested
Two people, macOS, one day. Nothing has been run on Windows, which is
where about three quarters of epubveri's users are, and the calibre plugin in
this repository is not finished — do not package it.
Three defects were found today by running it in Sigil that 26 unit tests did
not catch: the zip's filename contract, Sigil's unescaped result XML, and an
off-by-one in the cursor position. That rate has not flattened, which is why
this is 0.1.0 and not 1.0.0.
Bug reports here. A wrong finding rather than a wrong plugin belongs in
epubveri — a wrong error on a
good book is the report we most want.
Credit
Doitsu wrote the first epubveri plugins for Sigil and calibre and proved the
idea; thiago.eec contributed to the calibre one. This is an independent
implementation rather than a fork — none of their code is used — but what it
needed to do was learned from theirs. autostart is his suggestion.