🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #42428

Re: Synchronising newsgroup and active files

#42428
From: Paul Tomblin
Date: Mon, 20 Dec 1999 00:00
75 lines
3487 bytes
In a previous article, Tim Pennick <tpennick@axion.bt.co.uk> said:
>Having read everyghing I can find on the subject, I still don't understand how
>you are supposed to keep your newsgroups file up-to-date (short of manually
>editing it).  The following observations may be flawed, and may indicate why

I sync our newsgroups and active file against the big one on isc.org, at least
for the big-8 groups, using the following script.  As you can see by what I've
commented out, I used to do this for all the heirarchies we carried except
alt, but I found the big one on isc.org was wrong when it came to ott, ont and
can, so I figure it's less than trustworthy on other heirarchies.

--start script--
#
#       Does a full check of our newsgroups file against Tale's
#
. $HOME/lib/innshellvars

OUT=$0.results
SCRIPT=$0.script

rm -f ${OUT} ${SCRIPT}
echo "Running $0 at " `date` > ${OUT}

#       Get the latest from isc
ncftpget ftp://ftp.isc.org/pub/usenet/CONFIG/newsgroups
cp ${NEWSGROUPS} local.newsgroups
LNEWSGROUPS=./local.newsgroups

#       Find which heirarchies we carry (forget about alt, it's a sewer)
#sed -e 's/\..*//' -e '/ /d' -e '/^alt/d' ${ACTIVE} | sort -u >
our.heirarchies
#       Only do the big 8
echo 'comp
humanities
misc
news
rec
sci
soc
talk' >our.heirarchies

for i in `cat our.heirarchies` ; do
        echo "doing $i"
        #       Get all the entries from Tale's file with our current
        #       heirarchy
        grep "^${i}\." newsgroups > this.heirarchy
        if [ -s this.heirarchy ] ; then
                #       Do a checkgroups using that file
                ${HOME}/lib/docheckgroups < this.heirarchy > this.results
                cat this.results >> ${OUT}
                grep -v '#' this.results >> ${SCRIPT}

                #       Now update the newsgroups file
                grep -v "^${i}\." ${LNEWSGROUPS} > newsgroups.without.this
                sort -u newsgroups.without.this this.heirarchy >
${LNEWSGROUPS}
        else
                echo "$i is not a known heirarchy" >> ${OUT}
        fi
done

#       Clean up the mess
rm -f newsgroups.without.this this.heirarchy this.results our.heirarchies
--end script--

After running this, I check to see if "big8_check.results" indicates any
newsgroups need to be added or removed, and if so run "big8_check.script".
Then, if everything looks ok, I copy local.newsgroups into ~/db/newsgropus

-- 
Paul Tomblin, not speaking for anybody.
SETI@Home:  Finally a *good* way to impress Jodie Foster
http://www.setiathome.ssl.berkeley.edu/

Technical Details
Message-ID: <83lh7m$bus$1@allhats.xcski.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <83lg44$kd1$1@pheidippides.axion.bt.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <83lh7m$bus$1@allhats.xcski.com>
Subject: Re: Synchronising newsgroup and active files
Date: Mon, 20 Dec 1999 00:00:00 +0000
From: ptomblin@xcski.com (Paul Tomblin)
References: <83lg44$kd1$1@pheidippides.axion.bt.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 563017839
X-Complaints-To: abuse@navaid.com
X-Trace: allhats.xcski.com 945702966 12252 192.168.1.1 (20 Dec 1999 15:16:06 GMT)
Organization: Tomblin Computer Consulting, Rochester, New York and Ottawa, Ontario
Reply-To: ptomblin@xcski.com (Paul Tomblin)
NNTP-Posting-Date: 20 Dec 1999 15:16:06 GMT
Newsgroups: news.software.nntp
Originator: ptomblin@xcski.com (Paul Tomblin)