Article View: news.software.nn
Article #6060Re: guard-double-slash and !lynx http://
From: Stephen Foy
Date: Sat, 02 Jul 1994 18:38
Date: Sat, 02 Jul 1994 18:38
77 lines
3316 bytes
3316 bytes
Nancy McGough <nancym@ii.com> writes: >Often when I'm in nn I want to take a look at a web page someone >mentions so I type: > !lynx http://etc... >But by default nn interprets // as /, so I set guard-double-slash >on in my init file but that doesn't help. Anyone have a suggestion? Here are some nn macros and shell scripts that let you start up lynx from within nn. Put the macros into your .nn/init and save the two shell scripts. Make sure the shell scripts are in your PATH and executable. Both macros are invoked when nn is in show mode (reading an article). The first, W, converts the current article to an html document and starts lynx with it. This is the macro to use if an article you are reading contains html. The second macro, S, greps for the string ://, the string common to most URLs, and attempts to starts lynx with that URL. If there is more that one URL in an article the last one is passed to lynx. The URL must be surrounded by whitespace for lynx to read it properly. I find that I can access most URLs mentioned in articles with these macros. When I can't I do a ctrl-z and run lynx from the shell prompt. In nn default configuration the show mode commands W & S duplicate the fuctions of w & s. The macros for .nn/init... ----------------8<---------cut here----------8<-------------- # nn macros to pipe article to shell scripts that invoke lynx map show W ( save-short "|ReadWebPost" redraw ) map show S ( save-short "|GrepUrl" redraw ) ----------------8<---------cut here----------8<-------------- Shell script ReadWebPost... ----------------8<---------cut here----------8<-------------- #!/bin/sh # ReadWebPost echo \<PRE\> > .article.html cat >> .article.html echo \</PRE\> >> .article.html lynx .article.html < /dev/tty rm .article.html ----------------8<---------cut here----------8<-------------- Shell script GrepUrl ----------------8<---------cut here----------8<-------------- #!/bin/sh # GrepUrl # If the article contains more that one URL, lynx is started with # the last one in the file. The selected URL must be surrounded by # whitespace for lynx to start up properly. cat > .article lynx `grep :// .article` < /dev/tty rm .article ----------------8<---------cut here----------8<-------------- ps My thanks to person who posted the ReadWebPost script and macro, (for rn), to comp.infosystems.www. And an apology to that person too, as I've deleted the article and can't give you his name. -- Stephen Foy shf@access.digex.net
Technical Details
Message-ID:
<shf.773173692@access2>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!hookup!usc!howland.reston.ans.net!pipex!sunic!trane.uninett.no!nac.no!eunet.no!nuug!EU.net!uunet!news1.digex.net!access2!shfReferences:
<2uvcpu$msr@nwfocus.wa.com>Show Full Headers
Complete Article Headers
Message-ID: <shf.773173692@access2> Subject: Re: guard-double-slash and !lynx http:// Date: Sat, 02 Jul 1994 18:38:19 +0000 From: shf@access.digex.net (Stephen Foy) References: <2uvcpu$msr@nwfocus.wa.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!hookup!usc!howland.reston.ans.net!pipex!sunic!trane.uninett.no!nac.no!eunet.no!nuug!EU.net!uunet!news1.digex.net!access2!shf Newsgroups: news.software.nn Organization: Express Access Online Communications, Greenbelt, MD USA Lines: 77 NNTP-Posting-Host: access2.digex.net