Title

jviewers.tcl

Introduction

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.

Usage

Accessing the Library

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.

Credits and Copyright

Author

Jay Sekora

js@calumet.org

http://shore.net/~js/

Copyright

The library is copyright © 1992-1995 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.

Overview

Public Procedures

j:view_url - display the document pointed to by a World Wide Web URL

j:view_man - display a Unix manual page

Other Procedures

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:tkman -display a manual page with Tom Phelps' TkMan

j:view_man:man -display a manual page with man(1) running in an xterm(1X11)

j:view_url

Usage

j:view_url url

Argument

url is the URL of the Web document to display

Examples

j:view_url http://shore.net/~js/

j:view_url ftp://ftp.aud.alcatel.com/pub/tcl/README

Description

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

Usage

j:view_man manpage

Argument

manpage is the name of the manual page to display

Example

j:view_man xauth

Description

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.)

Other Procedures

These procedures implement the interface to particular Web browsers or manual­page 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.

Future Directions

* 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.