Thread View: news.software.misc
5 messages
5 total messages
Started by aclexports
Mon, 20 Nov 2000 00:00
which header keeps serial numbers ?
Author: aclexports
Date: Mon, 20 Nov 2000 00:00
Date: Mon, 20 Nov 2000 00:00
11 lines
857 bytes
857 bytes
Which header keeps track of the articles inside a news-server. I am writing the code for retrieving the articles from a news-server on a daily basis. Which is the counter I need to keep track of so I know which articles I have already downloaded before ? Is it the message-id or the Xref header ? Thanks
Re: which header keeps serial numbers ?
Author: J.B. Moreno
Date: Mon, 20 Nov 2000 00:00
Date: Mon, 20 Nov 2000 00:00
18 lines
1541 bytes
1541 bytes
<aclexports@usa.net> wrote: > Which header keeps track of the articles inside a news-server. > I am writing the code for retrieving the articles from a news-server > on a daily basis. Which is the counter I need to keep track of so I > know which articles I have already downloaded before ? Is it the > message-id or the Xref header ? If you're getting new articles why not just use the high point contained in the response to the GROUP command? I suppose you could hack something up out of the Xref command, but it'd almost certainly be starting off on the wrong foot. -- JBM "Moebius strippers only show you their back side." -- Unknown
Re: which header keeps serial numbers ?
Author: Russ Allbery
Date: Mon, 20 Nov 2000 00:00
Date: Mon, 20 Nov 2000 00:00
19 lines
1509 bytes
1509 bytes
In news.software.nntp, aclexports <aclexports@usa.net> writes: > Which header keeps track of the articles inside a news-server. I am > writing the code for retrieving the articles from a news-server on a > daily basis. Which is the counter I need to keep track of so I know > which articles I have already downloaded before ? Is it the message-id > or the Xref header ? The article number is usually available in the Xref header, although it's worth noting that Xref is not a mandatory header. If you use GROUP and ARTICLE with article numbers to retrieve messages like most news readers do, you can keep track of what article numbers you've already downloaded that way (which is how most news readers maintain their .newsrc or equivalent). -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: which header keeps serial numbers ?
Author: David M. Chess
Date: Tue, 21 Nov 2000 00:00
Date: Tue, 21 Nov 2000 00:00
34 lines
1988 bytes
1988 bytes
You can keep track of message-ids; that makes the database server- independant, but you'll have to keep a list of every message id you've ever seen (modulo expiration and so on), and when you go to retrieve new ones you'll have no easy way of asking the server for just the unseen ones. Or you can keep track of the article number, which is server specific but also monotonically increasing, so you only need to keep track of one number per newsgroup, and you can use "next"s to get only the new ones. Unsurprisingly, most news clients use the latter... *8) (If your server supports the NEWNEWS verb, you can also keep track of the time you last asked for news and do it that way. I used that method in a client for awhile, but then they recompiled the server I was using not to support NEWNEWS, and I decided that article numbers are neater anyway.) Article numbers aren't (necessarily) anywhere in the header, of course. But if you know that the last article you read in alt.random.group was 142, you can do group alt.random.group article 142 next article next article ... or whatever, until there aren't anymore. DC
Re: which header keeps serial numbers ?
Author: bill davidsen
Date: Tue, 28 Nov 2000 00:00
Date: Tue, 28 Nov 2000 00:00
30 lines
2316 bytes
2316 bytes
In article <3A1A8744.A608406C@us.ibm.com>, David M. Chess <chess@us.ibm.com> wrote: | You can keep track of message-ids; that makes the database server- | independant, but you'll have to keep a list of every message id | you've ever seen (modulo expiration and so on), and when you | go to retrieve new ones you'll have no easy way of asking the | server for just the unseen ones. Or you can keep track of the | article number, which is server specific but also monotonically | increasing, so you only need to keep track of one number per | newsgroup, and you can use "next"s to get only the new ones. Or combine the items and keep one number per group per server, and pull down (XHDR) the message IDs for lookup. If one were running some form of multi-server suck, you could take all the IDs from all the tracked groups, run them through some uniq filter, and then pass them through grephistory with the "-i" option to get a list of IDs you don't have. Not surprisingly, I have a little C program which accepts a list of IDs and pulls them from a server, and builds a rnews format output file which can be fed into news at a convenient point, compressed and sent, etc. I pull overview, let a perl program do some selection based of various things, and then go grab the articles. This from a low bandwidth site, obviously. -- bill davidsen <davidsen@tmr.com> CTO, TMR Associates, Inc Make the rules? I don't make the rules. I don't even FOLLOW the rules!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads