🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #25330

Re: slrn and searching

#25330
From: John E. Davis
Date: Wed, 28 Aug 1996 00:00
58 lines
2417 bytes
On Wed, 28 Aug 96 07:43:40 GMT, Alexander Sanda <alex@darkstar.ping.at>
wrote:
 : >I am wondering if it is possible to let slrn search for a string
 : >in all the article *bodies* in the currently selected news group
[...]
 : AFAIK, this is currently not supported. But it is on the TODO and may be 
 : available in one of the next versions.

0.9 will support it via a macro.  However, since all articles would
have to be downloaded from the server, this type of search will be
slow.  Its speed has nothing to do with the fact that it is
implemented via a macro.

As an alternative, I recommend using a search engine such as
altavista.  In fact, slrn 0.9 will provide an example macro that
prompts for a search string and then calls a web browser to connect to
the altavista server.  Here is the macro:

define altavista_search ()
{
   variable browser = "lynx";
   variable url = "http://www.altavista.digital.com/";
   variable cgi = "cgi-bin/query?pg=q&what=news&fmt=.&q=";
   variable str, new_str, len, ch, chlo, i;
   variable cmd;
   
   str = strcat ("+newsgroups:", current_newsgroup ());
   str = strcat (str, " +");
   
   str = read_mini ("AltaVista Search: ", str);
   
   len = strlen (str);
   !if (len) return;
   
   new_str = "";
   for (i = 0; i < len; i++)
     {
	ch = str [i];
	chlo = ch | 0x20;
	if ((chlo > 'z') or (chlo < 'a'))
	  ch = Sprintf ("%%%02X", ch, 1);
	else 
	  ch = char (ch);
	
	new_str = strcat (new_str, ch);
     }
   
   cmd = Sprintf ("%s '%s%s%s'", browser, url, cgi, new_str, 4);
   () = system (cmd);
}
-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis


Technical Details
Message-ID: <slrn529425.327.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
References: <slrn522j0e.63v.friedetz@hpmayr15.informatik.tu-muenchen.de> <3223f8ad.0@localhost>

Show Full Headers
Complete Article Headers
Message-ID: <slrn529425.327.davis@aluche.mit.edu>
Subject: Re: slrn and searching
Date: Wed, 28 Aug 1996 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn522j0e.63v.friedetz@hpmayr15.informatik.tu-muenchen.de> <3223f8ad.0@localhost>
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: 176948357
Organization: Center for Space Research
Reply-to: davis@space.mit.edu
Newsgroups: news.software.readers