|
|
#1 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,906
Karma: 24240563
Join Date: Dec 2010
Device: Kindle PW2
|
[Editor Plugin] epubveri
This very simple plugin allows you to validate the EPUB currently open in the Edit Book tool using epubveri, a pure-Rust EPUB validator.
It automatically downloads/updates the epubveri binary from GitHub as needed and shows validation results in a dock widget, similar to the built-in Check Book tool. You can select one or more messages using SHIFT/CTRL+click or CTRL+A and copy them to the clipboard as tab-delimited text. However, this feature might not work in macOS and certain Linux distros. DISCLAIMER: This plugin was created with the help of Claude.ai. License: GNU General Public License v3 (GPL-3) Version History Spoiler:
Last edited by Doitsu; 08-30-2026 at 08:12 AM. Reason: new version with changes by thiago.eec attached |
|
|
|
|
|
#2 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,753
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
One issue so far. It opens the output window at the bottom of the screen instead of the top where the epubcheck plugin does.
|
|
|
|
|
|
#3 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,426
Karma: 9656783
Join Date: Sep 2020
Device: Libra Colour
|
Hi!
IMO, the advantage of this implementation is that EPUBCheck and epubveri outputs are displayed in separate UI locations. FYI, I have added epubveri to the calibre Index of Plugins. |
|
|
|
|
|
#4 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,753
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,380
Karma: 1589505
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
|
|
|
|
|
#7 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,753
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Sometimes it takes a little bit for a new plugin to show up.
|
|
|
|
|
|
#8 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,753
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This was updated almost 6 hours ago and the new version is not yet showing up in calibre? Is there something wrong somewhere?
|
|
|
|
|
|
#9 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,426
Karma: 9656783
Join Date: Sep 2020
Device: Libra Colour
|
Noted. The initial delay for it show up in the plugin updater was likely due to 429 errors on MR side. The current delay for the updater to serve version 0.0.6 could be the same, so let's wait a bit.
|
|
|
|
|
|
#10 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,753
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#11 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,426
Karma: 9656783
Join Date: Sep 2020
Device: Libra Colour
|
I mean error type 429
|
|
|
|
|
|
#12 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,906
Karma: 24240563
Join Date: Dec 2010
Device: Kindle PW2
|
FYI: I've just checked this. plugins.json.bz2 was updated a couple of minutes ago and the update is now shown in Calibre.
|
|
|
|
|
|
#13 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,906
Karma: 24240563
Join Date: Dec 2010
Device: Kindle PW2
|
I've uploaded a new version of the plugin that was modified by @thiago.eec. The new version should improve contrast when dark mode is selected. There's now also a new EPUBCheck style summary at the bottom of the message list.
Last edited by Doitsu; 08-30-2026 at 07:49 AM. |
|
|
|
|
|
#14 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 200000
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
I read this plugin line by line as well — see the Sigil thread for the long version, since most of what I found applies to both and most of it was our documentation's fault rather than the plugin's.
The short version, all now documented in INTEGRATING.md:
One hygiene note. The archive is opened with extractall(), which Python 3.14 changes the default filtering for and which is the classic path-traversal shape. Sigil's plugin extracts a single named member instead, which is the safer pattern of the two. And credit where it is due, since the Sigil post named places where this plugin is the better of the two: timeouts on every request, draft and prerelease filtering, falling back to the installed binary when GitHub is unreachable, and the clipboard write that verifies and retries. That last one is not obvious knowledge. |
|
|
|
|
|
#15 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 200000
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
epubveri for calibre 0.1.0, and this is the "I will try to look at it tomorrow" from the Sigil thread.
https://github.com/veripublica/epubv...calibre-v0.1.0 Doitsu — written from calibre's plugin API, with none of your code in it, for the same licensing reason as the Sigil one. Yours is still the one with users, and on Windows and Linux it is the only one: mine has run on macOS and calibre 9.14 and nowhere else. Please leave yours up. Every finding gets a row with its file, line and message, and activating a row opens the file and puts the cursor on the line. What calibre currently holds is what gets validated, unsaved edits included. The settings — Preferences / Plugins / epubveri / Customize, and the screenshot is what it looks like. Three switches, all on by default, so out of the box the panel says exactly what the command line says.
Two guarantees about those two display switches, because a settings screen is a good place to hide things by accident. Neither can hide an error, a fatal or a warning. And turning one off never makes the report quietly shorter: the summary then says how many findings are not listed and where the switch is. Two things I could not have found by reading, in case they are worth checking in yours. container.commit() edits the book. On an EPUB 3 it calls update_modified_timestamp(), so committing the container you are editing — even to a temporary path — rewrites dcterms:modified. Validating would modify the book. Cloning the container first keeps it out. Cloning alone does not fix it. The timestamp update dirties the OPF, and a dirtied file is re-serialised on the way out rather than copied. calibre's serialiser is not byte-preserving: on my test book it split one line carrying dc:title and dc:language into two and wrote an empty dc:creator as a self-closing tag. The OPF gained a line and every finding below it was reported one line off. Neutralising update_modified_timestamp on the throwaway clone leaves every file byte-identical, which is also what makes the line numbers trustworthy. Six defects turned up in one day. Five appeared only by running it inside calibre, and the sixth by its own tests, on a fixture whose OPF is laid out the way a person writes one — two real books had missed it. That rate has not flattened, which is why this is 0.1.0 and not 1.0.0. Bug reports on mine belong on GitHub rather than in your thread. A wrong finding — a wrong error on a good book — is the report I most want, and that one belongs with epubveri itself. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Plugin] epubveri - Simple epubveri wrapper | Doitsu | Plugins | 29 | Today 06:00 PM |
| [Editor Plugin] Editor Chains | capink | Plugins | 136 | 08-30-2026 08:18 PM |
| [Editor Plugin] Reformat plugin | robert.swita | Plugins | 20 | 02-07-2026 04:32 PM |
| [Editor Plugin] Bulk Image Resizer Plugin | eliteart | Plugins | 11 | 10-27-2024 03:47 PM |
| [Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor | thiago.eec | Development | 7 | 01-09-2019 08:05 PM |