Article View: news.software.readers
Article #9595Re: trn + URL's
From: Larry W. Virden
Date: Fri, 17 Jun 1994 18:52
Date: Fri, 17 Jun 1994 18:52
94 lines
3227 bytes
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.
Technical Details
Message-ID:
<1994Jun17.185211.19199@chemabs.uucp>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!usenet.ins.cwru.edu!ns.mcs.kent.edu!kira.cc.uakron.edu!malgudi.oar.net!chemabs!lwv26References:
<2tjbvu$os0@panix2.panix.com> <2tkom0$583@panix2.panix.com>Show Full Headers
Complete Article Headers
Message-ID: <1994Jun17.185211.19199@chemabs.uucp> Subject: Re: trn + URL's Date: Fri, 17 Jun 1994 18:52:11 GMT From: lwv26@cas.org (Larry W. Virden) References: <2tjbvu$os0@panix2.panix.com> <2tkom0$583@panix2.panix.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.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!usenet.ins.cwru.edu!ns.mcs.kent.edu!kira.cc.uakron.edu!malgudi.oar.net!chemabs!lwv26 Newsgroups: news.software.readers Content-Type: text/plain; charset=US-ASCII Followup-To: news.software.readers Sender: usenet@chemabs.uucp Reply-To: lvirden@cas.org Content-Transfer-Encoding: 7BIT Organization: Nedriv Software and Shoe Shiners, Uninc. Mime-Version: 1.0 Lines: 94