🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #66627

Re: Retrieving article sizes

#66627
From: R Lucas
Date: Sun, 07 Sep 2003 15:59
40 lines
2319 bytes
In the referenced article, jeff@litech.org (Jeffrey M. Vinocur) writes:
>In article <HKpxrF.Dy.B.amos@bath.ac.uk>, R Lucas <csmrl@bath.ac.uk> wrote:
>>
>>One other piece of information I'd like to collect is an article's size. 
>>At the moment, I'm trying to do it like this:
>>
>>Connect to NNTP server
>>Get a list of new message-IDs using NEWNEWS
>>For each new message:
>>    Get the headers using 'HEAD <message-ID>'
>>    Get a group and article number pair from the XRef header
>>    Go to the group with 'GROUP groupname'
>>    Get the article's size using 'XOVER articlenumber'
>
>This seems really complicated.  Can I suggest a different
>approach entirely?
>
>Forget about NEWNEWS (especially since it's disabled on some
>servers).

I didn't know that. What's the advantage of disabling it?

>Just keep track of the most recent article number
>you've seen in each group.  Then your algorithm is simply to
>enter each group in turn, and use XOVER n- (where n is one more
>than the highest article you'd seen so far).  That will give you
>the Message-ID and size for all the new articles in one fell
>swoop, plus other useful information.  You can probably avoid
>doing HEAD entirely (but if you need to, HEAD/NEXT/HEAD/NEXT is
>pretty easy).

That does sound more elegant and useful than what I've been doing up to
now. I'd hoped that I wouldn't have to redesign my program completely, but
I think the longer-term advantages of your suggested method will outweigh
the short-term inconvenience of ditching my existing code.

Many thanks for your help.

Rayner
Technical Details
Message-ID: <HKuprx.Cu5.B.amos@bath.ac.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!logbridge.uoregon.edu!server3.netnews.ja.net!south.jnrs.ja.net!server2.netnews.ja.net!bath.ac.uk!csmrl
References: <HKpxrF.Dy.B.amos@bath.ac.uk> <bj920d$pmv$3@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <HKuprx.Cu5.B.amos@bath.ac.uk>
Subject: Re: Retrieving article sizes
Date: Sun, 7 Sep 2003 15:59:57 GMT
From: csmrl@bath.ac.uk (R Lucas)
References: <HKpxrF.Dy.B.amos@bath.ac.uk> <bj920d$pmv$3@puck.litech.org>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!logbridge.uoregon.edu!server3.netnews.ja.net!south.jnrs.ja.net!server2.netnews.ja.net!bath.ac.uk!csmrl
Newsgroups: news.software.nntp
Organization: University of Bath, UK
Lines: 39