acs-api-documentation-procs.tcl

Routines for generating API documentation.

Location:
packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
Created:
21 Jun 2000
Authors:
Jon Salz <jsalz@mit.edu>
Lars Pind <lars@arsdigita.com>
CVS Identification:
$Id: acs-api-documentation-procs.tcl,v 1.72.2.44 2022/10/27 10:58:22 gustafn Exp $

Procedures in this file

Detailed information

api_add_calling_info_to_procdoc (private)

 api_add_calling_info_to_procdoc [ proc_name ]

Add the calling information (what are the functions called by this proc_name) to the collected proc_doc information.

Parameters:
proc_name (defaults to "*")
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 api_add_to_proc_doc api_add_to_proc_doc (public) api_called_proc_names api_called_proc_names (private) apm_enabled_packages apm_enabled_packages (public) apm_get_package_files apm_get_package_files (public) template::util::read_file template::util::read_file (public) api_add_calling_info_to_procdoc api_add_calling_info_to_procdoc api_add_calling_info_to_procdoc->api_add_to_proc_doc api_add_calling_info_to_procdoc->api_called_proc_names api_add_calling_info_to_procdoc->apm_enabled_packages api_add_calling_info_to_procdoc->apm_get_package_files api_add_calling_info_to_procdoc->template::util::read_file

Testcases:
No testcase defined.

api_add_to_proc_doc (public)

 api_add_to_proc_doc -proc_name proc_name -property property \
    -value value

Add a certain value to a property in the proc doc of the specified proc.

Switches:
-proc_name
(required)
name is fully qualified name without leading colons proc procs, XOTcl methods are a triple with the fully qualified class name, then proc|instproc and then the method name.
-property
(required)
name of property such as "main" "testcase" "calledby" "deprecated_p" "script" "protection"
-value
(required)
value of the property
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_add_to_proc_doc acs_api_browser_api_add_to_proc_doc (test acs-api-browser) api_add_to_proc_doc api_add_to_proc_doc test_acs_api_browser_api_add_to_proc_doc->api_add_to_proc_doc aa_register_case aa_register_case (public) aa_register_case->api_add_to_proc_doc api_add_calling_info_to_procdoc api_add_calling_info_to_procdoc (private) api_add_calling_info_to_procdoc->api_add_to_proc_doc

Testcases:
acs_api_browser_api_add_to_proc_doc

api_apropos_functions (public)

 api_apropos_functions string
Parameters:
string
Returns:
the functions in the system that contain string in their name and have been defined using ad_proc.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_apropos_functions acs_api_browser_api_apropos_functions (test acs-api-browser) api_apropos_functions api_apropos_functions test_acs_api_browser_api_apropos_functions->api_apropos_functions

Testcases:
acs_api_browser_api_apropos_functions

api_call_graph_snippet (private)

 api_call_graph_snippet -proc_name proc_name [ -dpi dpi ] \
    [ -format format ] [ -maxnodes maxnodes ] \
    [ -textpointsize textpointsize ]

Return a source code for dot showing a local call graph snippet, showing direct callers and directly called functions

Switches:
-proc_name
(required)
-dpi
(defaults to "72") (optional)
-format
(defaults to "svg") (optional)
-maxnodes
(defaults to "5") (optional)
-textpointsize
(defaults to "12.0") (optional)
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 api_proc_documentation api_proc_documentation (public) api_call_graph_snippet api_call_graph_snippet api_proc_documentation->api_call_graph_snippet api_called_proc_names api_called_proc_names (private) api_call_graph_snippet->api_called_proc_names api_proc_doc_url api_proc_doc_url (private) api_call_graph_snippet->api_proc_doc_url api_proc_pretty_name api_proc_pretty_name (public) api_call_graph_snippet->api_proc_pretty_name api_test_case_url api_test_case_url (private) api_call_graph_snippet->api_test_case_url export_vars export_vars (public) api_call_graph_snippet->export_vars

Testcases:
No testcase defined.

api_called_proc_names (private)

 api_called_proc_names [ -body body ] -proc_name proc_name

Return list of procs called by the specified procname handle. Note that this function is based on "::apidoc::tcl_to_html", which is based on some heuristics and is not guaranteed to return always the correct results (it might contain false positives). Use this private function only, when heuristics are fine.

