Article View: news.software.readers
Article #47024Re: fetching expired articles with slrn
From: Peppe
Date: Wed, 03 Mar 1999 00:00
Date: Wed, 03 Mar 1999 00:00
56 lines
3125 bytes
3125 bytes
Thus wrote Sven Guckes <guckes@math.fu-berlin.de>
> Now, where's that slrn slang macro that
> fetches expired posts from DejaNews?
> Anyone?
How about the following:
define dejanews_mid ()
{
variable mid, len, data, command;
mid = read_mini ("Find which message ID on dejanews", "", "");
mid = strtrim (mid);
len = strlen (mid);
if (mid[0] == '<' & mid[len-1] == '>')
mid = substr (mid, 2, len-2);
% Why doesn't this work?
%mid = str_replace_all (mid, "+", "%");
% Format a proper query for dejanews:
data = strcat ("?'MID=%3C", mid);
data = strcat (data, "%3E&ST=&AH=1'");
command = strcat ("lynx http://www.dejanews.com/msgid.xp", data);
() = system (command);
}
It accepts message Id's with and without surrounding '<' and '>'.s
So far it works well for me, except when the ID contains a "+".
Dejanews needs to have this character substituted by "%" (probably
others as well). I tried to work around it using str_replace_all:
define str_replace_all (orig, match, replacement)
{
while (str_replace (orig, match, replacement))
orig = ();
return orig;
}
Unfortunately this garbles the ID:
before: Z+A5sCBRfm12EwIo@thunderbird-sport.freeserve.co.uk
after: Z�sCBRfm12EwIo@thunderbird-sport.freeserve.co.uk
Here "+A5" have been replaced by "�". Anybody know why?
Peppe
--
Be prepared! That's the Boy Scouts' solemn creed __/-\__ Preben Guldberg
Be prepared! And be clean in word and deed (o o) c928400@student.dtu.dk
Don't solicit for your sister, that's not nice oOOo (_) oOOo-------------------
Unless you get a good percentage of her price --Tom Lehrer: Be Prepared
Technical Details
Message-ID:
<slrn7dr6m3.f16.c928400@urdybet.pbk.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.pine.mbox.zip!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
Message-ID: <slrn7dr6m3.f16.c928400@urdybet.pbk.dk> Subject: Re: fetching expired articles with slrn Date: Wed, 03 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> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.pine.mbox.zip!not-for-mail X-Deja-AN: 450878664 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.net.uni-c.dk X-Trace: news.net.uni-c.dk 920492775 33880 130.225.71.226 (3 Mar 1999 20:26:15 GMT) Organization: Home of Peppe Mime-Version: 1.0 User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: c928400@student.dtu.dk NNTP-Posting-Date: 3 Mar 1999 20:26:15 GMT Newsgroups: comp.mail.pine,news.software.readers