[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pilot: DocReader Book File Creation & PERL
DocReader is a great app, maybe even a killer app.
To beautify text (strip CRs, break into chapters, etc) the natural
tool would be PERL.
A script could easily break books into chapters. This could be done
automatically every n lines. Or, if you are willing to manually insert
some unique text at every chapter heading, a script could break the
chapters into seperate "books" at these marks.
Personally I place bookmarks at the chapter headings in the text after
synching them into the pilot. If we could get MakeDoc6 author Pat
Beirne to put a hook in for creating DocReader book marks, this manual
step could also be perfromed by a perl script based on your
inserted chapter break markings.
script info:
You will need to change the file path and file name. The
script below will strip CRs followed by 3 spaces out of ascii text,
while leaving paragraph intact. This was specifically how text I
wanted to convert was formatted. It must be modified to suit the
format of text you are creating.
script:
open(TXTIN, "c:/pilot/add-on/doc/artofwar.txt");
open(TXTOUT, ">c:/pilot/add-on/doc/artofwa2.txt");
select (TXTOUT);
$/="\n\n";
while (<TXTIN>) {
$_=~ s/\n //g;
print "$_";
}
close (TXTIN);
close (TXTOUT);
This mailing list archive is a service of Copilotco.