epubveri for Sigil 0.2.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_sigil_v0.2.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.
Everything below was reported or asked for on
MobileRead.
The summary line is no longer a validation result — and this fixes automation lists
DNSB found that swapping epubcheck for this plugin made an automation list
error on every run, clean books included; BeckyEbook gave the reproduction
and confirmed that removing the summary line is exactly what stops it.
A validation result is not a neutral place to put a sentence: it is how Sigil
is told the book has a problem. Automation has three outcomes for a validation
plugin, and Sigil's own binary names them — Validation Tool Reported No
Problems Found, Aborted due to Validation Errors, Ignored Validation
Errors. Zero results is the first, and one result of any severity is the
second, including info.
The summary is now a result only when there is another result. On a book with
findings it is the last line, where you are already looking, and the list was
going to stop on those findings anyway. On a clean book there is no line at
all and Sigil says No Problems Found by itself. Verified here in an
automation list built with BeckyEbook's steps.
Three settings, and they are off-switches
Asked for by Doitsu: show_usage, show_advisory and show_summary in
plugins_prefs/epubveri/epubveri.json, all defaulting to on and written into
the file on the first run so that the file shows you which choices exist.
Someone who never opens it sees exactly what 0.1.1 showed.
A category you switch off still says so, with its count: the summary reads
1 usage note(s) hidden by your settings. A panel with no usage notes should
never read the same as a panel whose usage notes were filtered — and on Sigil
that line is the only place these settings can be discovered at all.
Anything that is not clearly a no is read as yes. That is deliberately the
opposite of autoupdate, where anything unclear is read as no: that switch
spends your connection, so a misread must not use it; these hide findings, so
a misread must not hide them.
The plugin version is in the summary line
Also Doitsu's, for debugging: epubveri 0.13.3 (plugin 0.2.0) — VALID ….
Two versions because two things can be wrong, and most of what has gone wrong
in this plugin so far was the plugin rather than the validator.
When the plugin cannot run, it now says why
Five paths report a problem and return non-zero — no binary, a failed
integrity check, epubveri would not run, it could not read the book. Each said
so with add_result, and Sigil's PluginRunner::launch checks the return
value before it copies results into the wrapper XML: on anything non-zero it
writes a failed result and returns early. So you were told the plugin had
failed and nothing about why, and none of those five messages had ever
reached anybody. They are printed now, which reaches the output window on
both paths. That is DiapDealer's advice from the same thread, applied to a
line he did not mean it for.
A new icon, and no tile
DiapDealer pointed out that Sigil on Linux takes any theme colour
imaginable and that simpler is best across three platforms. The old tile was
legible everywhere — it carried its own ground — but a filled tile reads as a
badge dropped into a row of glyphs that are strokes on nothing, and inside it
the page was about 7 px wide at 16 px with the tick smaller still.
It is now a filled document silhouette with the tick knocked out of it. It
still carries its own contrast, so no theme shows through, but the outline is
the mark rather than a rectangle drawn around the mark. Its geometry lives in
one place and both plugin.svg and plugin.png are generated from it, with
tests comparing the shipped files against it — Sigil prefers the SVG and falls
back to the PNG, and a mark edited in one and not the other is a difference
only somebody on the other platform would ever see.
The archive says which editor it is for
epubveri_sigil_vX.Y.Z.zip. Both plugins shipped a file called
epubveri_vX.Y.Z.zip, so a download said nothing about which editor it was
for and the two names would collide once the versions met. PeterT asked
for this. Only half the name was free: epubveri has to stay before the first
underscore, since that is where Sigil gets the folder name.
Verified in Sigil, not only in tests
Installed from this archive and run on real books: the summary in place, a
clean book giving Sigil's own No Problems Found, an automation list moving
on, and the settings file written on first run. 49 tests, but every defect
this plugin has had was found by running it in the editor and none by a test
suite, so that is the sentence that matters.