Switches:
-body
(optional)
-proc_name
(required)
name is fully qualified name without leading colons proc procs, XOTcl methods are a triple with the fully qualified class name, then proc|instproc and then the method name.
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 test_callgraph__bad_library_calls callgraph__bad_library_calls (test acs-api-browser) api_called_proc_names api_called_proc_names test_callgraph__bad_library_calls->api_called_proc_names test_callgraph__bad_page_calls callgraph__bad_page_calls (test acs-api-browser) test_callgraph__bad_page_calls->api_called_proc_names apidoc::tcl_to_html apidoc::tcl_to_html (public) api_called_proc_names->apidoc::tcl_to_html apidoc::tclcode_to_html apidoc::tclcode_to_html (public) api_called_proc_names->apidoc::tclcode_to_html dom dom api_called_proc_names->dom api_add_calling_info_to_procdoc api_add_calling_info_to_procdoc (private) api_add_calling_info_to_procdoc->api_called_proc_names api_call_graph_snippet api_call_graph_snippet (private) api_call_graph_snippet->api_called_proc_names

Testcases:
callgraph__bad_library_calls, callgraph__bad_page_calls

api_describe_function (public)

 api_describe_function [ -format format ] proc

Describes the functions in the system that contain string and that have been defined using ad_proc. The description includes the documentation string, if any.

Switches:
-format
(defaults to "text/plain") (optional)
Parameters:
proc

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_describe_function acs_api_browser_api_describe_function (test acs-api-browser) api_describe_function api_describe_function test_acs_api_browser_api_describe_function->api_describe_function ad_html_to_text ad_html_to_text (public) api_describe_function->ad_html_to_text api_proc_documentation api_proc_documentation (public) api_describe_function->api_proc_documentation

Testcases:
acs_api_browser_api_describe_function

api_get_body (public)

 api_get_body proc_name

This function returns the body of a Tcl proc or an XOTcl method.

Parameters:
proc_name - the name spec of the proc
Returns:
body of the specified proc

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_get_body acs_api_browser_api_get_body (test acs-api-browser) api_get_body api_get_body test_acs_api_browser_api_get_body->api_get_body nsf::directdispatch nsf::directdispatch api_get_body->nsf::directdispatch nsf::is nsf::is api_get_body->nsf::is api_proc_documentation api_proc_documentation (public) api_proc_documentation->api_get_body apidoc::tcl_to_html apidoc::tcl_to_html (public) apidoc::tcl_to_html->api_get_body packages/acs-api-browser/www/proc-search.tcl packages/acs-api-browser/ www/proc-search.tcl packages/acs-api-browser/www/proc-search.tcl->api_get_body

Testcases:
acs_api_browser_api_get_body

api_library_documentation (public)

 api_library_documentation [ -format format ] path

Generates formatted documentation for a Tcl library file (just the header, describing what the library does).

Switches:
-format
(defaults to "text/html") (optional)
Parameters:
path - the path to the file, relative to the OpenACS path root.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_trivial_smoke_test acs_api_browser_trivial_smoke_test (test acs-api-browser) api_library_documentation api_library_documentation test_acs_api_browser_trivial_smoke_test->api_library_documentation apidoc::format_author apidoc::format_author (public) api_library_documentation->apidoc::format_author packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->api_library_documentation

Testcases:
acs_api_browser_trivial_smoke_test

api_proc_doc_url (private)

 api_proc_doc_url [ -proc_name proc_name ] [ -source_p source_p ] \
    [ -version_id version_id ]

Return the procdoc url from procname and optionally from source_p and version_id

Switches:
-proc_name
(optional)
-source_p
(optional)
-version_id
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 api_call_graph_snippet api_call_graph_snippet (private) api_proc_doc_url api_proc_doc_url api_call_graph_snippet->api_proc_doc_url export_vars export_vars (public) api_proc_doc_url->export_vars

Testcases:
No testcase defined.

api_proc_documentation (public)

 api_proc_documentation [ -format format ] [ -script ] [ -source ] \
    [ -xql ] [ -label label ] [ -first_line_tag first_line_tag ] \
    [ -proc_type proc_type ] proc_name

Generates formatted documentation for a procedure.

