🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Marshall G. Flax Tue, 14 Jun 1994 04:34
trn + URL's
#9546
Author: Marshall G. Flax
Date: Tue, 14 Jun 1994 04:34
7 lines
856 bytes
There are lots of interesting URL's (pointers to info on the net)
in articles on the World Wide Web (www) in USENET.  Is there an 
elegant way to pull them out of articles within trn?

marshall
-- 
<Marshall G. Flax -- 718-256-3482 -- 8776 16th Ave #2, Brooklyn, NY 11214>
Re: trn + URL's
#9551
Author: Marshall G. Flax
Date: Tue, 14 Jun 1994 17:16
22 lines
1405 bytes
In article <2tjbvu$os0@panix2.panix.com>,
Marshall G. Flax <mgflax@panix.com> wrote:
>There are lots of interesting URL's (pointers to info on the net)
>in articles on the World Wide Web (www) in USENET.  Is there an 
>elegant way to pull them out of articles within trn?

To answer my own question, yes.  Here's one solution I culled from another
newsgroup:

Step 1: Add to .rnmac the following line:
	L	|readwebpost %C\n

Step 2: Create a script in your path called readwebpost with execute flag:
	#!/bin/sh
	file=/tmp/mgflax/mailynx.${$}.html
	(echo "<pre>" ; cat ; echo "</pre>" )> $file
	lynx $file < /dev/tty

marshall
-- 

[Marshall G. Flax -- 718-256-3482 -- 8776 16th Ave #2, Brooklyn, NY 11214-5802]
Re: trn + URL's
#9595
Author: Larry W. Virden
Date: Fri, 17 Jun 1994 18:52
94 lines
3227 bytes
of course if you use Mosaic, then to do that, you should use something
similar to this:

call with |goto-xm at article you wish to see.

#! /bin/sh
# goto-xm, by Joseph T. Buck <jbuck@eecs.berkeley.edu>
# Script for use with newsreaders such as trn.  Piping the article
# through this command causes xmosaic to pop up, pointing to the
# article.  If an existing xmosaic (version 1.1 or later) exists,
# the USR1 method will be used to cause it to point to the correct
# article, otherwise a new one will be started.

# assumptions: ps command works as is on SunOS 4.1.x, may need changes
# on other platforms.

URL=`grep '^Message-ID:' | sed -e 's/.*</news:/' -e 's/>.*//'`
if [ "X$URL" = "X" ]; then
	echo "USAGE: $0 [goto] [once] < USENET_msg" >&2
	exit 1
fi

pid=`ps -xc | egrep '[Mm]osaic' | awk 'NR == 1 {print $1}'`
times=1
if [ "X$pid" = "X" ] ; then
	p=`which Mosaic`
	if [ "X$p" = "X" ] ; then
		p=`which Mosaic-sun`
		if [ "X$p" = "X" ] ; then
			p=`which rmosaic`
			if [ "X$p" = "X" ] ; then
				p=`which mosaic`
				if [ "X$p" = "X" ] ; then
					echo "$0: Can't find Mosaic!" >&2
					exit 2
				else
					gfile=/tmp/xmosaic.$pid
					times=2
				fi
			else
				gfile=/tmp/Mosaic.$pid
			fi
		else
			gfile=/tmp/Mosaic.$pid
		fi
	else
		gfile=/tmp/Mosaic.$pid
	fi
	
	toolwait $p "$URL" 
	# or xmosaic "$URL" & if you don't have toolwait
	exit 0
fi

if	[ "X$gfile" = "X" ] ; then
	gfile=/tmp/Mosaic.$pid
fi

if	[ "$#" -gt 0 ] ; then
if	[ "$1" = "goto" -o "$1" = "same" ] ; then
	shift
	echo "goto"   > $gfile
else
	echo "newwin" > $gfile
fi
else
	echo "newwin" > $gfile
fi
awk 'END { printf "'"$URL"'" }' </dev/null >> $gfile

trap "echo signal encountered" 30
kill -USR1 $pid

if	[ "$#" -gt 0 ] ; then
if	[ "$1" = "once" -o "$2" = "once" ] ; then
	exit 0
fi
fi

#	We do this twice right now due to a bug in NNTP or Mosaic.

if	[ "$times" = 2 ] ; then
sleep 5
echo "goto"   > $gfile
awk 'END { printf "'"$URL"'" }' </dev/null >> $gfile
trap "echo signal encountered" 30
kill -USR1 $pid
fi
exit 0
-- 
:s Great net resources sought...
:s Larry W. Virden                 INET: lvirden@cas.org
:s Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
The task of an educator should be to irrigate the desert not clear the forest.
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