🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.misc
Article #2381

Re: Algorithm for threading

#2381
From: bill davidsen
Date: Thu, 07 Dec 2000 16:29
27 lines
2318 bytes
In article <3a2f5628.16335418@news.alt.net>,
Anand Gupta <prence@aclindia.net> wrote:
| I wish to write a script which will display articles in a threaded
| fashion. I wish to retrieve the header information for the valid
| articles available currently in a particular group from the server,
| and then use my internal script to sort the order and display them. I
| plan to use the HEAD command and then store the data in a SQL server
| and run a sort script through the data.
| 
| What are the most efficient RFC commands to use ?
| Are there any standard sorting algorithms available ?

  You can't sort it, it's not always a linear list. You need to use a
linked list, one entry per article with a pointer back to the
predecessor.

  If you insist on doing some database thing you will have to have one
reply-to entry for each article, and N replies entries, not to mention
some flagging when there is a reply but the subject changes...

-- 
  bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
The line from the immutable past to the desired future is useful to
justify continuing to tack into the wind, making a major change in
course, or coasting into safe harbor. It is not a map of where you are
going, just how to get where you want to go.
Technical Details
Message-ID: <90odt1$cao8$1@newssvr06-en0.news.prodigy.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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!howland.erols.net!newscon04-ext.news.prodigy.com.MISMATCH!newscon04.news.prodigy.com!prodigy.com!newsmst01!postmaster.news.prodigy.com!darkstar.prodigy.com!davidsen
References: <3a2f5628.16335418@news.alt.net>

Show Full Headers
Complete Article Headers
Message-ID: <90odt1$cao8$1@newssvr06-en0.news.prodigy.com>
Subject: Re: Algorithm for threading
Date: Thu, 07 Dec 2000 16:29:21 +0000
From: davidsen@tmr.com (bill davidsen)
References: <3a2f5628.16335418@news.alt.net>
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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!howland.erols.net!newscon04-ext.news.prodigy.com.MISMATCH!newscon04.news.prodigy.com!prodigy.com!newsmst01!postmaster.news.prodigy.com!darkstar.prodigy.com!davidsen
Newsgroups: news.software.misc,news.software.nntp,news.software.readers
Organization: TMR Associates, Schenectady NY
Lines: 26
NNTP-Posting-Host: darkstar.prodigy.com
X-Trace: newssvr06-en0.news.prodigy.com 976206561 404232 192.168.190.236 (7 Dec 2000 16:29:21 GMT)
X-Complaints-To: abuse@prodigy.net
NNTP-Posting-Date: 7 Dec 2000 16:29:21 GMT
Originator: davidsen@darkstar.prodigy.com