Package epydoc :: Package docwriter :: Module html :: Class HTMLWriter
[hide private]
[frames] | no frames]

ClassType HTMLWriter

source code

Instance Methods [hide private]
 
__init__(self, docindex, **kwargs)
Construct a new HTML writer, using the given documentation index.
source code
call graph 
string
_find_top_page(self, pagename)
Find the top page for the API documentation.
source code
call graph 
    1. Interface Methods
None
write(self, directory=None)
Write the documentation to the given directory.
source code
call graph 
 
_write(self, write_func, directory, filename, *args) source code
call graph 
None
_mkdir(self, directory)
If the given directory does not exist, then attempt to create it.
source code
call graph 
    2.1. Module Pages
 
write_module(self, out, doc)
Write an HTML page containing the API documentation for the given module to out.
source code
call graph 
    2.??. Source Code Pages
 
write_sourcecode(self, out, doc, name_to_docs) source code
call graph 
    2.2. Class Pages
 
write_class(self, out, doc)
Write an HTML page containing the API documentation for the given class to out.
source code
call graph 
 
write_class_tree_graph(self, out, doc, graphmaker)
Write HTML code for a class tree graph of doc (a classdoc), using graphmaker to draw the actual graph.
source code
call graph 
    2.3. Trees pages
 
write_module_tree(self, out) source code
call graph 
 
write_class_tree(self, out)
Write HTML code for a nested list showing the base/subclass relationships between all documented classes.
source code
call graph 
 
write_treepage_header(self, out, title, url) source code
call graph 
    2.4. Index pages
 
write_link_index(self, out, indices, title, url, index_by_section, sections='ABCDEFGHIJKLMNOPQRSTUVWXYZ_', section_url='#%s') source code
call graph 
 
write_metadata_index(self, out, indices, field, title, typ)
Write an HTML page containing a metadata index.
source code
call graph 
 
write_indexpage_header(self, out, indices, title, url)
A helper for the index page generation functions, which generates a header that can be used to navigate between the different indices.
source code
call graph 
 
write_index_section(self, out, items, add_blankline=False) source code
call graph 
    2.5. Help Page
 
write_help(self, out)
Write an HTML help file to the given stream.
source code
call graph 
    2.6. Frames-based Table of Contents
 
write_frames_index(self, out)
Write the frames index file for the frames-based table of contents to the given streams.
source code
 
write_toc(self, out) source code
 
write_toc_section(self, out, name, docs, fullname=True) source code
call graph 
 
write_project_toc(self, out) source code
call graph 
 
write_module_toc(self, out, doc)
Write an HTML page containing the table of contents page for the given module to the given streams.
source code
call graph 
    2.7. Project homepage (index.html)
 
write_homepage(self, directory)
Write an index.html file in the given directory.
source code
call graph 
 
write_redirect_index(self, out, top, name) source code
    2.8. Stylesheet (epydoc.css)
None
write_css(self, directory, cssname)
Write the CSS stylesheet in the given directory.
source code
call graph 
    2.9. Javascript (epydoc.js)
 
write_javascript(self, directory) source code
call graph 
    2.10. Graphs
 
render_graph(self, graph) source code
call graph 
str
render_callgraph(self, callgraph, token='')
Render the HTML chunk of a callgraph.
source code
str
callgraph_link(self, callgraph, token='')
Render the HTML chunk of a callgraph link.
source code
    2.11. Images
 
write_images(self, directory) source code
call graph 
    3.1. Page Header
 
write_header(self, out, title)
Generate HTML code for the standard page header, and write it to out.
source code
    3.2. Page Footer
 
write_footer(self, out, short=False)
Generate HTML code for the standard page footer, and write it to out.
source code
    3.3. Navigation Bar
 
write_navbar(self, out, context)
Generate HTML code for the navigation bar, and write it to out.
source code
    3.4. Breadcrumbs
 
write_breadcrumbs(self, out, context, context_url)
Generate HTML for the breadcrumbs line, and write it to out.
source code
 
breadcrumbs(self, doc) source code
call graph 
 
_crumb(self, doc) source code
call graph 
    3.5. Summary Tables
 
write_summary_table(self, out, heading, doc, value_type)
Generate HTML code for a summary table, and write it to out.
source code
call graph 
 
