🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #59775

Re: URLs in slrn (0.9.6.2)

#59775
From: Martijn van Buul
Date: Wed, 29 Mar 2000 00:00
67 lines
2642 bytes
It occurred to me that Jurriaan W Kalkman wrote in news.software.readers:
> according to find_url() in art.c, it searches for :// as a distinctive
> mark, then tries to find an url there. Perhaps it would be an option in
> a future release to have a regular expression in .slrnrc to use when
> searching for urls? 
> 
> This would allow everyone to either make it find only official urls or
> find anything starting with www. too.
> 
> All comments appreciated!

A feature like this could be implemented in S-lang too. The following script
will search for Message-ID's, but with a different regexp, URLs won't  be
a problem. You will get a lot of false hits, though.

define my_message_id_search ()
{
    variable found_string;
    variable count;
    variable start,length;
    call("art_bob");
    count=0;
    while(re_search_article("<[^ @]*@[a-zA-Z0-9\.\-]*>") == 1)
    {
       found_string=();
       ()=string_match(found_string,"<[^ @]*@[a-zA-Z0-9\.\-]*>",1);
       (start,length)=string_match_nth(0);
       substr(found_string,start+1,length); % Leaves string on stack
       count=count+1;
    }
    return count;
}

define my_message_id_display()
{
    variable MID;
    "Select Message-ID";  % Pushes title
    my_message_id_search(); % Pushes Message-ID's + #items
    {
       variable temp;
       temp=();
       if(temp==0)
       {
	  error("No Message-ID's found!");
          return;
       }
       temp;
    }
    0;			    % Pushes default item.
    select_list_box();
    MID=();
    if(1==locate_header_by_msgid(MID,1))
    {
      update();
      call("scroll_dn");
    } 
}

definekey("my_message_id_display","M","article");



-- 
    Martijn van Buul -  Pino@dohd.cx - http://www.stack.nl/~martijnb/
		Visit OuterSpace: mud.stack.nl 3333

Technical Details
Message-ID: <slrn8e3hbg.ngt.pino+news_software_readers@mud.stack.nl>
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: <slrn8dnqpc.10b.pheisner@Pinky.rbc> <slrn8dpf74.7dl._hate_spam_thunder7@middle.of.nowhere>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8e3hbg.ngt.pino+news_software_readers@mud.stack.nl>
Subject: Re: URLs in slrn (0.9.6.2)
Date: Wed, 29 Mar 2000 00:00:00 +0000
From: pino+news_software_readers@dohd.cx (Martijn van Buul)
References: <slrn8dnqpc.10b.pheisner@Pinky.rbc> <slrn8dpf74.7dl._hate_spam_thunder7@middle.of.nowhere>
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: 603780669
Organization: Eindhoven University of Technology
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: pino+news_software_readers@dohd.cx (Martijn van Buul)
Newsgroups: news.software.readers
X-religion: mutt vim slrn C64 Fort Apocalypse