htmlview.tcl : A simple htmlviewer

htmlview.tcl: A simple HTML viewer


The htmlview.tcl program will open a window on your display, and render html text from a file or stdin.

It's a small, simple html viewer that can be used with elm, pine, etc for reading text/html messages.

The Version 1 htmlview.tcl program will display the text in a message, but does not load images from the web, or support any hypertext links. It's strictly a viewer.

The Version 2 htmlview.tcl will download images when the image tag is clicked, and will load hypertext references when clicked.

These packages are described in the Tclsh Spot articles printed in the August and October, 1999 issues of ;login:.

This package is based on the htmllib.tcl package written by Steve Uhler. Steve's library has been extended to load local images, render tables, and to use the Tcl 8.0 font descriptions.

To use this package:

  1. Download the code using one of the links below.
  2. Edit the third line to reflect the path to your wish interpreter.
  3. Decide where to install htmlview.tcl, and install it there.
    (/usr/local/bin is a nice place.)
  4. Don't forget to chmod 755 htmlview.tcl!
  5. add this line
    text/html; /usr/local/bin/htmlview.tcl %s
    to your $HOME/.mailcap file.
  6. That should do it.

Version 1 of the htmlview.tcl program has these features:

Those last two features are my design decision. When I read mail I don't want to wait for some online-ad to load, and I certainly don't want surprise pictures showing up on my screen at work.

Version 2 of the htmlview.tcl program has these features:

I liked the ideas of the version 1.0 code until I used it for a while, and decided that sometimes I did want to follow links and view images.

If you are serious about your mail reading, you might want to look into exmh, the Tk front end that Brent Welch built for the mh mail reading package. You can find it at:

Release History:

Revision Date Comments
2.0 1/9/2000 Release 2.1
Modifications to the table code to do a better job of setting column width and determining the required height for a text window.
Updated htmlllib.tcl to Rev 0.3.4
2.0 9/29/99 Second Release.
Updated table code to handle lists and embedded images.
Added support for links
Added support for loading remote images
1.0 7/31/99 First Release with some new table code.

Links, etc

Clif Flynt's Home Page Clif Flynt's Tcl Information Tcl/Tk for Real Programmers Flynt Consulting Services
Send mail to Clif