Subj : NewsGate kludge lines.
To   : All
From : Marc Lewis
Date : Sun Jul 22 2001 11:51 am

Hello All.

For several years now I have been using the NewsGate program to bring in
selected newsgroups to the board.  There has always been a nasty quirk in the
program though.  Telling the program (via its config utility) to add botha
seen-by and a path line results in Squish (and possibly other tossers as
well) complaining vigorously about "No Seen-By" in the messages.

Reason for this is NewsGate does insert the Seen-By as it should after the
Origin line.  But the path line is inserted *without* the required ^a in
front of it.  The tosser is completely "blind" to the line because of this.

I tried several utilities to correct the problem on the fly; no luck.  ThenI
"got to thinking"... Hmmm.  GSAR. (General Search and Replace).  An excellent
grep utility (FreeWare) that can do this *without* grunging the .pkt.  Here's
how I went about it.

First off, I turn off the "insert path" option in NewsGate's configuration.
NewsGate's packets are generally too large to begin with, sometimes
containing several thousands of messages.  I use PKTSORT to split the .pkt
files down to about 150 messages each resultant .pkt.  Then I call GSAR to
look at the .pkt files and do its "magic".  Here's the segment from my batch
file that does it:

=-=-=-=-=-=-=-=-=-CUT-=-=-=-=-=-=-=-=-=-=-
CD \NEWS-IN
IF EXIST *.PKT C:\UTL\PKTSORT -cC:\UTL\PKTSORT.CFG

{Note!  These lines are WRAPPED by the message editor!}

FOR %%a IN (*.PKT) DO GSAR -sSEEN-BY:::032396/4
..................The Newsgate node number^^^^^
-rSEEN-BY:::032396/4:013:001PATH:::032396/4 %%a -o
..line feed character^^^ ^^^the "^a" character  ^^the overwrite command

{End of subroutine}

=-=-=-=-=-=-=-=-=-CUT-=-=-=-=-=-=-=-=-=-=-

(Hopefully this will make it through without being broken up too badly by
message readers!)  If it does get chewed up to the point you have trouble
deciphering it, drop me a netmail and I'll send you the sample file.

Works like a champ!  Squish no longer complains!

Best regards,
Marc
telnet://bbs.sursum-corda.com

-+- QuikEdit 2.41R+

--- Maximus 3.01
* Origin: Sursum Corda! BBS via Telnet: bbs.sursum-corda.com (1:396/45)