Switches:
-format
(optional)
the type of documentation to generate. This parameter is deprecated and has no effect.
-script
(boolean) (optional)
include information about what script this proc lives in?
-source
(boolean) (optional)
include the source code for the script?
-xql
(boolean) (optional)
include the source code for the related xql files?
-label
(optional)
the label printed for the proc in the header line
-first_line_tag
(defaults to "<h3>") (optional)
tag for the markup of the first line
-proc_type
(optional)
Parameters:
proc_name - the name of the procedure for which to generate documentation.
Returns:
the formatted documentation string.
Error:
if the procedure is not defined.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_proc_documentation acs_api_browser_api_proc_documentation (test acs-api-browser) api_proc_documentation api_proc_documentation test_acs_api_browser_api_proc_documentation->api_proc_documentation ad_log ad_log (public) api_proc_documentation->ad_log api_call_graph_snippet api_call_graph_snippet (private) api_proc_documentation->api_call_graph_snippet api_get_body api_get_body (public) api_proc_documentation->api_get_body api_proc_format_switch api_proc_format_switch (private) api_proc_documentation->api_proc_format_switch api_proc_pretty_name api_proc_pretty_name (public) api_proc_documentation->api_proc_pretty_name api_describe_function api_describe_function (public) api_describe_function->api_proc_documentation packages/acs-api-browser/www/proc-view.tcl packages/acs-api-browser/ www/proc-view.tcl packages/acs-api-browser/www/proc-view.tcl->api_proc_documentation packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->api_proc_documentation packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->api_proc_documentation system.methodHelp system.methodHelp (public) system.methodHelp->api_proc_documentation

Testcases:
acs_api_browser_api_proc_documentation

api_proc_format_switch (private)

 api_proc_format_switch xotclArgs flags switch
Parameters:
xotclArgs
flags
switch

Partial Call Graph (max 5 caller/called nodes):
%3 api_proc_documentation api_proc_documentation (public) api_proc_format_switch api_proc_format_switch api_proc_documentation->api_proc_format_switch

Testcases:
No testcase defined.

api_proc_link (public)

 api_proc_link [ -source ] proc
Switches:
-source
(boolean) (defaults to "1") (optional)
Parameters:
proc
Returns:
full HTML link to the documentation for the proc.
Author:
Lars Pind <lars@pinds.com>
Created:
14 July 2000
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_documentation__check_deprecated_see documentation__check_deprecated_see (test acs-tcl) api_proc_link api_proc_link test_documentation__check_deprecated_see->api_proc_link api_proc_url api_proc_url (public) api_proc_link->api_proc_url

Testcases:
documentation__check_deprecated_see

api_proc_pretty_name (public)

 api_proc_pretty_name [ -link ] [ -include_debug_controls ] \
    [ -hints_only ] [ -proc_type proc_type ] [ -label label ] proc
Switches:
-link
(boolean) (optional)
provide a link to the documentation pages
-include_debug_controls
(boolean) (optional)
-hints_only
(boolean) (optional)
-proc_type
(optional)
-label
(optional)
the label printed for the proc in the header line
Parameters:
proc
Returns:
a pretty version of a proc name

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_proc_pretty_name acs_api_browser_api_proc_pretty_name (test acs-api-browser) api_proc_pretty_name api_proc_pretty_name test_acs_api_browser_api_proc_pretty_name->api_proc_pretty_name api_proc_url api_proc_url (public) api_proc_pretty_name->api_proc_url api_call_graph_snippet api_call_graph_snippet (private) api_call_graph_snippet->api_proc_pretty_name api_proc_documentation api_proc_documentation (public) api_proc_documentation->api_proc_pretty_name packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->api_proc_pretty_name packages/acs-automated-testing/www/admin/proc-coverage.tcl packages/acs-automated-testing/ www/admin/proc-coverage.tcl packages/acs-automated-testing/www/admin/proc-coverage.tcl->api_proc_pretty_name

Testcases:
acs_api_browser_api_proc_pretty_name

api_proc_url (public)

 api_proc_url [ -source ] proc
Switches:
-source
(boolean) (defaults to "1") (optional)
Parameters:
proc
Returns:
the URL of the page that documents the given proc.
Author:
Lars Pind <lars@pinds.com>
Created:
14 July 2000

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_proc_pretty_name acs_api_browser_api_proc_pretty_name (test acs-api-browser) api_proc_url api_proc_url test_acs_api_browser_api_proc_pretty_name->api_proc_url api_proc_link api_proc_link (public) api_proc_link->api_proc_url api_proc_pretty_name api_proc_pretty_name (public) api_proc_pretty_name->api_proc_url apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::tclcode_to_html->api_proc_url packages/acs-api-browser/www/proc-browse.tcl packages/acs-api-browser/ www/proc-browse.tcl packages/acs-api-browser/www/proc-browse.tcl->api_proc_url packages/acs-api-browser/www/proc-search.tcl packages/acs-api-browser/ www/proc-search.tcl packages/acs-api-browser/www/proc-search.tcl->api_proc_url

