|11-24-2009, 04:43 PM||#1|
Join Date: Nov 2009
Device: Astak Pocket Pro
help with formatting text files
I have recently become the proud owner of a PocketPro and have been trying to transfer the many books that I have onto it. I have found that there are some txt files (created I think from original nonDRMed lit files which don't seem to work on the reader) but the formatting is all wrong. There are extra carriage returns at tyhe end of every line and then extra ones as well. I have tried textify but that doesn't remove all the extra carriage returns. Short of manually having to do this, can anyone advise if there is an easier way? Any advice would be gratefully accepted. I am not a computer programmer and lots of DOS commands would need to be carefully explained.
|11-25-2009, 05:23 AM||#2|
Join Date: Oct 2009
Well, if you have MS Word you could use the "Find and Replace" Function. Just select a paragraph that you would like to change, then go to "Finad and Replace", in "Find:" type: "^p" and enter " " (space) in Replace. You would have to do it for each paragraph unfotunetely but there's no other way to do it. You could also make a small macro button and then just select a paragraph and change it with a button click.
|11-26-2009, 04:16 AM||#3|
Slow But Unstoppable
Join Date: Nov 2009
- Type ^p in the Find and ^t in Replace. This will replace all of the hard returns with tabs. The blank lines will be replaced with two tabs.
- Type ^t^t in Find and ^p in Replace. This will replace all of the double tabs (which is where the blank line was in the original text file) with a single hard return.
- Type ^t in Find and a blank space in Replace. This will remove all of the tab marks from the text.
When finished, you will have a text file with one hard return at the end of each paragraph. If you want a blank line between each paragraph, do a search and replace and type ^p in Find and ^p^p in Replace.
Another option is to convert the text file into an HTML file, although it takes a little bit of work. You can open up the text file in a text editor, and then do the following (disregard the quote marks):
- Type "<html><body><p>" at the beginning of the text and "</p></body></html>" at the end of the text.
- Type "</p><p>" at the beginning of each paragraph (you can just copy and paste it to save some typing).
- When finished save the text file with a new name with the extension ".htm" This will give you a basic webpage that you can view in any web browser. Even though the hard returns are still in the text file, they are disregarded in HTML files and will not display on screen.
From this point, it is fairly easy to convert the file into other formats. For example, I use StarOffice and it can easily convert an HTML document into several different formats, including turning it into a PDF file. Other word processors can also handle HTML files.
I hope that helps.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Text formatting||jerrywojo||Ectaco jetBook||4||01-19-2010 03:37 PM|
|Text formatting for .txt files||motorhead||HanLin eBook||9||01-08-2009 06:29 PM|
|text file formatting||hobbyman||Calibre||5||10-05-2008 05:18 PM|
|Text tool for formatting Gutenberg text files||bob_ninja||Workshop||5||11-13-2007 12:28 PM|
|PRS-500 Text Formatting Tool||tesseract420||Sony Reader Dev Corner||5||09-13-2007 05:36 PM|