🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #63616

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

#63616
From: J.B. Nicholson-Owens
Date: Sun, 23 Jul 2000 00:00
42 lines
2515 bytes
Arjan Drieman wrote:
> Is there a single command I can use in my slang scripts that displays
> the current selected article in the article window?

There is more than one way to do this, here's one way:

#v+
   !if (_is_article_visible () & 1) call ("hide_article");
#v-

Of course this will only work from article mode.  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.  There is no programmatic indication where the header
value came from--overview, cached headers or downloaded just before the
function returned.  It is not wise to infer that a header is not in the
server's overview because you received an empty string from
extract_article_header().

If you want to know what headers are in the overview database you need to
parse the output of the "LIST OVERVIEW.FMT" NNTP command.  slrn's S-Lang API
offers no direct access to the server (short of opening a connection to the
server yourself and parsing the entire datastream).

> 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?

Technical Details
Message-ID: <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
References: <slrn8nls20.oq.qhpxvr@quack.node0911.a2000.nl>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8nmj2k.7e.jbn@forestfield.org>
Subject: Re: [slrn/slang] selected article -=> viewed article?
Date: Sun, 23 Jul 2000 00:00:00 +0000
From: jbn@forestfield.org (J.B. Nicholson-Owens)
References: <slrn8nls20.oq.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
X-Deja-AN: 649859359
X-Trace: fu-berlin.de 964381832 4110100 208.216.67.173 (16 [35848])
Organization: Forest Field OmniMedia
User-Agent: slrn/0.9.6.2 (Unix)
Newsgroups: news.software.readers