Testcases:
acs_api_browser_api_proc_pretty_name

api_read_script_documentation (public)

 api_read_script_documentation path

Reads the contract from a Tcl content page.

Parameters:
path - the path of the Tcl file to examine, relative to the OpenACS root directory.
Returns:
a list representation of the documentation element array, or an empty list if the file does not contain a doc_page_contract block.
Error:
if the file does not exist.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_read_script_documentation acs_api_browser_api_read_script_documentation (test acs-api-browser) api_read_script_documentation api_read_script_documentation test_acs_api_browser_api_read_script_documentation->api_read_script_documentation ad_try ad_try (public) api_read_script_documentation->ad_try doc_set_page_documentation_mode doc_set_page_documentation_mode (public) api_read_script_documentation->doc_set_page_documentation_mode api_script_documentation api_script_documentation (public) api_script_documentation->api_read_script_documentation packages/acs-api-browser/www/package-view.tcl packages/acs-api-browser/ www/package-view.tcl packages/acs-api-browser/www/package-view.tcl->api_read_script_documentation

Testcases:
acs_api_browser_api_read_script_documentation

api_script_documentation (public)

 api_script_documentation [ -format format ] path

Generates formatted documentation for a content page. Sources the file to obtain the comment or contract at the beginning.

Switches:
-format
(defaults to "text/html") (optional)
the type of documentation to generate. Currently, only text/html is supported.
Parameters:
path - the path of the Tcl file to examine, relative to the OpenACS root directory.
Returns:
the formatted documentation string.
Error:
if the file does not exist.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_api_script_documentation acs_api_browser_api_script_documentation (test acs-api-browser) api_script_documentation api_script_documentation test_acs_api_browser_api_script_documentation->api_script_documentation ad_try ad_try (public) api_script_documentation->ad_try api_read_script_documentation api_read_script_documentation (public) api_script_documentation->api_read_script_documentation apidoc::format_common_elements apidoc::format_common_elements (private) api_script_documentation->apidoc::format_common_elements packages/acs-api-browser/www/content-page-view.tcl packages/acs-api-browser/ www/content-page-view.tcl packages/acs-api-browser/www/content-page-view.tcl->api_script_documentation

Testcases:
acs_api_browser_api_script_documentation

api_test_case_url (private)

 api_test_case_url testcase_pair

Return the testcase url from testcase_pair, consisting of testcase_id and package_key.

Parameters:
testcase_pair

Partial Call Graph (max 5 caller/called nodes):
%3 api_call_graph_snippet api_call_graph_snippet (private) api_test_case_url api_test_case_url api_call_graph_snippet->api_test_case_url api_proc_documentation api_proc_documentation (public) api_proc_documentation->api_test_case_url export_vars export_vars (public) api_test_case_url->export_vars

Testcases:
No testcase defined.

api_type_documentation (public, deprecated)

 api_type_documentation type
Deprecated. Invoking this procedure generates a warning.

Deprecated: this was part of a feature which used to react to the 'type' property set in ad_page_contract's documentation and generate an extra link in /api-doc/package-view, but currently no upstream script seems to specify this value and no code seems to create necessary 'doc_type_doc' nsv

Parameters:
type
Returns:
HTML fragment of the API docs.
See Also:
  • /packages/acs-api-browser/www/type-view.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) apidoc::format_common_elements apidoc::format_common_elements (private) api_type_documentation api_type_documentation api_type_documentation->ad_log_deprecated api_type_documentation->apidoc::format_common_elements

Testcases:
No testcase defined.

apidoc::ad_keywords_score (private)

 apidoc::ad_keywords_score keywords string_to_search
Parameters:
keywords
string_to_search
Returns:
Number of keywords found in string to search. No additional score for repeats.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/proc-search.tcl packages/acs-api-browser/ www/proc-search.tcl apidoc::ad_keywords_score apidoc::ad_keywords_score packages/acs-api-browser/www/proc-search.tcl->apidoc::ad_keywords_score

Testcases:
No testcase defined.

apidoc::ad_sort_by_first_string_proc (private)

 apidoc::ad_sort_by_first_string_proc l1 l2

