![]()
I was using a simple command line client of my own devising, but then
I looked a bit at how to get it to talk to Mosaic and came up with
this. It requires a local copy of the "directory of servers", but
otherwise works with Mosaic.
The basic idea is that you type something on the command line that
feeds the right URL into your Mosaic client, and then you go on about
your business; when the query comes back you pop up the Mosaic window
and look at things.
I don't really want to "hypernavigate to my heart's content";
generally I know roughly where the answer is and I want to get right
to it, mail it off, and get on with things.
#!/usr/local/bin/perl
#
# ws-web - fire up wais search into mosaic from command line
#
# ws-web usenet crypt
#
# author: emv@mail.msen.com (Edward Vielmetti)
$wsrc = "/usr/local/lib/wais-sources/";
$home = $ENV{"HOME"};
# The call to ps is ugly.
$pstable = `ps auxw| grep Mosaic | grep -v grep `;
($user, $pid, @rest) = split(" ", $pstable);
print $pstable;
($src, @words) = @ARGV;
$query = join("+", @words);
$srcfile = $wsrc . $src . ".src";
open (S, "$srcfile") || die "no wais source $src : $!" ;
while (<S>) {
/:tcp-port\s+(\d+)/ && ($port = $1);
/:ip-name\s+"(.*)"$/ && ($host = $1); # XXX
# if not terminated
# with " get next line
}
open(CONTROL,"> /tmp/xmosaic.$pid");
print CONTROL "goto\n";
print CONTROL "wais://$host:$port/$src?$query\n";
close(CONTROL);
`kill -USR1 $pid`;
[
Usenet Hypertext FAQ Archive |
Search Mail Archive |
Authors |
Usenet
]
[
1993 |
1994 |
1995 |
1996 |
1997
]
![]()
© Copyright The Landfield Group, 1997
All rights reserved