Article View: news.software.readers
Article #205254Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
From: Troy Piggins
Date: Wed, 05 Sep 2007 21:17
Date: Wed, 05 Sep 2007 21:17
61 lines
3871 bytes
3871 bytes
* 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.
--
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 ** ___ | __ __ ,-O (o- O
slrn macros and howto: |___ | |/ |/ | O ) //\ O
http://piggo.com/~troy/slrn ___| | | | | `-O V_/_ OOO
Technical Details
Message-ID:
<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!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!newsfeed.kamp.net!newsfeed.kamp.net!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!193.201.147.83.MISMATCH!news-out.superfeed.co.uk!news-in1.newsgroups.com!newsfeed.pacific.net.au!news.uwa.edu.au!news.waia.asn.au!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!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>Show Full Headers
Complete Article Headers
Message-ID: <20070906071300@usenet.piggo.com> Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro Date: Thu, 06 Sep 2007 07:17:37 +1000 From: Troy Piggins <usenet-0709@piggo.com> 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> 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!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!newsfeed.kamp.net!newsfeed.kamp.net!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!193.201.147.83.MISMATCH!news-out.superfeed.co.uk!news-in1.newsgroups.com!newsfeed.pacific.net.au!news.uwa.edu.au!news.waia.asn.au!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail Lines: 61 NNTP-Posting-Host: 124.171.193.207 Newsgroups: news.software.readers X-Trace: 1189027314 per-qv1-newsreader-01.iinet.net.au 28517 124.171.193.207 Reply-To: usenet-0709@piggo.com X-NNTP-Proxy: Leafnode-2 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/) User-Agent: slrn/0.9.8.1pl2.1/rt (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit