🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #47194

Re: fetching expired articles with slrn

#47194
From: Peppe
Date: Wed, 10 Mar 1999 00:00
79 lines
3878 bytes
Thus wrote John E. Davis <davis@space.mit.edu>
> On 9 Mar 99 20:26:08 GMT, Peppe <c928400@student.dtu.dk>
> wrote:
> >I tried it. Just hung on the empty status line for quite a while. Had
> >to kill slrn. Odd.

> Did you press ^G to abort the macro?

Thought I did. I must have pressed ^C instead.

Anyway, being used to direct global substitution, the looping way of
doing it in slang caused the confusion:

    while (str_replace (mid, "%", "%25"))
        mid = ();

Filling up with 252525..., I guess the string becomes too long at some
point :-)

Assuming that the string "___25___" will not occur in a message ID, I
have come up with the following:

---------------------------------------------------------------------------
% Get an expired message from dejanews.
% Written by Preben "Peppe" Guldberg <c928400@student.dtu.dk>
define dejanews_mid ()
{
    variable mid, len, data, command;

    mid = read_mini ("Find which message ID on dejanews", "", "");
    mid = strtrim (mid);
    len = strlen (mid);
    if (len == 0)
        return;
    if (mid[0] == '<' and mid[len-1] == '>')
        mid = substr (mid, 2, len-2);

    % Format a proper query for dejanews:
    while (str_replace (mid, "%", "___25___"))
        mid = ();
    while (str_replace (mid, "___25___", "%25"))
        mid = ();
    while (str_replace (mid, "+", "%2B"))
        mid = ();
    data = strcat ("?'MID=%3C", mid);
    data = strcat (data, "%3E'");

    command = strcat ("lynx http://www.dejanews.com/msgid.xp", data);

    () = system (command);
}
% Bind this function to a key (M) for use in article mode.
definekey ("dejanews_mid", "M", "article");
---------------------------------------------------------------------------

[Posted in full for those who might use it. Including keybindings this
time]


Btw, I noticed that 

    setkey article	dejanews_mid		"M"

will bind the function to both "M" and "m" if "m" is not bound
already.

A quick test shows that definekey() works the same (which could be
expected).

Any reason for this behaviour?

Peppe
-- 
He gives the kids free samples,        __/-\__         Preben Guldberg
Because he knows full well              (o o)   c928400@student.dtu.dk
That today's young innocent faces   oOOo (_) oOOo---------------------
Will be tomorrow's clientele.       --Tom Lehrer: The Old Dope Peddler

Technical Details
Message-ID: <slrn7ebg03.60.c928400@urdybet.pbk.dk>
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: <Pine.LNX.4.04.9902281839210.5878-100000@paule.ncpa.olemiss.edu> <36d9ff6d.641177409@nntp3.site1.csi.com> <slrn7dktrf.6tn.guckes@rudin.math.fu-berlin.de> <36dacea6.23183718@news.washburn.edu> <slrn7dlrof.6tn.guckes@rudin.math.fu-berlin.de> <Pine.WNT.4.10.9903011547180.-395821@aleph> <slrn7dnh2c.6tn.guckes@rudin.math.fu-berlin.de> <Pine.WNT.4.10.9903020911460.-421041@aleph> <slrn7dq7dj.edv.guckes@rudin.math.fu-berlin.de> <slrn7dr6m3.f16.c928400@urdybet.pbk.dk> <slrn7dtjm4.pap.davis@aluche.mit.edu> <slrn7du09c.38m.c928400@urdybet.pbk.dk> <slrn7du0ol.38m.c928400@urdybet.pbk.dk> <slrn7e6lh8.hd3.adamb@nathan.enteract.com> <slrn7eb0u0.i54.c928400@urdybet.pbk.dk> <slrn7eb3de.tvi.davis@aluche.mit.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn7ebg03.60.c928400@urdybet.pbk.dk>
Subject: Re: fetching expired articles with slrn
Date: Wed, 10 Mar 1999 00:00:00 +0000
From: c928400@student.dtu.dk (Peppe)
References: <Pine.LNX.4.04.9902281839210.5878-100000@paule.ncpa.olemiss.edu> <36d9ff6d.641177409@nntp3.site1.csi.com> <slrn7dktrf.6tn.guckes@rudin.math.fu-berlin.de> <36dacea6.23183718@news.washburn.edu> <slrn7dlrof.6tn.guckes@rudin.math.fu-berlin.de> <Pine.WNT.4.10.9903011547180.-395821@aleph> <slrn7dnh2c.6tn.guckes@rudin.math.fu-berlin.de> <Pine.WNT.4.10.9903020911460.-421041@aleph> <slrn7dq7dj.edv.guckes@rudin.math.fu-berlin.de> <slrn7dr6m3.f16.c928400@urdybet.pbk.dk> <slrn7dtjm4.pap.davis@aluche.mit.edu> <slrn7du09c.38m.c928400@urdybet.pbk.dk> <slrn7du0ol.38m.c928400@urdybet.pbk.dk> <slrn7e6lh8.hd3.adamb@nathan.enteract.com> <slrn7eb0u0.i54.c928400@urdybet.pbk.dk> <slrn7eb3de.tvi.davis@aluche.mit.edu>
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: 453194819
X-Complaints-To: usenet@news.net.uni-c.dk
X-Trace: news.net.uni-c.dk 921026693 29250 130.225.71.226 (10 Mar 1999 00:44:53 GMT)
Organization: Home of Peppe
User-Agent: slrn/0.9.5.4 (UNIX)
Reply-To: c928400@student.dtu.dk
NNTP-Posting-Date: 10 Mar 1999 00:44:53 GMT
Newsgroups: news.software.readers