🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #30809

Re: slrn calling web browser

#30809
From: Jan Hlavacek
Date: Wed, 05 Feb 1997 00:00
49 lines
1764 bytes
On 4 Feb 1997 18:52:41 GMT, Mike Mckinney <mike@bga.com> wrote:
>	
>	When using shift U to jump to web sites in slrn, would it
>	be possible to get slrn to prompt for an address if it can't
>	find one in the current article ?
>	Often times there is a web address in the article, but it's not
>	written in a format that slrn recognizes as a valid web address.
>

Try something like this in your .slrn.sl.  It's nothing fancy, but it should
work.

define call_browser ()
{
   variable Null_String = ""; 
   variable cmd = Null_String;
   variable browser = "lynx";
   variable url = read_mini ("give an URL", Null_String, Null_String);
   if (strlen (url)) 
     {
	cmd = Sprintf ("%s %s", browser, url, 2);
	() = system (cmd);
     }
}
   
define browse ()
{
   ERROR_BLOCK 
     {
	_clear_error ();
	call_browser ();
     }
   call ("browse_url");
}

definekey ("browse", "U", "article");

You can shorten the call_browser function considerably, I just wanted it to
be easier to read.

lahvak
-- 
Jan Hlav\'{a}\v{c}ek
lahvak@math.ohio-state.edu
www: home page knocked down for major reconstruction


Technical Details
Message-ID: <slrn5fgfa3.e5o.lahvak@math.mps.ohio-state.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: <slrn5ff1ar.5ln.mike@apm5-182.realtime.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn5fgfa3.e5o.lahvak@math.mps.ohio-state.edu>
Subject: Re: slrn calling web browser
Date: Wed, 05 Feb 1997 00:00:00 +0000
From: lahvak@math.mps.ohio-state.edu (Jan Hlavacek)
References: <slrn5ff1ar.5ln.mike@apm5-182.realtime.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.mbox.zip!not-for-mail
X-Deja-AN: 214565881
Organization: Department of Mathematics, The Ohio State University
Newsgroups: news.software.readers