Article View: news.software.readers
Article #205256Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
From: Blinky the Shark
Date: Wed, 05 Sep 2007 23:07
Date: Wed, 05 Sep 2007 23:07
64 lines
4078 bytes
4078 bytes
Troy Piggins wrote:
> * Peter J Ross is quoted & my replies are inline below :
>> In news.software.readers on Wed, 05 Sep 2007 15:12:45 +1000, Troy
>> Piggins <usenet-0709@piggo.com> wrote:
>>
>> #v+
>> > define whois_postinghost () {
>> >
>> > variable status= is_article_visible ();
>> >
>> > if ( status & 1) { variable postinghost= extract_article_header (
>> > "NNTP-Posting-Host");
>> >
>> > variable ph_exists= strlen ( postinghost);
>> >
>> > if ( ph_exists > 0) { () = system ( "whois "+postinghost+" |
>> > less"); } else { throw InvalidParmError, "This article doesn't
>> > contain a NNTP-Posting-Host header"; }
>> >
>> > } else { throw InvalidParmError, "You need to display the article
>> > to check"; }
>> >
>> > }
>> >
>> > definekey ( "whois_postinghost", "\eH", "article");
>> #v-
>>
>> Very nice.
>>
>> To be bulletproof on all the OSes slrn can run on, you probably need
>> to check for the existence of a program named "whois" (not AFAIK
>> available by default on Windows, at least up to Win2k, or on a
>> minimal Debian installation). The same applies to "less", with the
>> added complexity that some people may use "more", "most" or even "vi"
>> as their pager.
>
> Good point. I thought about that myself, just need a little more (no
> pun intended) time.
>
>> Or just add a comment explaining that () = system ( "whois
>> "+postinghost+" | less"); may need to be edited.
>
> That's a good interim solution.
>
>> Have you considered making your useful collection of macros available
>> as a .deb and/or .rpm? If you did, you could specify suggested
>> dependencies, such as, in this case, a whois client and a pager.
>
> I have considered it, but to be honest I have trouble publishing the
> macros as they are, let alone rolling packages. I haven't done that
> much .deb creation so maybe it's not as painful as I think.
Weirdest thing. Right now, I have to comment out the interpret line for
this macro in .slrnrc or slrn won't run. And I can't remember how to
run slrn so that the error messages are retained; the failure goes by so
fast that I can't read it. I'm not claiming it's the macro; I just
don't know what's happening. I've made a fresh paste of your last
version into whois_postinghost.sl more than once, to no avail.
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28
Technical Details
Message-ID:
<slrnfdudml.pcd.no.spam@thurston.blinkynet.net>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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <slrnfdtl54.3bm.pjr@pjr.gotdns.org> <20070906071300@usenet.piggo.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnfdudml.pcd.no.spam@thurston.blinkynet.net> Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro Date: Wed, 05 Sep 2007 23:07:18 +0000 From: Blinky the Shark <no.spam@box.invalid> References: <20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <slrnfdtl54.3bm.pjr@pjr.gotdns.org> <20070906071300@usenet.piggo.com> 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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Organization: http://blinkynet.net Lines: 64 X-Trace: individual.net kp2YXAYf2/8aHVuWwEuXbw3ID0XG3Xj/Pnj/kH2hVwNAKNMf0O Cancel-Lock: sha1:qs0OT2Q5TfD3o6QmdEkB5FqL5no= X-The-Usenet-Improvement-Project: http://blinkynet.net/comp/uip5.html X-Face: Jb-wQ7r&vrN}~8MC5B09S4&.ieh!Q:Di/XN.xrd#CU%; )bPa`Hm^(,3o$n(s75[P+$F+Q^4~Owj`WzkBtZU/#gL2BvEBm/e=/1,R0}d@q@)E X-OS: Mandriva 2006 Linux; kernel 2.6.12 X-WebTV-Stationery: Standard; BGColor=black; TextColor=black User-Agent: slrn/0.9.8.1 (Linux)