Thread View: news.software.readers
4 messages
4 total messages
Started by Salvatore Denaro
Fri, 23 Jan 1998 00:00
SLRN and scoring based on message body?
Author: Salvatore Denaro
Date: Fri, 23 Jan 1998 00:00
Date: Fri, 23 Jan 1998 00:00
13 lines
980 bytes
980 bytes
Subject says it all. Any chance that this can be done? Also, can SLRN search all articles for a string? Anyone have an example slang script to do this? -- sal@panix.com Salvatore Denaro "The reality of the software business today is that if you find something that can make you ridiculously rich, then that's something that Microsoft is going to take away from you." -- Max Metral
Re: SLRN and scoring based on message body?
Author: Holger Lillqvist
Date: Sat, 24 Jan 1998 00:00
Date: Sat, 24 Jan 1998 00:00
121 lines
3622 bytes
3622 bytes
Quoting Salvatore Denaro <sal@panix3.panix.com>:
> Subject says it all. Any chance that this can be done?
>
> Also, can SLRN search all articles for a string? Anyone have an
> example slang script to do this?
JED once answered on such a request, see below. - One reason why
scoring on body strings proabably not will be implemented is of
course that it would be extremely slow. An occasional body search in
a newsgroup is another matter, but anyway you sure want to change
screen and work with something else while the search is running...
Here is the JED quote:
On 4 Apr 1997 08:48:43 GMT, J.H.M. Dassen <jdassen@wi.LeidenUniv.nl>
wrote:
>Is it possible in slrn to score on words in the body of messages? If so,
>is there an example file available?
No, I did not add scoring on the body of the message. It is
extremely unlikely that I would ever do so; however, you should be
able to write a macro to do body searches (see what I use below).
< clip >
Here is the body searching macro. See slrn/doc/README.macros for more
information. (There are actually two searches: one that searches
articles on the server and the other uses www.altavista.com)
Note: you may need slrn/macros/util.sl loaded.
!if (is_defined ("Search_Altavista_Browser"))
{
variable Search_Altavista_Browser = "lynx";
}
variable Search_Last_Art_Search_Str = "";
define search_newsgroup ()
{
variable str;
variable flags;
str = read_mini ("Search for regexp", Search_Last_Art_Search_Str, "");
!if (strlen (str))
return;
Search_Last_Art_Search_Str = str;
uncollapse_threads ();
do
{
flags = get_header_flags ();
if (re_search_article (str))
{
pop ();
return;
}
set_header_flags (flags);
call ("hide_article");
}
while (header_down (1));
error ("Not found.");
}
define search_using_altavista ()
{
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'", Search_Altavista_Browser,
url, cgi, new_str, 4);
() = system (cmd);
}
define search_easy_search ()
{
variable rsp;
rsp = get_select_box_response ("NewsGroup Searches", % title
"AltaVista (WWW)",
"search articles",
2);
switch (rsp)
{ case 0: search_using_altavista (); }
{ case 1: search_newsgroup (); }
}
definekey ("search_easy_search", "$", "article");
Re: SLRN and scoring based on message body?
Author: Sven Guckes
Date: Sat, 24 Jan 1998 00:00
Date: Sat, 24 Jan 1998 00:00
33 lines
1937 bytes
1937 bytes
sal@panix3.panix.com (Salvatore Denaro): > Subject says it all. I have said in many times and I'll say it again: NEVER EVER put your question into the subject only. It may be change! Besides, how are we supposed to keep a context if it cannot be quoted? Oh, well, after all I have a good newsreader that easily allow me to copy the Subject line. Here we go: > Subject: Re: SLRN and scoring based on message body? > Any chance that this can be done? No. Not yet. It's on the wishlist, though. > Also, can SLRN search all articles for a string? I think there are only commands to search within the From and Subject only. > Anyone have an example slang script to do this? Anyone? Sven [hoping that JED will take a look at the wishlist again soon] -- Sven Guckes guckes@math.fu-berlin.de using SLRN 0.9.4.3 [970714] SLRN Pages: http://www.math.fu-berlin.de/~guckes/slrn/ 0.9.4.3 [970714] SLRN Wishlist: http://www.math.fu-berlin.de/~guckes/slrn/wish.html SLRN Author: http://space.mit.edu/~davis/slrn.html John E. Davis aka JED
Re: SLRN and scoring based on message body?
Author: John E. Davis
Date: Fri, 30 Jan 1998 00:00
Date: Fri, 30 Jan 1998 00:00
106 lines
3059 bytes
3059 bytes
On 24 Jan 1998 17:01:49 GMT, Sven Guckes <guckes@math.fu-berlin.de>
wrote:
>> Also, can SLRN search all articles for a string?
>
>I think there are only commands to search within the From and Subject only.
A macro can be used. The functions that I use are included below.
Basically, these macros define two searches:
1. Search the current newsgroup
2. Search using the altavista search engine
The function `easy_search' causes a box to pop up that queries which
of the two searches to make, and then calls the appropriate function.
I bind it to `$'.
[Note: The altavista search used to work. The altavisa server may
have changed, so I make no guarantees about it.]
---------------------------------------------------------------------
variable Last_Art_Search_Str = "";
define search_newsgroup ()
{
variable str;
variable flags;
str = read_mini ("Search for regexp", Last_Art_Search_Str, "");
!if (strlen (str))
return;
Last_Art_Search_Str = str;
uncollapse_threads ();
do
{
flags = get_header_flags ();
if (re_search_article (str))
{
pop ();
return;
}
set_header_flags (flags);
call ("hide_article");
% update ();
}
while (header_down (1));
error ("Not found.");
}
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);
}
define easy_search ()
{
variable rsp;
rsp = get_select_box_response ("NewsGroup Searches", % title
"AltaVista (WWW)",
"search articles",
2);
if (rsp == 0) altavista_search ();
else if (rsp == 1) search_newsgroup ();
}
definekey ("easy_search", "$", "article");
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads