12-05-2008, 05:20 AM | #1 |
The Introvert
Posts: 8,307
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
|
I am looking for a tool that could automate convertion of...
I am looking for an automated tool to convert words between underscores into italic format?
For example: Source: All of the _features_ here are _present_ in existing browsers Result: All of the features here are present in existing browsers Thanks. |
12-05-2008, 05:44 AM | #2 |
Final Five n°42
Posts: 789
Karma: 3599
Join Date: Feb 2008
Location: Lyon, France
Device: Cybook Gen3
|
I'd say that we would need a bit more information about the context and the format of the text to transform.
Do you want to create HTML ? Is it part of a Word document ? What is the format of the starting text (Mobi, LRF, TXT, ...) ? What kind of system are you using (Windows, Max, Linux, ...) ? EDIT : if these answers are implicit because the people for which this is intended know your situation well, then you can ignore this message, of course. |
Advert | |
|
12-05-2008, 05:49 AM | #3 |
The Introvert
Posts: 8,307
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
|
The source text is TXT file.
I am using Windows XP 32bit. The end result might be anyting, RTF, DOC, HTML....I will convert it to LRF in Book Designer. |
12-05-2008, 08:11 AM | #4 |
Connoisseur
Posts: 75
Karma: 204999
Join Date: Aug 2006
Location: London
|
Have you got Microsoft Word? If so, you can do that with Word's search and Replace -
make a backup in case it goes wrong and open in Word get the find and Replace window up click 'More' and select 'Use wildcards' in 'Find what', put '_(*)_' in 'Replace with', put '\1', click 'Format' at the bottom and select Font -> Italic then click 'Replace' or 'Replace all' (omit quotation marks) bob |
12-05-2008, 08:20 AM | #5 | |
The Introvert
Posts: 8,307
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
|
Quote:
I will try it as soon as I get home and let you know. Thanks a lot. |
|
Advert | |
|
12-05-2008, 08:29 AM | #6 |
Connoisseur
Posts: 75
Karma: 204999
Join Date: Aug 2006
Location: London
|
Nothing like getting rid of an hour's repetitious labour in 5 microseconds ..
bob |
12-05-2008, 08:29 AM | #7 | |
Final Five n°42
Posts: 789
Karma: 3599
Join Date: Feb 2008
Location: Lyon, France
Device: Cybook Gen3
|
Quote:
That opens some interesting avenues. Just to test, I used '_([0-9]*)_' as a search string and was able to transform _123_ into italics. Last edited by Gaurnim; 12-08-2008 at 10:08 AM. Reason: typo |
|
12-05-2008, 04:47 PM | #8 |
Wizard
Posts: 2,366
Karma: 12000
Join Date: Jan 2008
Location: Texas, USA
Device: Kindle; Sony PRS 505; Blackberry 8700C
|
Looking at your original post and the conversion that you want to make, I think you might be able to use GUItenMark -- a GUI interface to GutenMark. GutenMark is a command-line utility which aims to provide a completely automatic system for formatting Project Gutenberg etexts, converting them to HTML. Recent updates have made GutenMark very suitable for personal (and none PG) projects.
GUItenMark is a very handy tool that I use when working with PG texts. |
12-07-2008, 01:19 PM | #9 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
_italic_ and *bold* markup is supported by markdown converter in Calibre, so you can just use Calibre to convert your TXT file. Or you can use markdown-calibre.exe and redirect its output to an HTML file.
|
12-08-2008, 06:42 AM | #10 |
The Introvert
Posts: 8,307
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
|
Thank. I don't use Calibre, so I didn't know about this feature.
|
12-08-2008, 07:16 AM | #11 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Hi astra,
I use a very simple freeware command-line program called "textify" for doing my initial processing of text files, as a precursor to loading them into Book Designer. It carries out a number of formatting operations, including the option of replacing _text_ with text, if outputting an HTML file. I'll be happy to upload it if you'd like to have a look at it. |
12-08-2008, 07:27 AM | #12 | |
The Introvert
Posts: 8,307
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
|
Quote:
I have sorted it in Word as advised. It worked very well. Let's say it is very unsual situation in "my practice", I never encountered this type of files before, although I was aware about it. P.S. Is it your software? What other editing does it do? |
|
12-08-2008, 07:33 AM | #13 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
I find it a very useful program; it's normally the tool I start off using when I begin to create a book from a PG text file. |
|
12-08-2008, 10:18 AM | #15 | |
Liseuse Lover
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
|
Quote:
if it is freeware I would appreciate a link - can't have too many options for text formatting, although I am finally penetrating the mysteries of SED and AWK. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Doc to Epub convertion problems | johnbajer | Calibre | 5 | 06-04-2010 05:30 PM |
Best PDF Convertion Tool | Nathan Campos | Workshop | 5 | 12-27-2009 10:47 AM |
txt2pdf convertion web application | spaze | 0 | 08-26-2009 07:13 AM | |
Restore Missing Library? Plug in to automate? | Debby | Calibre | 7 | 03-24-2009 06:44 PM |
Sun java documentation convertion to lrf? | kuliand | Sony Reader | 4 | 11-07-2008 02:16 PM |