View Single Post
Old 09-02-2026, 04:28 PM   #13
Kayadelenium
Zealot
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 124
Karma: 200000
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
Doitsu — I spent today on this. Rather than patch plugin.py and main.py, I have written my own, from Sigil's own BSD-licensed plugin API. I could not have taken your code into it in any case: epubveri is dual-licensed, so its repositories cannot accept outside code until there is a contributor agreement, and there is not one yet.

Your plugins are why it exists. They proved the idea, and reading both is what taught me what an editor integration actually needs — most of what I found was my own documentation's fault rather than anything in your code.

What mine does, in case any of it is useful to you:
  • Verifies the downloaded archive against the release's SHA256SUMS.txt before running it. epubveri has shipped that file since 0.12.4.
  • Gives both network calls a timeout, so a hung connection cannot freeze the editor.
  • Parses stdout first, whatever the exit code. Exit 2 has three shapes and only one of them answers on stderr: a bad command line. A missing file and an unreadable input both return a full JSON envelope with stderr empty — the first as a PKG-018 fatal, the second with status "error" and the reason in inputs[].error.
  • Uses epubveri's location as the bookpath, which is a full container-relative path. Two folders can hold the same filename.
  • Escapes everything that goes into Sigil's result XML, including the file path — as you already do for the message. Sigil's launcher builds that line by raw interpolation and escapes none of it.

Two things I would rather ask than decide on my own.

The name. Both are called epubveri, and Sigil keys plugins by name — so a user cannot have both installed, one replaces the other, and they even share the same preferences file under plugins_prefs/epubveri. That is your users as much as mine. I am happy to rename mine to keep yours where it is; tell me what you would prefer.

Settings in a Sigil plugin. I could not find a way to give one a preferences screen — Manage Plugins shows name, version, author, type, engine and platforms and nothing else, so the only routes I found were editing the JSON by hand or shipping a second plugin for one checkbox. I took neither and show everything instead, labelled. You have written more of these than anyone; is there a way I have missed?

It is at https://github.com/veripublica/epubveri-plugins, GPL-3, and unlike the epubveri repository it needs no contributor agreement — so anything in it is yours to take, and you are very welcome to send changes.
Kayadelenium is offline   Reply With Quote