zdoc.tcl
Zdoc is a documentation generator for tcl projects.
See usage and limitations in file "zdoc.html"
Copyright
Vincent Wartelle (c) 2001-2003 Oklin.com
This software comes under BSD license: free for any use, without warranty.
See license file license.html
Version: 1.1 2003/03/05
History : 1.0 2001/09/27
1.01 2001/10/31 - not published - contributions of Patrick Fradin
- omit pkgIndex files
- brace all expressions (optimizing)
- add -nocomplain option in glob command in ::init
- outdir defined as [file join [pwd] zdoc], not as [file join . zdoc] in ::init
1.1 2003/03/05
- including 2003/2/28 John McGehee, Voom, Inc. www.voomtown.com
Fixed file names and links to support file paths where:
_filelist directory != working directory != _outdir
The variable $fname includes the path to the file, but the code
was assuming that $fname was just the file name alone.
- change date format and "generated by zdoc" message position
- added _omitlines option
- admit just one little blank before proc and end accolade
| zdoc | |
| Comments | |
| Arguments | |
| Used by | |
| Uses | |
namespace eval zdoc { |
|
| zdoc::analyze | |
| Comments | run the analyze |
| Arguments | |
| Used by | zdoc::run |
| Uses | zdoc::analyze_procs zdoc::analyze_file |
proc zdoc::analyze {} { |
|
| zdoc::analyze_file | |
| Comments | analyze a file to give its head comments, and for each proc, its head comments |
| Arguments | fname |
| Used by | zdoc::analyze |
| Uses | zdoc::analyze_line |
proc zdoc::analyze_file { fname } { |
|
| zdoc::analyze_line | |
| Comments | analyze a program line - return "comment $content" or "code $content" - if line is not comment, determine _procstate: inside or outside proc and update _proclist |
| Arguments | line |
| Used by | zdoc::analyze_file |
| Uses | |
proc zdoc::analyze_line { line } { |
|
| zdoc::analyze_procs | |
| Comments | analyze known procs to describe arguments and build cross-reference |
| Arguments | |
| Used by | zdoc::analyze |
| Uses | |
proc zdoc::analyze_procs {} { |
|
| zdoc::close_filedetailheader | |
| Comments | close the detailed documentation file of a file |
| Arguments | fdout fname |
| Used by | zdoc::create_doc |
| Uses | |
proc zdoc::close_filedetailheader { fdout fname } { |
|
| zdoc::close_fileindexheader | |
| Comments | close the file documentation in the index file |
| Arguments | fdout fname |
| Used by | zdoc::create_doc |
| Uses | |
proc zdoc::close_fileindexheader { fdout fname } { |
|
| zdoc::close_procdetailtext | |
| Comments | close the detailed proc documentation |
| Arguments | fdout procname |
| Used by | zdoc::create_doc |
| Uses | |
proc zdoc::close_procdetailtext { fdout procname } { |
|
| zdoc::code_tohtml | |
| Comments | transform a list of code lines to html code keep white space visible |
| Arguments | lines |
| Used by | zdoc::write_procdetailtext |
| Uses | |
proc zdoc::code_tohtml { lines } { |
|
| zdoc::comments_tohtml | |
| Comments | transform a list of comment lines to html code |
| Arguments | comments |
| Used by | zdoc::write_procindextext zdoc::write_filedetailheader zdoc::write_procdetailtext |
| Uses | |
proc zdoc::comments_tohtml { comments } { |
|
| zdoc::create_doc | |
| Comments | files and procs being analyzed, create the documentation |
| Arguments | |
| Used by | zdoc::run |
| Uses | zdoc::write_procindextext zdoc::write_procdetailtext zdoc::close_filedetailheader zdoc::write_fileindexheader zdoc::write_filedetailheader zdoc::close_fileindexheader zdoc::get_proclist zdoc::close_procdetailtext |
proc zdoc::create_doc {} { |
|
| zdoc::get_procfile | |
| Comments | identify the file in which a proc is stored |
| Arguments | procname |
| Used by | zdoc::write_procindextext zdoc::write_procdetailtext |
| Uses | |
proc zdoc::get_procfile { procname } { |
|
| zdoc::get_proclist | |
| Comments | get the procs of a file as a list, sorted within the option given by _procsort ("alpha" or "asintext") |
| Arguments | fname |
| Used by | zdoc::create_doc |
| Uses | |
proc zdoc::get_proclist { fname } { |
|
| zdoc::init | |
| Comments | init to default values |
| Arguments | |
| Used by | |
| Uses | zdoc::set_outdir zdoc::set_source zdoc::set_tabsize zdoc::set_procsort zdoc::set_codeprint zdoc::reset zdoc::set_filelist |
proc zdoc::init {} { |
|
| zdoc::reset | |
| Comments | reset contents for a new run |
| Arguments | |
| Used by | zdoc::init |
| Uses | |
proc zdoc::reset {} { |
|
| zdoc::run | |
| Comments | run the analyze and generate the docs |
| Arguments | |
| Used by | |
| Uses | zdoc::create_doc zdoc::analyze |
proc zdoc::run {} { |
|
| zdoc::set_codeprint | |
| Comments | set code print if yes, source code will be printed in detailed doc |
| Arguments | codeprint |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_codeprint { codeprint } { |
|
| zdoc::set_filelist | |
| Comments | set the file list to analyze |
| Arguments | filelist |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_filelist { filelist } { |
|
| zdoc::set_omitlines | |
| Comments | set omit lines |
| Arguments | omitlines |
| Used by | |
| Uses | |
proc zdoc::set_omitlines { omitlines } { |
|
| zdoc::set_outdir | |
| Comments | set the output directory |
| Arguments | outdir |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_outdir { outdir } { |
|
| zdoc::set_procsort | |
| Comments | set the order of presentation of procs alpha means alphabetic, asintext means as in the original program |
| Arguments | procsort |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_procsort { procsort } { |
|
| zdoc::set_source | |
| Comments | set source if yes, source code will be sourced by zdoc if no, source code must be sourced by user before analysis |
| Arguments | yesno |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_source { yesno } { |
|
| zdoc::set_tabsize | |
| Comments | set tab size in number of spaces |
| Arguments | tabsize |
| Used by | zdoc::init |
| Uses | |
proc zdoc::set_tabsize { tabsize } { |
|
| zdoc::write_filedetailheader | |
| Comments | write the file header of the detailed file |
| Arguments | fdout fname |
| Used by | zdoc::create_doc |
| Uses | zdoc::comments_tohtml |
proc zdoc::write_filedetailheader { fdout fname } { |
|
| zdoc::write_fileindexheader | |
| Comments | write the file header of the index file |
| Arguments | fdout fname |
| Used by | zdoc::create_doc |
| Uses | |
proc zdoc::write_fileindexheader { fdout fname } { |
|
| zdoc::write_procdetailtext | |
| Comments | write the detail proc documentation |
| Arguments | fdout procname |
| Used by | zdoc::create_doc |
| Uses | zdoc::get_procfile zdoc::code_tohtml zdoc::comments_tohtml |
proc zdoc::write_procdetailtext { fdout procname } { |
|
| zdoc::write_procindextext | |
| Comments | write the proc line of the index file |
| Arguments | fdout procname |
| Used by | zdoc::create_doc |
| Uses | zdoc::get_procfile zdoc::comments_tohtml |
proc zdoc::write_procindextext { fdout procname } { |
|