Article View: news.software.readers
Article #242371Re: [slrn] Cleanthreads v.2
From: ernobe
Date: Wed, 25 Aug 2010 21:58
Date: Wed, 25 Aug 2010 21:58
57 lines
3479 bytes
3479 bytes
> I've improved my program for tagging retrieved articles ( using slrnpull ) so
> that it now identifies both new article bodies and new headers. It does so by
> reading slrns' newsrc file after calling slrn. The call to slrn now not only
> makes sure the tagged articles are safe from deletion, but because it writes
> the newsrc file, after the call it can be read to identify which articles are
> left on the list. So now the overall deletion of incomplete threads occurs
> only whenever slrnpull is called, not each time a newsgroup is entered. The
> call to slrn requires a copy of the initialization file ( .slrnrc ) with the
> following interpret lines:
>
> interpret groups.sl
> interpret cleaner.sl
>
> and the cleaner macro only has the delete routine:
>
> () = register_hook ("article_mode_startup_hook", "my_groups" );
> define make_clean_threads ()
> {
> call ("header_bob");
> do
> {
> if (not ("" == extract_article_header ("References")))
> {
> if (1 == get_body_status ())
> {
> call ("delete");
> header_up (1);
> }
> }
> }
> while (header_down (1));
> call ("expunge");
> }
> () = register_hook ("article_mode_startup_hook", "make_clean_threads" );
>
I misinterpreted the slrn documentation that says that the hooks are called in
the order they were registered to mean that the above setup would call
my_groups before make_clean_threads. Apparently, the opposite happened and I
got some really weird error messages. So, reverse the position of the two
register_hook function calls and it will work. Also, make sure that the
configuration variable called query_read_group_cutoff is set to 0 in the
copy of the .slrnrc file, like this:
set query_read_group_cutoff 0
otherwise, the call to slrn will prompt you for the number of articles to
download and the whole program gets aborted. Whenever this happens it can be
fixed by calling the program again with an argument, so that it will rebuild
the database, and then calling slrn with the custom initialization file.
--
"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:
<i543mh$21i$1@news.eternal-september.org>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!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mailReferences:
<i537gb$kmd$1@news.eternal-september.org>Show Full Headers
Complete Article Headers
Message-ID: <i543mh$21i$1@news.eternal-september.org> Subject: Re: [slrn] Cleanthreads v.2 Date: Wed, 25 Aug 2010 21:58:41 +0000 From: ernobe <ernobe@yahoo.com> References: <i537gb$kmd$1@news.eternal-september.org> 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!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Newsgroups: news.software.readers Organization: Baha'i Faith Lines: 57 Injection-Date: Wed, 25 Aug 2010 21:58:41 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="JELnH+BdEro/urHfghrQkg"; logging-data="2098"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18isCDDhX6o/7ZZ8jwAfJjwqyV7RMji+fw=" User-Agent: slrn/pre1.0.0-18 (Linux) Cancel-Lock: sha1:Xlo/lC9YtQkKZUv89bB48LMOf5k=