View Single Post
Old 03-29-2010, 10:58 AM   #3
ereader123
Junior Member
ereader123 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2010
Device: Kindle
It appears to me that the regex matching in calbre is broken. I was able to successfully edit the parsed html file with a regex that uses \n for a line break using a python script, but the same identical regex does not work when I use it through the calibre interface. Or from the calibre command line ebook-convert.

For anyone having issue with the header or footer regex in calibre, one way to get around it is to:
1. enable debug so the files for intermediate conversion steps are written to a directory, and then convert your ebook without worrying about the footer regex.
2. create your regex normally, but use it from a python prompt to modify the file. The file you want to modify is the index.html in the parsed directory from step 1.
3. load the modified index.html back into calibre as a new book. Then complete the conversion to whatever format you want from that book.

Not very elegant, but it does work.

I will submit a bug report on this topic.
ereader123 is offline   Reply With Quote