Thread: EPUB output
View Single Post
Old 07-23-2010, 09:13 PM   #741
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by jayman View Post
Is there any other faster way than doing it?
I usually use a RegEx capable Text Editor to do this type of substitution, but only when it's localized to one contiguous span of text. It may be harder to do this "globally" for every <pre> ... </pre> simultaneously. Your best bet would be to set up a macro but this type of stuff is very hard to "pull off" without a lot of trial and error. And to boot, it's probably ever going to be used ONCE since your next book may be formatted differently and "break" your macro!

Quote:
This book I have has a lot of computer text and pre tags.
Are you sure it's the <pre> tags not being properly recognized by your ebook reader/iPhone? Perhaps, it could be the way it's formatted. Can you post a snippet of one or better yet PM me a copy so that I can further test it. I usually create ebooks from .html and can easily explode .chm to .html using the following code noted in our CHM wiki:
Code:
C:\> hh -decompile Destdir Source.chm
However, then to properly structure an ebook from that can take a lot of effort since you usually have to manually reconstruct the index and ordering/links of the .html pages.

Quote:
Is there any way in conversion of the book from chm to epub to automatically have the <br /> tags at the end of each line inside the <pre> tags? Otherwise, going through each line is pretty laborious. thanks.
I've only manually converted .chm to .html and then to .epub / .prc, but only after I've "cleansed" the extracted .html files. I'm not sure how calibre does this conversion, but I would look at two-stage solution as I do manually.

In the end, this type of conversion DOES take a lot of elbow grease...
nrapallo is offline   Reply With Quote