write_summary_group(self, out, doc, name, var_docs, grouped_inh_vars) source code
call graph 
 
write_inheritance_list(self, out, doc, listed_inh_vars) source code
call graph 
 
write_var_list(self, out, vardocs) source code
call graph 
 
write_summary_line(self, out, var_doc, container)
Generate HTML code for a single line of a summary table, and write it to out.
source code
call graph 
 
_write_summary_line(self, out, typ, description, tr_class, pysrc_link, callgraph) source code
    3.6. Details Lists
 
write_details_list(self, out, heading, doc, value_type) source code
call graph 
 
write_details_entry(self, out, var_doc) source code
call graph 
 
labelled_list_item(self, lhs, rhs) source code
 
property_accessor_to_html(self, val_doc, context=None) source code
call graph 
 
arg_name_to_html(self, func_doc, arg_name)
A helper function used to format an argument name, for use in the argument description list under a routine's details entry.
source code
call graph 
 
write_function_details_entry(self, out, var_doc, descr, callgraph, rtype, rdescr, arg_descrs, div_class) source code
 
write_property_details_entry(self, out, var_doc, descr, accessors, div_class) source code
 
write_variable_details_entry(self, out, var_doc, descr, div_class) source code
 
variable_tooltip(self, var_doc) source code
call graph 
 
pprint_value(self, val_doc) source code
call graph 
    Base Tree
string
base_tree(self, doc, width=None, postfix='', context=None)
Returns: The HTML code for a class's base tree.
source code
int
find_tree_width(self, doc, context)
Helper function for base_tree.
source code
 
contextual_label(self, doc, context)
Return the label for doc to be shown in context.
source code
    Function Signatures
str
function_signature(self, api_doc, is_summary=False, link_name=False, anchor=False, context=None)
Render a function signature in HTML.
source code
call graph 
str
summary_name(self, api_doc, css_class='summary-name', link_name=False, anchor=False)
Render an object name in HTML.
source code
call graph 
 
func_arg(self, name, default, css_class) source code
call graph 
 
_arg_name(self, arg) source code
call graph 
    Import Lists
 
write_imports(self, out, doc) source code
 
_import(self, var_doc, context) source code
    Module Trees
 
write_module_list(self, out, doc) source code
call graph 
 
write_module_tree_item(self, out, doc, package=None) source code
call graph 
    Class trees
 
write_class_tree_item(self, out, doc, class_set) source code
    Standard Fields
 
write_standard_fields(self, out, doc)
Write HTML code containing descriptions of any standard markup fields that are defined by the given APIDoc object (such as @author and @todo fields).
source code
call graph 
 
write_standard_field(self, out, doc, field, descrs, arg='') source code
    Index generation
 
build_identifier_index(self) source code
call graph 
 
_group_by_letter(self, items)
Preserves sort order of the input.
source code
call graph 
 
build_term_index(self) source code
call graph 
 
_terms_from_docstring(self, base_url, container, parsed_docstring) source code
call graph 
 
build_metadata_index(self, field_name) source code
call graph 
 
_term_index_to_anchor(self, term)
Given the name of an inline index item, construct a URI anchor.
source code
call graph 
    Redirect page
 
write_redirect_page(self, out)
Build the auto-redirect page, which translates dotted names to URLs using javascript.
source code
call graph 
 
_write_redirect_page(self, out, pages) source code
    URLs list
 
write_api_list(self, out)
Write a list of mapping name->url for all the documented objects.
source code
call graph 
 
write_url_record(self, out, obj) source code
call graph 
    Helper functions
 
_val_is_public(self, valdoc)
Make a best-guess as to whether the given class is public.
source code
call graph 
 
write_table_header(self, out, css_class, heading=None, private_link=True, colspan=2) source code
 
write_group_header(self, out, group, tr_class='') source code
 
url(self, obj)
Return the URL for the given object, which can be a VariableDoc, a ValueDoc, or a DottedName.
source code
call graph 
 
_url(self, obj)
Internal helper for url.
source code
call graph 
 
pysrc_link(self, api_doc) source code
call graph 
 
pysrc_url(self, api_doc) source code
call graph 
 
