View Single Post
Old 07-02-2013, 09:28 PM   #1
Fallingwater
Enthusiast
Fallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura aboutFallingwater has a spectacular aura about
 
Posts: 34
Karma: 4132
Join Date: Jun 2011
Device: Bookeen Cybook Opus
Epub -> txt with italic/bold characters

I'm converting a few epubs to txt with the intention of viewing them on a device that doesn't support any other format.

Problem is, Calibre removes all italics and bold, which makes it a lot harder to understand certain books.

I'm aware the txt format doesn't support anything other than plain text, so I've taken to converting to html instead and removing all the html tags using the search-replace feature until I'm left with a file composed only of text and the bold and italic tags. At that point I swap <i> and </i> with the slash character and <b> and </b> with two asterisks.

The net result:
"He said what?! How rude!"
Would be converted to:
"He said **what**?! How /rude/!".

This works, but the procedure to do the conversion is painfully slow, painstaking and prone to mistakes that can cause screwups in parts of the text I can't immediately see.

I'm looking for some form of automatic conversion that'll do all this from an epub without having to disassemble the html.
Fallingwater is offline   Reply With Quote