🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #186697

Re: slrn macro for google lookup

#186697
From: Edward Langenback
Date: Sun, 18 Jun 2006 17:51
58 lines
3858 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On 2006-06-18, W. Citoan <wcitoan@NOSPAM-yahoo.com> wrote:
> Edward Langenback wrote:
>> 
>>  However this only allows lookups by email address instead of by
>>  username / nick with or without the address.  How can I get it to
>>  pull the 'poster nick <address@example.com>' so that I can either use
>>  the whole thing, or backspace out the address?  I've been plugging
>>  away at it but not getting anywhere since I've never seen s-lang code
>>  untill about a week ago
>
> You want to search on the whole from line, correct?  If so, in that
> script, the variable whois has the entire from line:
>
>    variable whois = extract_article_header ("From"),
>    re,wann,hvr,lan,nm_,ae_,browser=get_variable_value("non_Xbrowser");
>
> The next 3 lines perform a pattern match to extract the email address:
>
>    wann = string_match(whois,"\\C\\(\\<[-_0-9a-z.]*@[^.][-_0-9a-z.]*\\>\\)",1);
>    if(wann) {(hvr,lan)=string_match_nth(1); ae_ = substr (whois, hvr+1, lan);}
>    else error ("No email address has been found");

I should have realized that's what it was doing, but I've never been 
really good at puzzeling out regex patterns and this is the first 
s-lang I've tried messing with, I'm used to BASIC and lately, Tcl/Tk 
(visual tcl)

> You could simply remove those three lines and replace them with:
>
>    ae_ = whois
>
> and then the remainder of the script should use the whole from line.  If
> that explanation doesn't make sense, let me know.

With that explanation I can start to follow what it's doing and it's 
beginning to make sense.  Not only that, but it's now bringing up 
results in lynx.  My next step will be to use wget to grab the content 
and then figure out a way to parse the returned page for the results.


- -- 
email: apostle AT peculiar.homeip.net Encrypted email only
key-id: 0x72A69CD5 or 0x84D46604 Non-encrypted mail deleted unread.
http://peculiarplace.com/mixminion-message-sender/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQEVAwUBRJWSYnV+YnyE1GYEAQN44wf/VLLhFllbVO1Y0PvA3b8L29aS5P7nCmG2
s8x42ZaC1SvVBlVpNCGhzMXhnacg1Qec65E66A3OCvMEMK9mHlruhxV8jpjHPOth
iXPA1TbodvgtSZXp/4C18HMdIWoXKReVXRRrEG9pZ4K4R9UgxnbHPiRaBfeiRg81
GolwnvfL8JJ06TF7Dy77Ovr/67ldCoRftUAe1TFh9ryQvnAdc15Rwv0RX/MPOwo/
DOYAfMR7z2PBGbZ/rIE5NLqzDUfa0R1NIZXZ9mfhG3mYfUe2TBez2R3TUtPf6d8k
SK2E9lnMoQpXpfatmTT06WDS+5MNJyyic18UArk8uIIvMaRxkAno4w==
=V9+P
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrne9b4j2.grv.apostle@peculiar.homeip.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!local02.nntp.dca.giganews.com!nntp.centurytel.net!news.centurytel.net.POSTED!not-for-mail
References: <slrne99ec3.9l2.apostle@peculiar.homeip.net> <slrne9ank4.324.wcitoan@wcitoan-via.supernews.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrne9b4j2.grv.apostle@peculiar.homeip.net>
Subject: Re: slrn macro for google lookup
Date: Sun, 18 Jun 2006 12:51:54 -0500
From: Edward Langenback <apostle@pokynet.com>
References: <slrne99ec3.9l2.apostle@peculiar.homeip.net> <slrne9ank4.324.wcitoan@wcitoan-via.supernews.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!local02.nntp.dca.giganews.com!nntp.centurytel.net!news.centurytel.net.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 18 Jun 2006 12:51:54 -0500
Newsgroups: news.software.readers
User-Agent: slrn/0.9.8.1 (Debian)
Lines: 58
NNTP-Posting-Host: 69.29.166.59
X-Trace: sv3-SiR270fsUl7/CoTZF4ykox31COpWEWKLBwCSqyrDV2QzPS/ZKBfm6kKhxa/UzJdaFVta55qAhM/OOfa!vMeSQx6hT5Ky9hBl40xkYbe2enVjcB8yGcLRh0QSkbBqpTNbdFKXZrdb+TjtD8Rwk690/s2tn/cV!n5esP3RqomiSSBQr+DUOHRoY0nAxY6UAQQBL
X-Complaints-To: abuse@centurytel.net
X-DMCA-Complaints-To: abuse@centurytel.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.3.32