🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #63638

Re: [slrn/slang] selected article -=> viewed article?

#63638
From: Arjan Drieman
Date: Sun, 23 Jul 2000 00:00
100 lines
5322 bytes
On 23 Jul 2000 19:50:32 GMT, J.B. Nicholson-Owens <jbn@forestfield.org> wrote:
>#v+
>   !if (_is_article_visible () & 1) call ("hide_article");
>#v-
>
>Of course this will only work from article mode.

Which is enough for me, thanks! :-)  Is there any good documentation
available about the slrn internal functions?  I only know the list at
 http://www.math.ohio-state.edu/~lahvak/software/slrn/internals.html
which is just that - a list without descriptions or syntaxes.  Quite
useful by itself, unless you don't know what you're looking for ;-)


>For more specific info on
>which article is showing, see the _is_article_visible() documentation in
>doc/slrnfuns.txt in the slrn distribution or an online copy.
>
>> Or, if that's possible, is there a way to download the message header
>> so extract_article_header() returns the headers which aren't in the
>> overview database?
>
>extract_article_header() only returns the value of one header--the header
>whose name you supply.

I know.  Unless slrn doesn't have the header yet, then the string is
empty.


>There is no programmatic indication where the header
>value came from--overview, cached headers or downloaded just before the
>function returned.

Nod I realize that, and that's not the point.  I don't care where the
headers came from, as long as I have 'em ;-)

That's why I needed the other function, to display the article.  If
slrn displays the article, it'll know the headers for sure.  If the
article is selected but not displayed, all you know for sure is that
it has the stuff from the overview database, which in most cases (if
not all) is not enough to do my stuff.  I think I wasn't very clear
while asking my question, sorry.


>> The only way I know to achieve that is by displaying the article ;-)
>
>Looking only at an article with full headers you can't determine which
>headers are in the overview and which aren't.  You can't even know if the
>server supports news overviews (a server might not).  Any assumptions are
>server-specific and therefore not a good idea to use in a general-purpose
>program.
>
>What task are you trying to accomplish that requires knowledge of the
>overview database?

It doesn't require knowledge of the overview database ;-)  I'm a
despammer.  I cancel spam when I see it in the newsgroups I read, like
EMP and MMF spam.  I wrote a cancel script to issue third-party
cancels.

I just hit some keycombo and it'll ask me what type of cancel I want
to issue.  It then fetches the headers I need, creates and writes a
cancel to a file, makes a backup of the article, and uses netcat (or
a patched inews) through system() to send the cancel to my news server.
It also creates a file to report the spam cancels to
nl.internet.misbruik, a dutch newsgroup about net-abuse.  I send that
file using inews from a daily cronjob.

When I have a list of Message-ID's (e.g. from my news server or
Dejanews) though, it gets rather old to get the articles with esc
control-l, view them, use my script, and that all again and again...

I'm extending the script now so I can just stuff the MID's in a file.
It'll read the MID's from the file, use locate_header_by_msgid() to
search and select it, hide_article to display it,
extract_article_header to fetch the headers I need, and so on.

Or perhaps I'll stuff the article headers I use in a linked list first,
gonna think about that now ;-)  Would enable me to easily decrease the
amount of connections I need to make to the news server.  Don't know
how my news server will like it if I throw like 20-30 cancels at once
at it without waiting for acknowledgements though ;-)

The other question you answered (about the prefixes) was to call that
part of the script through esc 1 control-i or something alike.  Since
you also answered the esc control-c part I'll probably just bind it to
those keys, using the default cancel key.

And when I'm done with that, I'm gonna write some email routine to
automagically notify the author of the original article so I don't
have to do that by hand.  And hmm then I'd like to make a dejanews
interface of sorts.  And hmmm then I'd like to be able to search my
news server from within slrn somehow because dejanews is delayed...
Being lazy is tiring sometimes ;-)


Thanks a lot for all your help,
Arjan

Technical Details
Message-ID: <slrn8nmpu6.rr.qhpxvr@quack.node0911.a2000.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn8nls20.oq.qhpxvr@quack.node0911.a2000.nl> <slrn8nmj2k.7e.jbn@forestfield.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8nmpu6.rr.qhpxvr@quack.node0911.a2000.nl>
Subject: Re: [slrn/slang] selected article -=> viewed article?
Date: Sun, 23 Jul 2000 00:00:00 +0000
From: qhpxvr@abqr0911.n2000.ay.invalid (Arjan Drieman)
References: <slrn8nls20.oq.qhpxvr@quack.node0911.a2000.nl> <slrn8nmj2k.7e.jbn@forestfield.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.mbox.zip!not-for-mail
X-Deja-AN: 649891623
X-Complaints-To: abuse@a2000.nl
X-Trace: tesla.a2000.nl 964388806 10731 62.108.9.17 (23 Jul 2000 21:46:46 GMT)
Organization: A2000 Kabeltelevisie en Telecommunicatie
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: duckie@duckie.neep.net
NNTP-Posting-Date: 23 Jul 2000 21:46:46 GMT
Newsgroups: news.software.readers
X-Authors-Homepage: http://duckie.neep.net/