|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 245
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto — EPUB to KEPUB for Kobo, without breaking the book
Some of you know epubveri, epubsana and epublift from their threads here. This is the fourth member of the family.
While I was building those three, I converted a lot of books to KEPUB, with kepubify and with epublift's own Kobo conversion, and I checked every result with epubveri. Again and again, a book that was valid before the conversion had errors after it. kepubify is a good program, and it is the reason most of us know what a KEPUB is; I learned the format from it. But I wanted a converter I could trust with any book, so I wrote kepubverto. It is built around one rule: it never makes a book worse. What it does It gives a book what a Kobo needs for reading statistics, faster page turns and the proper progress bar, and nothing else. Your text and the rest of the book are left as they were. The span ids are the same as kepubify's, so if you switch, your reading position and highlights should carry over. kepubverto converts; it does not check or repair. That is the job of epubveri and epubsana, and the planned Sigil and calibre plugins will run them together. kepubverto is built so that a valid book stays valid, and I test that on my whole shelf before every release. On my Kobo, reading position and the progress bar work, both on a converted book alone and at the end of my epublift chain (validate, metadata, optimize, convert). Why it is safe to point at a real book
How to use it today Until the plugins exist:
Code:
kepubverto -i book.epub kepubify's optional extras (smarten punctuation, hyphenation, extra CSS and the rest) are not in this first version, and I have not decided yet which of them will come. It does not add a dummy title page, and it does not change the book's metadata or cover. What would help 1. Your device. I have tested on my own Kobo. If yours is a different model or firmware, convert a book and tell me whether position, progress and page turns behave. If you switch a book you already read with kepubify, I would especially like to know whether your highlights and last position come through. 2. A book that came out worse. Anything that opens, looks or behaves differently after conversion. Your original is untouched, so you can compare the two, and epubveri or epubcheck will check the result. 3. Which kepubify option you miss most. That decides which one comes first. Repo: https://github.com/veripublica/kepubverto It is AGPL, written in Rust, no Java, no C dependencies. |
|
|
|
|
|
#2 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,348
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Hyphenation is the most feature important to add next.
What does kepubverto do that the KePub conversion in the KoboTouch driver doesn't do? |
|
|
|
|
|
#3 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,180
Karma: 182532774
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For my uses, I only used kepubify to add the kobo spans, etc. For hyphenation, smartening punctuation, CSS and find/replace are items that I use other tools for.
Since my preferred layout for reading is left justified, hyphenation is more or less a matter of theoretical interest to me. Currently, I am not using the calibre option to send kepubs to my Kobo Libra Colour. Unless you change settings, the RMSDK renderer is now used for DRMmed ePubs only with Kobo's TENG renderer being used for kepub, epub and LCP DRMmed ePubs. As for what TENG stands for? I haven't seen an answer from Kobo but I've seen Tolino ENGine renderer and The Epub Next Generation renderer as possible answers. |
|
|
|
|
|
#4 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 245
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto 0.1.1 is out. It fixes a mistake in the markup kepubverto adds to a book. If you converted EPUB 2 books with 0.1.0, I suggest converting them again. Your original EPUBs were never touched, so this takes a minute: run 0.1.1 or the web page on the original and replace the .kepub.epub.
What was wrong kepubverto adds one small style element to the head of each chapter. It removes the top and bottom margins of the wrapper the Kobo lays pages out in. In 0.1.0 that element had an attribute that EPUB 2's XHTML does not allow there. The books read normally on a Kobo, so this is about validity, not about what you see. But epubcheck reported one error for every converted chapter of an EPUB 2 book, and that breaks the one rule this tool is built around. In EPUB 3 books the same element had an attribute that HTML calls obsolete. epubveri counts that as a usage note, not an error, but it still raised the book's total. 0.1.1 writes the element the way each EPUB version allows. Nothing else changed: the spans and their ids are the same as before. On my shelf, a conversion now adds no findings at any level, usage notes included. An EPUB 2 book converted with 0.1.1 reads fine on my Kobo. The same mistake elsewhere kepubverto is not the only converter with this mistake. I tried two other KEPUB converters on a valid EPUB 2 book, and both still write a style element that EPUB 2 does not allow, in every chapter. My guess is that nobody has noticed, because the books read fine on a Kobo and the error only shows up when you validate the result. This is the reason kepubverto exists: other converters leave errors in books, and kepubverto tries not to. When it fails at that, as it did here, I fix it. Why my tests missed it I check every conversion with epubveri, and epubveri did not check that attribute in EPUB 2. epubcheck does. epubveri 0.25.0 checks it now. kepubverto's tests and my shelf run also count usage notes now, not only errors, because the total is the number a reader looks at. Updating
To check a book yourself, run epubveri (0.25.0 or newer) or epubcheck on it, before and after converting. JSWolf: thank you for the questions about hyphenation and calibre's KEPUB conversion. Right now I am fixing bugs. When that is done, I will go through requests like these one at a time and answer here. |
|
|
|
|
|
#5 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 245
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
kepubverto 0.2.0 is out. It adds hyphenation, the first of kepubify's optional extras.
https://github.com/veripublica/kepub...ses/tag/v0.2.0 If you do not use the new option, nothing changes: a book converted with 0.2.0 comes out exactly as it did with 0.1.1, so there is no reason to convert your books again. As before, your original file is never modified, and the web page converts inside your browser without uploading anything. Hyphenation On the command line, --hyphens auto turns hyphenation on and --hyphens none turns it off. On the web page, the same choice is a menu above the drop area: "as the book says", "on" or "off". Without the option, the book's own CSS decides, as it always did.
The Kobo breaks the words itself, with its dictionary for the book's language. kepubverto only adds the CSS that asks for it, written the way each EPUB version allows, so a valid book stays valid with either setting. I tested both on my Kobo Forma, with a Turkish book: auto hyphenates, and none stops a book that hyphenates on its own. JSWolf: you asked for hyphenation first, so it came first. You also asked what kepubverto does that the KEPUB conversion in calibre's KoboTouch driver does not. To answer that properly, I ran calibre 9.16's conversion with the driver's default settings on every book on my shelf, and checked each result with epubveri. I checked a few valid books with epubcheck as well. Here is what I found:
As far as I know, these books read fine on a Kobo either way. The difference is in what a validator sees and in what the book carries afterwards. If you find a book that reads differently on your Kobo depending on which of the two converted it, I would like to see it. For plugin and script authors --format json prints the family's shared machine-readable report: where the output went, how many chapters were converted, and one entry for each chapter left as it was, with a code. The codes are listed in the README. What would help Hyphenation on other Kobo models and firmware, and in languages other than Turkish. And, as before, which kepubify option you miss most now that hyphenation is in.
https://crates.io/crates/kepubverto https://www.npmjs.com/package/@verip...epubverto-wasm |
|
|
|
|
|
#6 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 708
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
It would be helpful if --help started with showing version number.
|
|
|
|
|
|
#7 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,348
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@Kayadelenium Thanks. I'll give it a go.
|
|
|
|
|
|
#8 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 245
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
Quote:
Code:
kepubverto -V kepubverto 0.2.0+99140b0 I am keeping the two apart on purpose: --help says how to use the tool, -V says which version it is. Many of the command-line tools I use every day split them the same way. cargo, rustc, git and curl do not show a version in their help; cargo -V, rustc -V, git --version and curl -V print it. epubveri and epubsana, kepubverto's sister tools, work the same way, so the version is found the same way in all three. JSWolf: thanks, I would like to hear how it goes on your Kobo. |
|
|
|
|
|
|
#9 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,348
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I think its not a good idea to have --help not displaying the version. It should not be difficult to display the version with --help. Just because other programs get it wring is no reason for kepubverto to also get it wrong.
Last edited by JSWolf; 10-15-2026 at 04:47 PM. |
|
|
|
|
|
#10 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,348
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It's working so far.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Libra Colour How to sort EPUB and KEPUB on Kobo | raydawson | Kobo Reader | 15 | 01-10-2025 06:33 AM |
| KEPUB and non-breaking space | Vetchy | Kobo Developer's Corner | 33 | 11-13-2024 02:44 PM |
| New Kobo, ePub vs Kepub | Pjama | Kobo Reader | 8 | 04-07-2021 12:26 PM |
| What will happen/I gain if I forced an ePub book to a KePub book? | andsoitgoes | Kobo Reader | 4 | 04-04-2012 04:33 PM |
| Kobo Adobe Epub is a Kepub instead | rashkae | Kobo Reader | 61 | 01-13-2012 06:15 AM |