The jviewers.tcl library is distributed as part of the jstools package. It consists of procedures to manage display of World Wide Web documents and Unix manual pages to the user, honouring hir preferences for what tools to use.
This document describes jviewers.tcl version 4.0/4.0.
In order to use the jviewers.tcl library, it must be in your Tcl auto_path, described in tclvars(n). Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.
Jay Sekora
js@calumet.org
http://shore.net/~js/
The library is copyright © 1992-1995 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.
j:view_url - display the document pointed to by a World Wide Web URL
j:view_man - display a Unix manual page
j:view_url:mosaic - display a URL with Mosaic
j:view_url:netscape - display a URL with Netscape
j:view_url:arena- display a URL with Arena
j:view_url:lynx - display a URL with lynx(1) running in an xterm(1X11)
j:view_man:builtin -display a manual page with
man(1) and
ul(1)
j:view_man:man -display a manual page with man(1) running in an xterm(1X11)
j:view_url url
url is the URL of the Web document to display
j:view_url http://shore.net/~js/
j:view_url ftp://ftp.aud.alcatel.com/pub/tcl/README
This procedure invokes the user's chosen Web browser to display the document indicated by url. The exact mechanism whereby this happens may vary from browser to browser.
j:view_man manpage
manpage is the name of the manual page to display
j:view_man xauth
This procedure invokes the users chosen method for viewing Unix manual pages to display the page named manpage. The exact mechanism whereby this happens may vary depending on the mechanism chosen. (For instance, for TkMan, it may involve using the Tk send(n) command to communicate with a running copy of TkMan; for the builtin method it involves displaying the filtered output of man(1) in a window.)
These procedures implement the interface to particular Web browsers or manualpage viewers a user may choose. You shouldn't call them directly in your code - doing so would defeat the purpose of allowing the user to set viewer preferences.
* There need to be more choices, and also a mechanism for the user to specify tools I haven't foreseen.
* This concept might be extended to display of other sorts of information.
* It might be appropriate to let the user specify different tools for different URL access mechanisms (e.g. ftp: vs. http:) or (more likely) different kinds of documents (e.g. image/jpeg vs. audio/basic). This is unlikely, though, since it would probably require implementing something like a Web browser in Tcl and duplicating lots of functionality that already exists in other tools.