Try Vim html export.
-roger
Actually, what I am looking for command that does it inline, real
time, something that can be used in a script or inside a web page. TCL
package would be the best, or Javascript.
I thought of doing it myself but haven't figured out how to do it yet.
I would guess that it needs to work pretty much the way TCL parser
works, which is something I still need to learn.
> Actually, what I am looking for command that does it inline, real
> time, something that can be used in a script or inside a web page. TCL
> package would be the best, or Javascript.
As I understood your initial post, you want to pretty-print TCL Code
and have output in HTML ?
- JavaScript Module: the Google prettifier you mentioned gives
instructions how to extent this for other languages, might be easy for
TCL...
- TCL Module: Jos Decoster has extended the TCL wiki by a TCL code
beautifier with HTML output.
The code must be available somewhere. If you have issues, contact Jos.
Harald
The DocBook toolchain contains syntax highlighting for
Tcl: search for xslthl; as the name suggests it works
as a XSL-transformation coupled with sax.
Xslthl uses a two-pass transformation: first the relevant
codeblocks are instrumented with xslthl identifiers,
like xslthl:string, and second the xslthl identifiers are
replaced by html/css code.
For code samples see my Jeszra website:
http://jeszra/sourceforge,net/jeszra
-roger
This Tcl command
exec vim -c "runtime syntax/html.vim" -c w -c qa file.tcl
creates file.tcl.html
--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
This Tcl command
exec vim -c "runtime syntax/html.vim" -c w -c qa file.tcl
creates file.tcl.html
I have an alias in myh .bashrc
alias beautify_tcl='frink -egINnz -w 150'
Can't remember the last time I used it though. http://wiki.tcl.tk/2611
Its not pretty in the sense of color coding...
but the tdom package will read in a messy html file without newlines,
and spit back out a prettier version.
package require tdom
...
set x [dom parse -html $a]
puts [$x asXML]
FYI, I believe the Tcl'er Wiki uses an extended version of the google-
code-prettify code to prettify tcl code.
Tom K.