basically a -1,0,1 result comparing the second element of the list inputs then the first. (both strings)

Parameters:
l1
l2

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

apidoc::ad_sort_by_score_proc (private)

 apidoc::ad_sort_by_score_proc l1 l2

basically a -1,0,1 result comparing the second element of the list inputs then the first. (second is int)

Parameters:
l1
l2

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

apidoc::ad_sort_by_second_string_proc (private)

 apidoc::ad_sort_by_second_string_proc l1 l2

basically a -1,0,1 result comparing the second element of the list inputs then the first (both strings)

Parameters:
l1
l2

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

apidoc::first_sentence (private)

 apidoc::first_sentence string
Parameters:
string
Returns:
the first sentence of a string.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/package-view.tcl packages/acs-api-browser/ www/package-view.tcl apidoc::first_sentence apidoc::first_sentence packages/acs-api-browser/www/package-view.tcl->apidoc::first_sentence

Testcases:
No testcase defined.

apidoc::format_author (public)

 apidoc::format_author author_string

Extracts information about the author and formats it into an HTML string.

Parameters:
author_string - author information to format. 3 kind of formats are expected: email (a mailto link to the email is generated), whitespace-separated couple " ()" (a mailto link for email and the name are generated) and free-form (the same input string is returned).
Returns:
the formatted result

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_format_author acs_api_browser_apidoc_format_author (test acs-api-browser) apidoc::format_author apidoc::format_author test_acs_api_browser_apidoc_format_author->apidoc::format_author api_library_documentation api_library_documentation (public) api_library_documentation->apidoc::format_author apidoc::format_author_list apidoc::format_author_list (private) apidoc::format_author_list->apidoc::format_author packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::format_author

Testcases:
acs_api_browser_apidoc_format_author

apidoc::format_author_list (private)

 apidoc::format_author_list authors

Generates an HTML-formatted list of authors (including <dt> and <dd> tags).

Parameters:
authors - the list of author strings.
Returns:
the formatted list, or an empty string if there are no authors.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::format_common_elements apidoc::format_common_elements (private) apidoc::format_author_list apidoc::format_author_list apidoc::format_common_elements->apidoc::format_author_list apidoc::format_author apidoc::format_author (public) apidoc::format_author_list->apidoc::format_author

Testcases:
No testcase defined.

apidoc::format_changelog_change (private)

 apidoc::format_changelog_change change

Formats the change log line: turns email addresses in parenthesis into links.

Parameters:
change

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::format_changelog_list apidoc::format_changelog_list (private) apidoc::format_changelog_change apidoc::format_changelog_change apidoc::format_changelog_list->apidoc::format_changelog_change

Testcases:
No testcase defined.

apidoc::format_changelog_list (private)

 apidoc::format_changelog_list changelog

Format the change log info

Parameters:
changelog

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::format_common_elements apidoc::format_common_elements (private) apidoc::format_changelog_list apidoc::format_changelog_list apidoc::format_common_elements->apidoc::format_changelog_list apidoc::format_changelog_change apidoc::format_changelog_change (private) apidoc::format_changelog_list->apidoc::format_changelog_change

Testcases:
No testcase defined.

apidoc::format_common_elements (private)

 apidoc::format_common_elements doc_elements_var
Parameters:
doc_elements_var

Partial Call Graph (max 5 caller/called nodes):
%3 api_proc_documentation api_proc_documentation (public) apidoc::format_common_elements apidoc::format_common_elements api_proc_documentation->apidoc::format_common_elements api_script_documentation api_script_documentation (public) api_script_documentation->apidoc::format_common_elements api_type_documentation api_type_documentation (public, deprecated) api_type_documentation->apidoc::format_common_elements apidoc::format_author_list apidoc::format_author_list (private) apidoc::format_common_elements->apidoc::format_author_list apidoc::format_changelog_list apidoc::format_changelog_list (private) apidoc::format_common_elements->apidoc::format_changelog_list apidoc::format_see_list apidoc::format_see_list (private) apidoc::format_common_elements->apidoc::format_see_list

Testcases:
No testcase defined.

apidoc::format_see (public)

 apidoc::format_see see

Takes the value in the argument "see" and possibly formats it into a link that will give the user more info about that resource

