Re: [gentoo-user] Join plain text paragraphs
On 22:46 Mon 12 Jun , JimD wrote: David Morgan wrote: On 18:53 Mon 12 Jun , JimD wrote: Sweet. Thanks for the tips. I need to start using OOo more ;-) No need. sed -e :a -e '$!N;s/\n[^$]//;ta' -e 'p;D' filename Close. It is removing the first character of every paragraph. I am trying to digitize my book collection. For example, here is a test output from Narnia - The Magician's Nephew: Indeed - didn't my corrected version get through? I received it before I received your reply anyway. sed -e :a -e '$!N;s/\n\([^$]\)/\1/;ta' -e 'p;D' filename -- Join The no2id Coalition, http://www.no2id.net/ djm -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Join plain text paragraphs
* on the Tue, Jun 13, 2006 at 07:28:17AM +0100, David Morgan said: On 22:46 Mon 12 Jun , JimD wrote: David Morgan wrote: On 18:53 Mon 12 Jun , JimD wrote: Sweet. Thanks for the tips. I need to start using OOo more ;-) No need. sed -e :a -e '$!N;s/\n[^$]//;ta' -e 'p;D' filename Close. It is removing the first character of every paragraph. I am trying to digitize my book collection. For example, here is a test output from Narnia - The Magician's Nephew: Indeed - didn't my corrected version get through? I received it before I received your reply anyway. sed -e :a -e '$!N;s/\n\([^$]\)/\1/;ta' -e 'p;D' filename Almost perfect. It now joins the lines without removing the first character. However, There is now no space between the joined lines. For example: CHAPTER ONE THE WRONG DOOR becomes CHAPTER ONETHE WRONG DOOR I added space to the end of all lines, except blank lines and now it gets me pretty much what I was looking for. Thanks, Jim -- gentoo-user@gentoo.org mailing list
[gentoo-user] Join plain text paragraphs
I have an MS Word HTML file. I used Lynx to dump it to text and now I want to get it to pdf. I opened it in OOo and saved as an OpenDocument. However, all the paragraphs are hard wrapped at 80 characters so the text does not take up the whole page. Is there an easy way to go through the 100+ pages and just join the lines of each paragraph so that they will be flowed correctly in OOo? I have the dumped text file and the OOo file and both have the paragraphs hard wrapped at column 80. I would think there would have to be some simple tool out there to go through the plain text file and just join all the lines of a paragraph, no? Thanks, Jim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- You roll an 18 in Dex and see if you don't end up with a girlfriend =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- JimD Central FL, USA, Earth, Sol -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Join plain text paragraphs
On 18:53 Mon 12 Jun , JimD wrote: Sweet. Thanks for the tips. I need to start using OOo more ;-) No need. sed -e :a -e '$!N;s/\n[^$]//;ta' -e 'p;D' filename -- Join The no2id Coalition, http://www.no2id.net/ djm -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Join plain text paragraphs
On 00:13 Tue 13 Jun , David Morgan wrote: sed -e :a -e '$!N;s/\n[^$]//;ta' -e 'p;D' filename Gosh, what was I thinking? sed -e :a -e '$!N;s/\n\([^$]\)/\1/;ta' -e 'p;D' filename I expect there's a slightly nicer way, but I'm tired and I have an exam in the morning... -- Join The no2id Coalition, http://www.no2id.net/ djm -- gentoo-user@gentoo.org mailing list