|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
[GUI Plugin] epubsana
epubsana for calibre repairs a book in your calibre library with epubsana, my EPUB repair tool. epubsana fixes the defects epubveri reports where there is exactly one correct repair that keeps the content as it is, and leaves everything else alone.
What it does
Why it is safe to point at your library
Nothing is bundled. Like my other calibre plugins, it contains no binary. On first use it downloads epubsana for your platform from epubsana's own GitHub releases, verifies it against that release's published SHA256SUMS.txt before running it, and checks it again before every run. epubsana 0.44.0 or later is required; the plugin downloads the latest. Installing. Download the zip attached to this post, then Preferences / Plugins / Load plugin from file, and restart calibre. If the epubsana button does not appear, add it under Preferences / Toolbars & menus. calibre 6.0 or later is required; if your calibre cannot keep data files with a book, the plugin says so and does not start a repair. I have tested it on calibre 9.19 on macOS; reports from Windows and Linux are very welcome. What would help
Where to report what. Anything about this plugin belongs in this thread or at https://github.com/veripublica/calibre-plugins/issues. A question about a repair itself, what epubsana does to a book, belongs in the epubsana thread, https://www.mobileread.com/forums/sh...d.php?t=374799. Links
Plugin Download Last edited by Kayadelenium; Today at 06:20 AM. |
|
|
|
|
|
#2 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
Before I write the plugin, I would like your view on one thing: where the repaired book goes. I see two ways.
A. The same book record. The repaired file becomes the book's EPUB, and the file as it was before is kept in the same record as ORIGINAL_EPUB, the way calibre's own Polish and Convert keep theirs. Both files stay in your library, side by side in the Book details panel, and calibre's own Restore command there brings the old one back. Metadata, custom columns, annotations and whatever a device plugin stores stay with the book, and sending it to your reader again replaces the copy there. If the book already has an ORIGINAL_EPUB from an earlier conversion or polish, the plugin leaves it alone and keeps its own copy of the pre-repair file with the book, with a menu entry to put it back. B. A new book record. The repaired file is added as a separate book with the same metadata and cover, and the original record is not touched at all. The price is two entries for the same book, in the library and on the reader, and the reading position, annotations, collections and custom columns stay with the old one. I lean towards A. In the epubsana thread, fogice asked how to put a repaired book back into calibre while keeping the reading position Kobo Utilities records, and the answer was to replace the format, not the book. But you are the ones who will live with it, so: 1. Would you use A or B? Should it be a setting? 2. If you see a repair on your reader and do not like it, how would you want to undo it? 3. Is there anything else you would expect from a plugin that changes books in your library? |
|
|
|
|
|
#3 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,868
Karma: 154365287
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Do it like the Modify ePub plugin does it. Modify ePub creates an ORIGINAL_EPUB. But what it does differently to the rest of calibre, is that if you run Modify ePub multiple times, it never touches the ORIGINAL_EPUB. So you can run Modify ePub on your source ePub as much as you want.
|
|
|
|
|
|
#4 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
epubsana for calibre 0.1.0 is out. The zip is attached to the first post, which now describes the plugin as it is.
Thank you, JSWolf: it does what you asked for in #3, the way Modify ePub does. The first repair keeps the EPUB as ORIGINAL_EPUB, and later repairs never touch it, so you can run the plugin on the same book as often as you like. If the book already has an ORIGINAL_EPUB, from a conversion or a polish, that one is left alone too, and the plugin keeps the EPUB from before its repair among the book's data files instead. Put back the EPUB from before the repair, in the plugin's menu, brings back whichever it kept. Nobody asked for the repaired book as a new book record (B in #2), so I did not build it, and there is no setting for it. If you would use one, say so here. |
|
|
|
|
|
#5 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,868
Karma: 154365287
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you do end up making a new database entry for the modified ePub, please make it an option. I quite like the way it's being handled now. Thank you.
|
|
|
|
|
|
#6 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,516
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
|
@Kayadelenium Earlier today I had accidentally inserted the epubveri thread number in the epubsana index entry. I've now corrected it and epubsana is live at https://code.calibre-ebook.com/plugins and the mirror https://plugins.calibre-ebook.com. I'm sorry.
On an unrelated note, this update to the Calibre CSS library might be relevant to the veripublica projects, in case you haven't seen it yet: https://www.mobileread.com/forums/sh...359648&page=31 |
|
|
|
![]() |
| Tags |
| autofix, epub, epubsana, repair, veripublica |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Plugin] epubsana - Repair the book with epubsana. | Kayadelenium | Plugins | 2 | 11-26-2026 07:23 PM |
| [GUI Plugin] Streamer - RSVP Speed Reader plugin for Calibre | npapadacis | Plugins | 8 | 10-28-2026 09:29 AM |
| [GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 04:15 PM |
| [GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 06:25 AM |