Re: [NTLK] Newton Press and Project Gutenberg

From: Mike O'Brien (mikeobrien_at_spamcop.net)
Date: Sat Apr 03 2004 - 10:37:54 PST


Rhonda Hyslop asks:

> I have finally gotten all the parts in place to make Newton Press
> convert a text file into a newton book without complaining - and I
> noticed that due to the line breaks in the PG etexts, the formatting
is
> simply atrocious. Each PG line is about 1 3/4 line in the Newton Press
> window.
>
> I'm sure some people here have turned Project Gutenberg etexts into
> newtonbooks before - is there an easy way to clean up the line breaks
> without going through the entire file in a text editor? Anything that
> runs on linux or mac system 7.5 will work for me :-)

I ran into this problem, which is a perfect application for Perl,
except I
don't know Perl. I found I had to go cross-system, since I was running
Newton Press under Windows at the time, not having a Mac then. What
I wound up doing was downloading the texts to the UNIX side of the
house and writing a quick C program which threw away single newlines
and converted double newlines to a single newline. That created an
ASCII
text file that went into Newton Press relatively cleanly, though I still
had to gen up a table of contents, fix up italics and other quotations,
etc.

Unfortunately this does not do you a heckuva lot of good on Mac OS 7.5.
If you have BBEdit you might be able to create a macro that would do
the same thing.

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Sun Apr 04 2004 - 13:30:00 PDT