View Single Post
Old 08-18-2016, 02:09 AM   #30
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by grumbles View Post
I should add, since this was originally about stripping excess carriage returns, I have a couple of command line programs that take text file and unwraps them. The Gutenberg text files for instance, where each line is truncated at about eighty characters. It requires that each paragraph is separated by a blank line. The first program just unwraps from standard input to standard output. The second program does the same thing but wraps the text into a very simple xhtml file. Quotes, single and double, angle brackets and ampersands are converted to entities. I use this as the first stage when converting from text files.

These are very simple programs and are written in Pascal and are compiles with the Free Pascal Compiler. They run on any system that FPC is available for. I use them, and other utilities, on both Windows (XP, 7 and 8.1) as well as Linux.

If anyone is interested, I can post the source. I also have utilities to merge xhtml files or split them on headings.
Thanks. I'd certainly be interested in looking at your programs. I have Windows 10, though I don't suppose that makes much difference.
AlexBell is offline   Reply With Quote