Parameters:
see - a string expected to contain the resource to format
Returns:
the html string representing the resource

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_format_see acs_api_browser_apidoc_format_see (test acs-api-browser) apidoc::format_see apidoc::format_see test_acs_api_browser_apidoc_format_see->apidoc::format_see export_vars export_vars (public) apidoc::format_see->export_vars util_url_valid_p util_url_valid_p (public) apidoc::format_see->util_url_valid_p apidoc::format_see_list apidoc::format_see_list (private) apidoc::format_see_list->apidoc::format_see packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::format_see

Testcases:
acs_api_browser_apidoc_format_see

apidoc::format_see_list (private)

 apidoc::format_see_list sees

Generate an HTML list of referenced procs and pages.

Parameters:
sees

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::format_common_elements apidoc::format_common_elements (private) apidoc::format_see_list apidoc::format_see_list apidoc::format_common_elements->apidoc::format_see_list apidoc::format_see apidoc::format_see (public) apidoc::format_see_list->apidoc::format_see

Testcases:
No testcase defined.

apidoc::get_doc_property (private)

 apidoc::get_doc_property proc_name property [ default ]

Return a certain doc property valie, if property exists

Parameters:
proc_name
property
default (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_callgraph__bad_library_calls callgraph__bad_library_calls (test acs-api-browser) apidoc::get_doc_property apidoc::get_doc_property test_callgraph__bad_library_calls->apidoc::get_doc_property test_callgraph__bad_page_calls callgraph__bad_page_calls (test acs-api-browser) test_callgraph__bad_page_calls->apidoc::get_doc_property

Testcases:
callgraph__bad_library_calls, callgraph__bad_page_calls

apidoc::get_doc_url (private)

 apidoc::get_doc_url [ -cmd cmd ] [ -index index ] [ -root root ] \
    [ -host host ]
Switches:
-cmd
(optional)
-index
(optional)
-root
(optional)
-host
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/proc-view.tcl packages/acs-api-browser/ www/proc-view.tcl apidoc::get_doc_url apidoc::get_doc_url packages/acs-api-browser/www/proc-view.tcl->apidoc::get_doc_url packages/acs-api-browser/www/tcl-doc-search.tcl packages/acs-api-browser/ www/tcl-doc-search.tcl packages/acs-api-browser/www/tcl-doc-search.tcl->apidoc::get_doc_url packages/acs-api-browser/www/tcl-proc-view.tcl packages/acs-api-browser/ www/tcl-proc-view.tcl packages/acs-api-browser/www/tcl-proc-view.tcl->apidoc::get_doc_url apidoc::search_on_webindex apidoc::search_on_webindex (private) apidoc::get_doc_url->apidoc::search_on_webindex util::http::get util::http::get (public) apidoc::get_doc_url->util::http::get util_memoize util_memoize (public) apidoc::get_doc_url->util_memoize

Testcases:
No testcase defined.

apidoc::get_xql_snippet (private)

 apidoc::get_xql_snippet [ -proc_name proc_name ] \
    [ -xql_file xql_file ]
Switches:
-proc_name
(optional)
-xql_file
(optional)
Returns:
matching xql snippet for specified proc_name

Partial Call Graph (max 5 caller/called nodes):
%3 api_proc_documentation api_proc_documentation (public) apidoc::get_xql_snippet apidoc::get_xql_snippet api_proc_documentation->apidoc::get_xql_snippet db_qd_prepare_queryfile_content db_qd_prepare_queryfile_content (public) apidoc::get_xql_snippet->db_qd_prepare_queryfile_content dom dom apidoc::get_xql_snippet->dom template::util::read_file template::util::read_file (public) apidoc::get_xql_snippet->template::util::read_file

Testcases:
No testcase defined.

apidoc::is_object (private)

 apidoc::is_object scope proc_name

Checks, whether the specified argument is an XOTcl object. Does not cause problems when xotcl is not loaded.

Parameters:
scope
proc_name
Returns:
boolean value

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::is_object apidoc::is_object apidoc::tclcode_to_html->apidoc::is_object

Testcases:
No testcase defined.

apidoc::length_braces (private)

 apidoc::length_braces data
Parameters:
data
Returns:
length of subexpression, from open to close brace inclusive. Doesn't deal with unescaped braces in substrings.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::length_exp apidoc::length_exp (private) apidoc::length_braces apidoc::length_braces apidoc::length_exp->apidoc::length_braces

Testcases:
No testcase defined.

apidoc::length_exp (private)

 apidoc::length_exp data
Parameters:
data
Returns:
length of a generic subexpression.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::length_regexp apidoc::length_regexp (private) apidoc::length_exp apidoc::length_exp apidoc::length_regexp->apidoc::length_exp apidoc::length_braces apidoc::length_braces (private) apidoc::length_exp->apidoc::length_braces apidoc::length_spaces apidoc::length_spaces (private) apidoc::length_exp->apidoc::length_spaces apidoc::length_string apidoc::length_string (private) apidoc::length_exp->apidoc::length_string

Testcases:
No testcase defined.

apidoc::length_proc (private)

 apidoc::length_proc data
Parameters:
data
Returns:
Length of a command name.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::length_proc apidoc::length_proc apidoc::tclcode_to_html->apidoc::length_proc

Testcases:
No testcase defined.

apidoc::length_regexp (private)

 apidoc::length_regexp data

Calculate how much text we should ignore.

Parameters:
data
Returns:
length in characters.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::length_regexp apidoc::length_regexp apidoc::tclcode_to_html->apidoc::length_regexp apidoc::length_exp apidoc::length_exp (private) apidoc::length_regexp->apidoc::length_exp

Testcases:
No testcase defined.

apidoc::length_spaces (private)

 apidoc::length_spaces data
Parameters:
data
Returns:
Number of spaces until next subexpression.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::length_exp apidoc::length_exp (private) apidoc::length_spaces apidoc::length_spaces apidoc::length_exp->apidoc::length_spaces

Testcases:
No testcase defined.

apidoc::length_string (private)

 apidoc::length_string data
Parameters:
data

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::length_exp apidoc::length_exp (private) apidoc::length_string apidoc::length_string apidoc::length_exp->apidoc::length_string

Testcases:
No testcase defined.

apidoc::length_var (private)

 apidoc::length_var data
Parameters:
data
Returns:
Length of a variable name.

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::length_var apidoc::length_var apidoc::tclcode_to_html->apidoc::length_var

Testcases:
No testcase defined.

apidoc::pretty_token (private)

 apidoc::pretty_token kind token

Encode the specified token in HTML

Parameters:
kind
token

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::pretty_token apidoc::pretty_token apidoc::tclcode_to_html->apidoc::pretty_token

Testcases:
No testcase defined.

apidoc::sanitize_path (private)

 apidoc::sanitize_path [ -prefix prefix ] path

Return a sanitized path. Cleans path from directory traversal attacks and checks, if someone tries to access content outside of the specified prefix.

Switches:
-prefix
(defaults to "packages") (optional)
Parameters:
path
Returns:
sanitized path

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/content-page-view.tcl packages/acs-api-browser/ www/content-page-view.tcl apidoc::sanitize_path apidoc::sanitize_path packages/acs-api-browser/www/content-page-view.tcl->apidoc::sanitize_path packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->apidoc::sanitize_path ad_conn ad_conn (public) apidoc::sanitize_path->ad_conn

Testcases:
No testcase defined.

apidoc::search_on_webindex (private)

 apidoc::search_on_webindex [ -page page ] [ -host host ] \
    [ -root root ] [ -proc proc ]

Search for a matching link in the page and return the absolute link if found. Avoid in-page links (starting with "#")

Switches:
-page
(optional)
HTML page
-host
(optional)
for completing URLs starting with no "/"
-root
(optional)
for completing URLs starting with a "/"
-proc
(optional)
name of proc as used in link label

Partial Call Graph (max 5 caller/called nodes):
%3 apidoc::get_doc_url apidoc::get_doc_url (private) apidoc::search_on_webindex apidoc::search_on_webindex apidoc::get_doc_url->apidoc::search_on_webindex

Testcases:
No testcase defined.

apidoc::set_public (private)

 apidoc::set_public version_id [ public_p ]

Gets or sets the user's public/private preferences for a given package.

Parameters:
version_id - the version of the package
public_p (optional) - if empty, return the user's preferred setting or the default (1) if no preference found. If not empty, set the user's preference to public_p
Returns:
public_p

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/package-view.tcl packages/acs-api-browser/ www/package-view.tcl apidoc::set_public apidoc::set_public packages/acs-api-browser/www/package-view.tcl->apidoc::set_public packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->apidoc::set_public ad_get_client_property ad_get_client_property (public) apidoc::set_public->ad_get_client_property ad_set_client_property ad_set_client_property (public) apidoc::set_public->ad_set_client_property

Testcases:
No testcase defined.

apidoc::tcl_to_html (public)

 apidoc::tcl_to_html proc_name

Given a proc name, formats it as HTML, including highlighting syntax in various colors and creating hyperlinks to other proc definitions. The inspiration for this proc was the tcl2html script created by Jeff Hobbs.

Known Issues:

  1. This proc will mistakenly highlight switch strings that look like commands as commands, etc.
  2. There are many undocumented AOLserver commands including all of the commands added by modules.
  3. When a proc inside a string has explicitly quoted arguments, they are not formatted.
  4. regexp and regsub are hard to parse properly. E.g. If we use the start option, and we quote its argument, and we have an ugly regexp, then this code might highlight it incorrectly.

Parameters:
proc_name - procedure to format in HTML
Author:
Jamie Rasmussen <jrasmuss@mle.ie>

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_tclcode_to_html acs_api_browser_apidoc_tclcode_to_html (test acs-api-browser) apidoc::tcl_to_html apidoc::tcl_to_html test_acs_api_browser_apidoc_tclcode_to_html->apidoc::tcl_to_html api_get_body api_get_body (public) apidoc::tcl_to_html->api_get_body apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::tcl_to_html->apidoc::tclcode_to_html api_called_proc_names api_called_proc_names (private) api_called_proc_names->apidoc::tcl_to_html api_proc_documentation api_proc_documentation (public) api_proc_documentation->apidoc::tcl_to_html packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::tcl_to_html

Testcases:
acs_api_browser_apidoc_tclcode_to_html

apidoc::tclcode_to_html (public)

 apidoc::tclcode_to_html [ -scope scope ] \
    [ -proc_namespace proc_namespace ] script

Given a script, this proc formats it as HTML, including highlighting syntax in various colors and creating hyperlinks to other proc definitions. The inspiration for this proc was the tcl2html script created by Jeff Hobbs.

Switches:
-scope
(optional)
-proc_namespace
(optional)
Parameters:
script - script to be formatted in HTML

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_tclcode_to_html acs_api_browser_apidoc_tclcode_to_html (test acs-api-browser) apidoc::tclcode_to_html apidoc::tclcode_to_html test_acs_api_browser_apidoc_tclcode_to_html->apidoc::tclcode_to_html api_proc_url api_proc_url (public) apidoc::tclcode_to_html->api_proc_url apidoc::is_object apidoc::is_object (private) apidoc::tclcode_to_html->apidoc::is_object apidoc::length_proc apidoc::length_proc (private) apidoc::tclcode_to_html->apidoc::length_proc apidoc::length_regexp apidoc::length_regexp (private) apidoc::tclcode_to_html->apidoc::length_regexp apidoc::length_var apidoc::length_var (private) apidoc::tclcode_to_html->apidoc::length_var api_called_proc_names api_called_proc_names (private) api_called_proc_names->apidoc::tclcode_to_html apidoc::tcl_to_html apidoc::tcl_to_html (public) apidoc::tcl_to_html->apidoc::tclcode_to_html packages/acs-api-browser/www/content-page-view.tcl packages/acs-api-browser/ www/content-page-view.tcl packages/acs-api-browser/www/content-page-view.tcl->apidoc::tclcode_to_html packages/acs-api-browser/www/procs-file-view.tcl packages/acs-api-browser/ www/procs-file-view.tcl packages/acs-api-browser/www/procs-file-view.tcl->apidoc::tclcode_to_html packages/acs-automated-testing/www/admin/testcase.tcl packages/acs-automated-testing/ www/admin/testcase.tcl packages/acs-automated-testing/www/admin/testcase.tcl->apidoc::tclcode_to_html

Testcases:
acs_api_browser_apidoc_tclcode_to_html

apidoc::xql_links_list (private)

 apidoc::xql_links_list [ -include_compiled include_compiled ] path
Switches:
-include_compiled
(defaults to "0") (optional)
Parameters:
path - path and filename from $::acs::rootdir
Returns:
list of xql files related to Tcl script file

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/content-page-view.tcl packages/acs-api-browser/ www/content-page-view.tcl apidoc::xql_links_list apidoc::xql_links_list packages/acs-api-browser/www/content-page-view.tcl->apidoc::xql_links_list export_vars export_vars (public) apidoc::xql_links_list->export_vars template::themed_template template::themed_template (public) apidoc::xql_links_list->template::themed_template

Testcases:
No testcase defined.
[ show source ]