View Single Post
Old 02-25-2010, 09:49 AM   #1
steven522
binomial: homo legentem
steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.steven522 ought to be getting tired of karma fortunes by now.
 
steven522's Avatar
 
Posts: 1,061
Karma: 25222222
Join Date: Feb 2010
Location: Alabama, USA
Device: iriver Story HD; Archos 80 G9
Using MS Word to quick-reformat text

Don't know if this will be helpful to you unless you have a version of MS Word.

I had several plain text files with lots of short stories in them that had been force-formatted to a max of 60 characters across with CRLF terminations. Looking at these on the jetbook made for an interesting read.

Connecting the jetbook to the PC directly, I edited the files on the SD card from with in Word to remove the extra "enters" on each line. Luckily, the original creator had followed each paragraph with a double "enter" to leave a blank line in-between.

I setup a macro within Word to do the following:
- Search for every paragraph/"enter" (in Word represented as "^p") within the file and replace with a space.
- Search for every double-space, which would be the "enter"-"enter" between paragraphs, and replace with the same "enter"-"enter" ("^p^p" within Word).

With this, I was able to load the file, launch the macro (button or key combo), and then save the file. Took about 5 seconds per file total. I went through the entire folder in few minutes.


Macro code is below for any cut-and-paste'ers out there:

Code:
Removed old code for newer code directly below

Last edited by steven522; 02-26-2010 at 11:03 AM.
steven522 is offline   Reply With Quote