View Single Post
Old 08-24-2015, 12:34 PM   #1
Akk
Junior Member
Akk began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2015
Location: New Mexico
Device: Kobo Touch
Python script for epub -> kepub

Hi, I'm new on MobileRead. Just got a Kobo Touch, and have been reading up (what a great community here!) on things like the difference between .epub and .kepub, and I tried just renaming files to .kepub.epub but then the Kobo didn't remember my reading position after a sleep/resume. Apparently it needs the silly <span id="kobo.n.1"> tags. And Calibre's terrific for some things but I don't want to use it to organize my whole library.

So I took the Python code from http://dsandrei.blogspot.fr/2012/07/koboish-ebooks.html and wrapped it into a Python script you can use to mass-convert books to add the kobo span tags everywhere.

I didn't do anything about cover images because it seems like with 3.16.0, my Touch is handling the cover image just it would with a regular epub. Are there cases where it won't?

The script is on github if anyone wants to try it: https://github.com/akkana/scripts/bl...obo/koboize.py
Akk is offline   Reply With Quote