href(self, target, label=None, css_class=None, context=None, tooltip=None)
Return the HTML code for an HREF link to the given target (which can be a VariableDoc, a ValueDoc, or a DottedName.
source code
call graph 
 
_attr_to_html(self, attr, api_doc, indent) source code
call graph 
 
summary(self, api_doc, indent=0) source code
call graph 
 
descr(self, api_doc, indent=0) source code
call graph 
 
type_descr(self, api_doc, indent=0) source code
call graph 
 
return_type(self, api_doc, indent=0) source code
call graph 
 
return_descr(self, api_doc, indent=0) source code
call graph 
 
docstring_to_html(self, parsed_docstring, where=None, indent=0) source code
call graph 
 
description(self, parsed_docstring, where=None, indent=0) source code
call graph 
 
doc_kind(self, doc) source code
call graph 
 
_doc_or_ancestor_is_private(self, api_doc) source code
call graph 
 
_private_subclasses(self, class_doc)
Return a list of all subclasses of the given class that are private, as determined by _val_is_public.
source code
call graph 
Class Variables [hide private]
    2.4. Index pages
  SPLIT_IDENT_INDEX_SIZE = 3000
If the identifier index has more than this number of entries, then it will be split into separate pages, one for each alphabetical section.
  LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'
The alphabetical sections that are used for link index pages.
    2.9. Javascript (epydoc.js)
  TOGGLE_PRIVATE_JS = 'function toggle_private() {\n // S...
A javascript that is used to show or hide the API documentation for private objects.
  GET_COOKIE_JS = 'function getCookie(name) {\n var dc = ...
A javascript that is used to read the value of a cookie.
  SET_FRAME_JS = 'function setFrame(url1, url2) {\n par...
A javascript that is used to set the contents of two frames at once.
  HIDE_PRIVATE_JS = 'function checkCookie() {\n var cmd=g...
A javascript that is used to hide private variables, unless either: (a) the cookie says not to; or (b) we appear to be linking to a private variable.
  TOGGLE_CALLGRAPH_JS = 'function toggleCallGraph(id) {\n ...
  SHOW_PRIVATE_JS = 'function show_private() {\n var elts...
  GET_ANCHOR_JS = 'function get_anchor() {\n var href =...
  REDIRECT_URL_JS = 'function redirect_url(dottedName) {\n ...
A javascript that is used to implement the auto-redirect page.
    2.10. Graphs
  RE_CALLGRAPH_ID = re.compile(r'["\'](.+-div)[\'"]')
    2.11. Images
  IMAGES = {'crarr.png': 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAMAAA...
    3.6. Details Lists
  SPECIAL_METHODS = {'__add__': 'Addition operator', '__and__': ...
    Index generation
  METADATA_INDICES = [('bug', 'Bug List', 'Bugs'), ('todo', 'To ...
A list of metadata indices that should be generated.
    Helper functions
  TABLE_FOOTER = '</table>\n'
  PRIVATE_LINK = '<span class="options">[<a href="javascript:voi...
  _url_cache = {1088854444: 'epydoc-module.html', 1089100556: 'e...
Instance Variables [hide private]
  _show_private
Should private docs be included?
  _prj_name
The project's name (for the project link in the navbar)
  _prj_url
URL for the project link in the navbar
  _prj_link
HTML code for the project link in the navbar
  _top_page
The 'main' page
  _css
CSS stylesheet to use
  _helpfile
Filename of file to extract help contents from
  _frames_index
Should a frames index be created?
  _show_imports
Should imports be listed?
  _propfunc_linelen
[XXX] Not used!
  _variable_maxlines
Max lines for variable values
  _variable_linelen
Max line length for variable values
  _variable_summary_linelen
Max length for variable value summaries
  _variable_tooltip_linelen
Max length for variable tooltips
  _inheritance
How should inheritance be displayed? 'listed', 'included', or 'grouped'
  _incl_sourcecode
Should pages be generated for source code of modules?
  _mark_docstrings
Wrap <span class='docstring'>...</span> around docstrings?
  _graph_types
Graphs that we should include in our output.
  _include_log
Are we generating an HTML log page?
  _include_timestamp
Include a timestamp on the generated docs?
  _src_code_tab_width
Number of spaces to replace each tab with in source code listings.
  _callgraph_cache
Map the callgraph uid to their HTML representation.
  _redundant_details
If true, then include objects in the details list even if all info about them is already provided by the summary table.
  _show_submodule_list
If true, the include a list of submodules on the package documentation page.
  _google_analytics
A tracker code for google analytics; or None
  module_list
The list of ModuleDocs for the documented modules.
  module_set
The set of ModuleDocs for the documented modules.
  class_list
The list of ClassDocs for the documented classes.
  class_set
The set of ClassDocs for the documented classes.
  routine_list
The list of RoutineDocs for the documented routines.
  indexed_docs
The list of APIDocs for variables and values that should be included in the index.
Method Details [hide private]

__init__(self, docindex, **kwargs)
(Constructor)

source code 
call graph 

Construct a new HTML writer, using the given documentation index.

Parameters:
  • docindex - The documentation index.
  • prj_name (string) - The name of the project. Defaults to none.
  • prj_url (string) - The target for the project hopeage link on the navigation bar. If prj_url is not specified, then no hyperlink is created.
  • prj_link (string) - The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from prj_name.
  • top_page (string) - The top page for the documentation. This is the default page shown main frame, when frames are enabled. top can be a URL, the name of a module, the name of a class, or one of the special strings "trees.html", "indices.html", or "help.html". By default, the top-level package or module is used, if there is one; otherwise, "trees" is used.
  • css (string) - The CSS stylesheet file. If css is a file name, then the specified file's conents will be used. Otherwise, if css is the name of a CSS stylesheet in epydoc.docwriter.html_css, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used.
  • help_file (string) - The name of the help file. If no help file is specified, then the default help file will be used.
  • show_private (boolean) - Whether to create documentation for private objects. By default, private objects are documented.
  • show_frames (boolean)) - Whether to create a frames-based table of contents. By default, it is produced.
  • show_imports (boolean) - Whether or not to display lists of imported functions and classes. By default, they are not shown.
  • variable_maxlines (int) - The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed.
  • variable_linelength (int) - The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters.
  • variable_summary_linelength (int) - The maximum line length used for displaying the values of variables in the summary section. If a line is longer than this length, then it will be truncated. The default is 40 characters.
  • variable_tooltip_linelength (int) - The maximum line length used for tooltips for the values of variables. If a line is longer than this length, then it will be truncated. The default is 600 characters.
  • property_function_linelength (int) - The maximum line length used to dispaly property functions (fget, fset, and fdel) that contain something other than a function object. The default length is 40 characters.
  • inheritance (string) - How inherited objects should be displayed. If inheritance='grouped', then inherited objects are gathered into groups; if inheritance='listed', then inherited objects are listed in a short list at the end of their group; if inheritance='included', then inherited objects are mixed in with non-inherited objects. The default is 'grouped'.
  • include_source_code (boolean) - If true, then generate colorized source code files for each python module.
  • include_log (boolean) - If true, the the footer will include an href to the page 'epydoc-log.html'.
  • include_timestamp (boolean) - If true, then include a timestamp in the footer.
  • src_code_tab_width (int) - Number of spaces to replace each tab with in source code listings.

_find_top_page(self, pagename)

source code 
call graph 

Find the top page for the API documentation. This page is used as the default page shown in the main frame, when frames are used. When frames are not used, this page is copied to index.html.

Parameters:
  • pagename (string) - The name of the page, as specified by the keyword argument top to the constructor.
Returns: string
The URL of the top page.

write(self, directory=None)

source code 
call graph 

Write the documentation to the given directory.

Parameters:
  • directory (string) - The directory to which output should be written. If no directory is specified, output will be written to the current directory. If the directory does not exist, it will be created.
Returns: None
Raises:
  • OSError - If directory cannot be created.
  • OSError - If any file cannot be created or written to.

write_module(self, out, doc)

source code 
call graph 

Write an HTML page containing the API documentation for the given module to out.

Parameters:
  • doc - A ModuleDoc containing the API documentation for the module that should be described.

write_class(self, out, doc)

source code 
call graph 

Write an HTML page containing the API documentation for the given class to out.

Parameters:
  • doc - A ClassDoc containing the API documentation for the class that should be described.

write_class_tree_graph(self, out, doc, graphmaker)

source code 
call graph 

Write HTML code for a class tree graph of doc (a classdoc), using graphmaker to draw the actual graph. graphmaker should be class_tree_graph(), or uml_class_tree_graph(), or any other function with a compatible signature.

If the given class has any private sublcasses (including recursive subclasses), then two graph images will be generated -- one to display when private values are shown, and the other to display when private values are hidden.

write_class_tree(self, out)

source code 
call graph 

Write HTML code for a nested list showing the base/subclass relationships between all documented classes. Each element of the top-level list is a class with no (documented) bases; and under each class is listed all of its subclasses. Note that in the case of multiple inheritance, a class may appear multiple times.

To Do: For multiple inheritance, don't repeat subclasses the second time a class is mentioned; instead, link to the first mention.

write_help(self, out)

source code 
call graph 

Write an HTML help file to the given stream. If self._helpfile contains a help file, then use it; otherwise, use the default helpfile from epydoc.docwriter.html_help.

write_module_toc(self, out, doc)

source code 
call graph 

Write an HTML page containing the table of contents page for the given module to the given streams. This page lists the modules, classes, exceptions, functions, and variables defined by the module.

write_homepage(self, directory)

source code 
call graph 

Write an index.html file in the given directory. The contents of this file are copied or linked from an existing page, so this method must be called after all pages have been written. The page used is determined by _frames_index and _top_page:

write_css(self, directory, cssname)

source code 
call graph 

Write the CSS stylesheet in the given directory. If cssname contains a stylesheet file or name (from epydoc.docwriter.html_css), then use that stylesheet; otherwise, use the default stylesheet.

Returns: None

render_callgraph(self, callgraph, token='')

source code 

Render the HTML chunk of a callgraph.

If callgraph is a string, use the _callgraph_cache to return a pre-rendered HTML chunk. This mostly avoids to run dot twice for the same callgraph. Else, run the graph and store its HTML output in the cache.

Parameters:
  • callgraph (DotGraph or str) - The graph to render or its uid.
  • token (str) - A string that can be used to make the <div> id unambiguous, if the callgraph is used more than once in a page.
Returns: str
The HTML representation of the graph.

callgraph_link(self, callgraph, token='')

source code 

Render the HTML chunk of a callgraph link.

The link can toggles the visibility of the callgraph rendered using render_callgraph with matching parameters.

Parameters:
  • callgraph (DotGraph or str) - The graph to render or its uid.
  • token (str) - A string that can be used to make the <div> id unambiguous, if the callgraph is used more than once in a page.
Returns: str
The HTML representation of the graph link.

write_header(self, out, title)

source code 

Generate HTML code for the standard page header, and write it to out. title is a string containing the page title. It should be appropriately escaped/encoded.

write_navbar(self, out, context)

source code 

Generate HTML code for the navigation bar, and write it to out. The navigation bar typically looks like:

    [ Home Trees Index Help             Project ]
Parameters:
  • context - A value indicating what page we're generating a navigation bar for. If we're generating an API documentation page for an object, then context is a ValueDoc containing the documentation for that object; otherwise, context is a string name for the page. The following string names are recognized: 'tree', 'index', and 'help'.

write_breadcrumbs(self, out, context, context_url)

source code 

Generate HTML for the breadcrumbs line, and write it to out. The breadcrumbs line is an invisible table with a list of pointers to the current object's ancestors on the left; and the show/hide private selector and the frames/noframes selector on the right.

Parameters:
  • context (ValueDoc) - The API documentation for the object whose breadcrumbs we should generate.

write_summary_table(self, out, heading, doc, value_type)

source code 
call graph 

Generate HTML code for a summary table, and write it to out. A summary table is a table that includes a one-row description for each variable (of a given type) in a module or class.

Parameters:
  • heading - The heading for the summary table; typically, this indicates what kind of value the table describes (e.g., functions or classes).
  • doc - A ValueDoc object containing the API documentation for the module or class whose variables we should summarize.
  • value_type - A string indicating what type of value should be listed in this summary table. This value is passed on to doc's select_variables() method.

write_summary_line(self, out, var_doc, container)

source code 
call graph 

Generate HTML code for a single line of a summary table, and write it to out. See write_summary_table for more information.

Parameters:
  • var_doc - The API documentation for the variable that should be described by this line of the summary table.
  • container - The API documentation for the class or module whose summary table we're writing.

arg_name_to_html(self, func_doc, arg_name)

source code 
call graph 

A helper function used to format an argument name, for use in the argument description list under a routine's details entry. This just wraps strong & code tags around the arg name; and if the arg name is associated with a type, then adds it parenthetically after the name.

base_tree(self, doc, width=None, postfix='', context=None)

source code 
Returns: string
The HTML code for a class's base tree. The tree is drawn 'upside-down' and right justified, to allow for multiple inheritance.

find_tree_width(self, doc, context)

source code 

Helper function for base_tree.

Returns: int
The width of a base tree, when drawn right-justified. This is used by base_tree to determine how far to indent lines of the base tree.

function_signature(self, api_doc, is_summary=False, link_name=False, anchor=False, context=None)

source code 
call graph 

Render a function signature in HTML.

Parameters:
  • api_doc (VariableDoc or RoutineDoc) - The object whose name is to be rendered. If a VariableDoc, its value should be a RoutineDoc
  • is_summary - True if the fuction is to be rendered in the summary. type css_class: bool
  • link_name (bool) - If True, the name is a link to the object anchor.
  • anchor (bool) - If True, the name is the object anchor.
  • context (DottedName) - If set, represent the function name from this context. Only useful when api_doc is a RoutineDoc.
Returns: str
The HTML code for the object.

summary_name(self, api_doc, css_class='summary-name', link_name=False, anchor=False)

source code 
call graph 

Render an object name in HTML.

Parameters:
  • api_doc (APIDoc) - The object whose name is to be rendered
  • css_class - The CSS class to assign to the rendered name type css_class: str
  • link_name (bool) - If True, the name is a link to the object anchor.
  • anchor (bool) - If True, the name is the object anchor.
Returns: str
The HTML code for the object.

write_standard_fields(self, out, doc)

source code 
call graph 

Write HTML code containing descriptions of any standard markup fields that are defined by the given APIDoc object (such as @author and @todo fields).

Parameters:
  • doc - The APIDoc object containing the API documentation for the object whose standard markup fields should be described.

_term_index_to_anchor(self, term)

source code 
call graph 

Given the name of an inline index item, construct a URI anchor. These anchors are used to create links from the index page to each index item.

write_redirect_page(self, out)

source code 
call graph 

Build the auto-redirect page, which translates dotted names to URLs using javascript. When the user visits <redirect.html#dotted.name>, they will automatically get redirected to the page for the object with the given fully-qualified dotted name. E.g., for epydoc, <redirect.html#epydoc.apidoc.UNKNOWN> redirects the user to <epydoc.apidoc-module.html#UNKNOWN>.

href(self, target, label=None, css_class=None, context=None, tooltip=None)

source code 
call graph 

Return the HTML code for an HREF link to the given target (which can be a VariableDoc, a ValueDoc, or a DottedName. If a NamespaceDoc context is specified, the target label is contextualized to it.

_private_subclasses(self, class_doc)

source code 
call graph 

Return a list of all subclasses of the given class that are private, as determined by _val_is_public. Recursive subclasses are included in this list.


Class Variable Details [hide private]

TOGGLE_PRIVATE_JS

A javascript that is used to show or hide the API documentation for private objects. In order for this to work correctly, all documentation for private objects should be enclosed in <div class="private">...</div> elements.

Value:
'''function toggle_private() {
        // Search for any private/public links on this page.  Store
        // their old text in "cmd," so we will know what action to
        // take; and change their text to the opposite action.
        var cmd = "?";
        var elts = document.getElementsByTagName("a");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "privatelink") {
...

GET_COOKIE_JS

A javascript that is used to read the value of a cookie. This is used to remember whether private variables should be shown or hidden.

Value:
'''function getCookie(name) {
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);
        if (begin == -1) {
          begin = dc.indexOf(prefix);
          if (begin != 0) return null;
        } else
...

SET_FRAME_JS

A javascript that is used to set the contents of two frames at once. This is used by the project table-of-contents frame to set both the module table-of-contents frame and the main frame when the user clicks on a module.

Value:
'''function setFrame(url1, url2) {
          parent.frames[1].location.href = url1;
          parent.frames[2].location.href = url2;
      }'''

HIDE_PRIVATE_JS

A javascript that is used to hide private variables, unless either: (a) the cookie says not to; or (b) we appear to be linking to a private variable.

Value:
'''function checkCookie() {
        var cmd=getCookie("EpydocPrivate");
        if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#\
_") < 0)
            toggle_private();
      }'''

TOGGLE_CALLGRAPH_JS

Value:
'''function toggleCallGraph(id) {
        var elt = document.getElementById(id);
        if (elt.style.display == "none")
            elt.style.display = "block";
        else
            elt.style.display = "none";
      }'''

SHOW_PRIVATE_JS

Value:
'''function show_private() {
        var elts = document.getElementsByTagName("a");
        for(var i=0; i<elts.length; i++) {
          if (elts[i].className == "privatelink") {
            cmd = elts[i].innerHTML;
            if (cmd && cmd.substr(0,4)=="show")
                toggle_private();
          }
...

GET_ANCHOR_JS

Value:
'''function get_anchor() {
          var href = location.href;
          var start = href.indexOf("#")+1;
          if ((start != 0) && (start != href.length))
              return href.substring(start, href.length);
      }'''

REDIRECT_URL_JS

A javascript that is used to implement the auto-redirect page. When the user visits <redirect.html#dotted.name>, they will automatically get redirected to the page for the object with the given fully-qualified dotted name. E.g., for epydoc, <redirect.html#epydoc.apidoc.UNKNOWN> redirects the user to <epydoc.apidoc-module.html#UNKNOWN>.

Value:
'''function redirect_url(dottedName) {
          // Scan through each element of the "pages" list, and check
          // if "name" matches with any of them.
          for (var i=0; i<pages.length; i++) {

              // Each page has the form "<pagename>-m" or "<pagename>-\
c";
              // extract the <pagename> portion & compare it to dotted\
...

IMAGES

Value:
{'crarr.png': '''iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAMAAABlokWQAAAALHRFW\
HRDcmVhdGlvbiBUaW1lAFR1
ZSAyMiBBdWcgMjAwNiAwMDo0MzoxMCAtMDUwMGAMEFgAAAAHdElNRQfWCBYFASkQ033WAA\
AACXBI
WXMAAB7CAAAewgFu0HU+AAAABGdBTUEAALGPC/xhBQAAAEVQTFRF////zcOw18/AgGY0c1\
cg4dvQ
inJEYEAAYkME3NXI6eTcloFYe2Asr5+AbE4Uh29A9fPwqpl4ZEUI8O3onopk0Ma0lH5U1n\
fFdgAA
...

SPECIAL_METHODS

Value:
{'__add__': 'Addition operator',
 '__and__': 'And operator',
 '__call__': 'Call operator',
 '__cmp__': 'Comparison operator',
 '__contains__': 'In operator',
 '__del__': 'Destructor',
 '__delitem__': 'Index deletion operator',
 '__delslice__': 'Slice deletion operator',
...

METADATA_INDICES

A list of metadata indices that should be generated. Each entry in this list is a tuple (tag, label, short_label), where tag is the cannonical tag of a metadata field; label is a label for the index page; and short_label is a shorter label, used in the index selector.

Value:
[('bug', 'Bug List', 'Bugs'),
 ('todo', 'To Do List', 'To Do'),
 ('change', 'Change Log', 'Changes'),
 ('deprecated', 'Deprecation List', 'Deprecations'),
 ('since', 'Introductions List', 'Introductions')]

PRIVATE_LINK

Value:
'''<span class="options">[<a href="javascript:void(0);" class="private\
link"
    onclick="toggle_private();">hide&nbsp;private</a>]</span>'''

_url_cache

Value:
{1088854444: 'epydoc-module.html',
 1089100556: 'epydoc-module.html',
 1089660108: 'epydoc.checker-module.html',
 1089660300: 'epydoc-module.html#DEBUG',
 1089660524: 'epydoc-module.html#__url__',
 1089660588: 'epydoc-module.html#__author__',
 1089660908: 'epydoc.checker-module.html',
 1089661036: 'epydoc-module.html#__license__',
...