api_library_documentation (public)
api_library_documentation [ -format format ] path
Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
Generates formatted documentation for a Tcl library file (just the header, describing what the library does).
- Switches:
- -format (optional, defaults to
"text/html"
)- Parameters:
- path (required)
- the path to the file, relative to the OpenACS path root.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_api_browser_trivial_smoke_test
Source code: if { $format ne "text/html" } { return -code error "Only text/html documentation is currently supported" } set out "<h3>[ns_quotehtml [file tail $path]]</h3>" if { [nsv_exists api_library_doc $path] } { array set doc_elements [nsv_get api_library_doc $path] append out "<blockquote><p>\n" append out [lindex $doc_elements(main) 0] append out "<dl>\n" append out "<dt>Location:</dt>\n<dd>[ns_quotehtml $path]\n" if { [info exists doc_elements(creation-date)] } { append out "<dt>Created:</dt>\n<dd>[lindex $doc_elements(creation-date) 0]\n" } if { [info exists doc_elements(author)] } { append out "<dt>Author[expr {[llength $doc_elements(author)] > 1 ? "s" : ""}]:</dt>\n" foreach author $doc_elements(author) { append out "<dd>[::apidoc::format_author $author]\n" } } if { [info exists doc_elements(cvs-id)] } { append out [subst { <dt>CVS Identification:</dt> <dd><code>[ns_quotehtml [lindex $doc_elements(cvs-id) 0]]</code> }] } append out "</dl>\n" append out "</blockquote>\n" } return $outXQL Not present: Generic, PostgreSQL, Oracle