View Single Post
Old 10-02-2013, 08:12 PM   #12
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
You could do a two-step conversion: first to HTML, replace the formatting, and then to TXT.

If I remember correctly, the desired formatting was indicated like this on a typewriter:

*bold*
/italics/
_underline_

In HTML you would need to replace (using some regular expressions):

<b>text</b> -> <b>*text*</b>
<i>text</i> -> <i>/text/</i>
<u>text</u> -> <u>_text_</u>

Then convert to txt, and you'll retain the formatting indication.

However, if the book uses something like <span class="fat">text</span>, where the text is set to bold in the stylesheet, you'll need to replace the spans.

Last edited by Katsunami; 10-02-2013 at 08:14 PM.
Katsunami is offline   Reply With Quote