View Single Post
Old 03-31-2017, 10:44 AM   #63
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544528
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
If the original poster is still looking for a solution, I attach my private little hack of modify_epub. It is a totally stripped down thing, just searches for some regexes, removes fonts and smartens punctuation.

To individualize it, extract main.py and open it in a simple texteditor (notepad++ for example).

Only thing that needs to be changed is in MY_REGEXES. What to do should be self-explinatory. No need to understand python, just copy/paste the lines and change the regex string.

Now put the new main.py back in the archive and import it in calibre via "load plugin from file". There is now a button in the toolbar to do the search and replace stuff.

Of course this is not rigidly tested and without any guaranties
Attached Files
File Type: zip EpubRegex.zip (17.6 KB, 103 views)
dickloraine is offline   Reply With Quote