]> git.sven.stormbind.net Git - sven/mysqltcl.git/blob - doc/man.tcl
Imported Upstream version 3.05
[sven/mysqltcl.git] / doc / man.tcl
1 # script for produce html and ngroff from tcl man page
2 # see doctools from tcllib
3
4 package require doctools
5
6 ::doctools::new dl -file mysqltcl.man -format html
7 set file [open mysqltcl.html w]
8 set filein [open mysqltcl.man]
9 puts $file [dl format [read $filein]]
10 close $filein
11 close $file
12
13 set file [open man.macros r]
14 set manmacros [string trim [read $file]]
15 close $file
16
17 ::doctools::new dl2 -file mysqltcl.man -format nroff
18 set file [open mysqltcl.n w]
19 set filein [open mysqltcl.man]
20 set data [dl2 format [read $filein]]
21 set data [string map [list {.so man.macros} $manmacros] $data]
22 puts $file $data
23 close $filein
24 close $file
25
26