Quote:
Originally Posted by vitalyb
I guess I just used the wrong google search queries. I'll give textify a try. Thanks!
On the subject though, can anyone direct me to a way to do it in openoffice writer?
I'd prefer to everything in a single tool and I use writer for most of my conversions.
|
It can be done in OpenOffice Writer, but it does take the following steps (I'm sure there are other ways, but this works for me, and I've used it with Project Gutenberg ebooks):
- Open up the text file in Writer.
- Save it as an HTML file, and then close the file.
- Open the HTML file in Writer. The paragraph style for all of the text will be "Preformatted Text"
- Select all of the text and change the paragraph style to "Text body."
-- This will separate the paragraphs, beginning each with "<p>" and ending them with "</p>"
-- The blank lines will be replaced with "</p><br><br><p>"
- Insert a space at the beginning of the text and then delete it. This will clean up the HTML formatting in the document.
- Under the "View" menu select "HTML Source." This will bring up the HTML source code for the document.
- Do a search and replace for "<p>" and replace it with nothing.
- Do a search and replace for "</p>" and replace it with one space.
- Do a search and replace for "<br><br>" and replace it with "</p><p>"
- Insert a "<p>" at the beginning of the text.
- Delete the final "<p>" at the end of the text.
- Go to the "View" menu and uncheck "HTML Source."
- Insert a space at the beginning of the text and then delete it. This will clean up the HTML formatting in the document.
- Save the document.
At this point, you can easily convert the document into other formats.
This reformatting technique works best if each paragraph in the text file is separated by a blank line. If the document contains line breaks (like many lines at the beginning of Project Gutenberg ebooks), you will have to put them back into the document manually.
Please let us know how this works for you.