Article View: news.software.readers
Article #255480Re: [slrn] Solution to the age-old question
From: ernobe
Date: Thu, 12 Sep 2013 20:57
Date: Thu, 12 Sep 2013 20:57
84 lines
4315 bytes
4315 bytes
>
> I've resolved the above problem of having to download within the fixed time
> specified in the code. Instead of changing the date, it is possible to add a
> number to the date line and use it to score the article ( it still reads the
> date OK ), and to obtain its message id and place it in the stickytags file.
> That way the tag is permanent ( until the next download ) and the number
> placed in the date line makes it possible to organize the results by score
> in the article pane.
>
Ok, I've had a look at what's going on in the news directories of the spool,
and figured out how to spot the newest articles there. With the -t option of
the list command in Linux, it is possible to list the articles by the time
they are added to the directories. By saving the name of the latest article
in the Icon programs' configuration file it is possible to obtain the
message-ids from all the newer ones, which appear following it. Then the
message-ids are added to the .slrn-stickytags file and to a score file. So
now the Icon program does the same as the previous one but has been greatly
simplified and runs much faster. The articles are not modified in any way and
it is not necessary to run slrnpull in rebuild mode. To initialize new groups
simply add them to the configuration file after the first download.
procedure main()
q := open( "/home/roy/.slrn-stickytags", "crw" ) | stop( "unable to create slrn-stickytags" )
g := open( "/home/roy/News/spool/newupd.conf" ) | stop( "no slrnpull conf file" )
m := open( "/home/roy/News/spool/newupdi.conf", "crw" ) | stop( "unable to create newupdi.conf" )
u := open( "/home/roy/News/spool/scoring", "crw" ) | stop( "unable to create scoring" )
write( u, "[*]\nScore:: 1" )
while a := read( g ) do
{ a ?
{ y := tab( upto( ' ' ) | 0 )
move( 1 )
i := tab( 0 )
}
if *trim( y ) = 0 then break
( z := numeric( i ) ) | write( "initializing ", y, "..." )
n := open( "ls -t " || y, "p" ) | stop( "unable to list ", y )
while p := read( n ) do
{ ( o := numeric( p ) ) | break
if /z then
next
else
if o = z then
while p := read( n ) do
{ ( o := numeric( p ) ) | break
j := open( y || p ) | stop( "unable to open ", y, p )
while b := read( j ) do
{ if b[1:7] == "Messag" then
{ write( q, b[13:0] )
write( u, b )
break
}
}
close( j )
}
}
close( n )
\o | { write( "you must run slrnpull with ", y, " in slrnpull.conf" )
write( m, y )
next
}
write( m, y, " ", o )
write( "finished ", y )
o := &null
}
close( m )
close( g )
system( "mv /home/roy/News/spool/newupdi.conf /home/roy/News/spool/newupd.conf" )
end
Sample configuration file:
/home/roy/News/spool/news/sci/logic/ 109183
/home/roy/News/spool/news/news/software/readers/ 24772
/home/roy/News/spool/news/alt/philosophy/zen/ 113729
/home/roy/News/spool/news/alt/philosophy/ 325656
/home/roy/News/spool/news/alt/atheism/ 1615025
--
"The world of existence is an emanation of the merciful attribute of God."
Abdu'l-Baha
http://www.costarricense.cr/pagina/ernobe
Technical Details
Message-ID:
<l0t9si$h3$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mailReferences:
<kvj8oe$f5$1@dont-email.me> <l0d15f$n9n$1@dont-email.me>Show Full Headers
Complete Article Headers
Message-ID: <l0t9si$h3$1@dont-email.me> Subject: Re: [slrn] Solution to the age-old question Date: Thu, 12 Sep 2013 20:57:54 +0000 From: ernobe <ernobe@yahoo.com> References: <kvj8oe$f5$1@dont-email.me> <l0d15f$n9n$1@dont-email.me> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Newsgroups: news.software.readers Organization: World Order of Baha'u'llah Lines: 84 Injection-Date: Thu, 12 Sep 2013 20:57:54 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="aa62c9dfd94aa8dd21cd89a27766d80d"; logging-data="547"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+TubfMjRBS6yf5525gy0H" User-Agent: slrn/pre1.0.0-18 (Linux) Cancel-Lock: sha1:RZQ7pnuPEd0bgaLwJLw3btOc9yM=