We would like to be able to have a hypertext-linked error and help subsystem,
so that whenever the user does something which leads to any sort of error
condition (such as trying to view a file that does not have adequate
permissions or something), a nicely formatted error message is displayed,
along with the option to view some appropriate help information. The help
info would be in HTML, so that the user could follow links from one point
to another in the document, and research related topics.
We could use a standard HTML client, such as Netscape, as the interface to
our help information, but we thought it might be nice to have Tcl/Tk itself
do this. I have the so-called "HTML parser in 8 lines of TCL" written by
Stephen Uhler (stephe...@eng.sun.com), which I plan to (attempt to)
analyze. But, is there any other native capability of Tcl/Tk for HTML
parsing, or does anyone have any suggestions on how we might go about
accomplishing our task?
Any help is much appreciated, and if possible should be sent to me via email
at the address given below.
David Nims
Student, Wright State University
dn...@cs.wright.edu
P.S. For anyone who has not yet seen Uhler's code, here it is:
proc HMparse_html {html {cmd HMtest_parse}} {
regsub -all \{ $html {\&ob;} html
regsub -all \} $html {\&cb;} html
set w " \t\r\n" ;# white space
proc HMcl x {return "\[$x\]"}
set exp <(/?)([HMcl ^$w>]+)[HMcl $w]*([HMcl ^>]*)>
set sub "\}\n$cmd {\\2} {\\1} {\\3} \{"
regsub -all $exp $html $sub html
eval "$cmd hmstart {} {} \{ $html \}"
eval "$cmd hmstart / {} {}"
}
Kudos to Mr. Uhler for dreaming up such a mess. :-)
There is tkWWW. It provides a Tcl interface to the CERN WWW Library.
It is very heavyweight, especially for your application. I'd stick with
Stephen's library.
I am currently helping to develop the library, and also to build network
protocol handlers, etc, to complete the story. It's not quite ready for
release yet, but let me know if you're interested in having a look.
---
Steven Ball, PASTIME Project, ACSys CRC, ANU
E-mail: Steve...@pastime.anu.edu.au Ph. (06) 2495146
Snail-mail: Canberra ACT 0200, AUSTRALIA
He's not the messiah, he's a very naughty boy!
--
Steven Ball, PASTIME Project, ACSys CRC, ANU
E-mail: Steve...@pastime.anu.edu.au Ph. +61 6 2495146
Snail-mail: Canberra ACT 0200, AUSTRALIA
He's not the messiah, he's a very naughty boy!