epydoc.html

Package epydoc :: Module html |
[show private | hide private]
[frames | no frames]

## Module epydoc.html

Documentation to HTML converter. This module defines a single class, `HTMLFormatter`, which translates the API documentation encoded in a `DocMap` into a set of HTML files.

To Do:

- either use StringIO more (if it's significantly faster), or don't use it at all.
- finish updating docstrings.

Question: Should functions with no docstrings be listed in the details section? Currently, they are not, with the reasoning being that there's nothing else to say about them. But parameter defaults are listed in details, and not in summary. C.f. properties, where properties without docstrings are always listed in details (since we want to list their accessor methods).

Classes
`HTMLFormatter` | Documentation to HTML converter.
`_DevNull` | A file-like-object that ignores all input.
`_HTMLDocstringLinker` |

Function Summary
| ``_write_if_nonempty`(public, private, links, str)` Write `str` to `public` and `private`; but only write to `private` if `links` is nonempty; and only write to `public` if `links` contains at least one public object.

Variable Summary
`str` | `FOOTER`: The footer for standard documentation HTML pages.
`str` | `FRAMES_INDEX` = `'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML ...`
`str` | `HEADER`: The header for standard documentation HTML pages.
`str` | `REDIRECT_INDEX`: The contents of redirect index page.
`dict` | `SPECIAL_METHODS`: A dictionary providing names for the special methods that a class can define.

Function Details

### _write_if_nonempty(public, private, links, str) Write `str` to `public` and `private`; but only write to `private` if `links` is nonempty; and only write to `public` if `links` contains at least one public object. This helper function is used to write list headers etc., which should only appear if the list will actually contain something.

Variable Details

    ### FOOTER The footer for standard documentation HTML pages. Type: `str` Value:
        '''
        <table border="0" cellpadding="0" cellspacing="0" width="100%%">
          <tr>
            <td align="left"><font size="-2">Generated by Epydoc %s on %s</fon\
        t></td>
            <td align="right"><a href="http://epydoc.sourceforge.net"
                              ><font size="-2">http://epydoc.sf.net</font></a>\
        </td>
        ...

    ### FRAMES_INDEX Type: `str` Value:
        '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
        <html>
        <head>
          <title> %s </title>
        </head>
        <frameset cols="20%%,80%%">
          <frameset rows="30%%,70%%">
            <frame src="toc.html" name="moduleListFrame">
        ...

    ### HEADER The header for standard documentation HTML pages. Type: `str` Value:
        '''<?xml version="1.0" encoding="iso-8859-1"?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                  "DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
          <title>%s</title>
          <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
        </head>
        ...

    ### REDIRECT_INDEX The contents of redirect index page. This page is only used if the supplied top page is external. Type: `str` Value:
        '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
        <html>
        <head>
          <title> Redirect </title>
          <meta http-equiv="refresh" content="1;url=%s">
          <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
        </head>
        <body>
        ...

    ### SPECIAL_METHODS A dictionary providing names for the special methods that a class can define. Type: `dict` 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',
        ...

Generated by Epydoc 2.1 on Sat Mar 20 17:46:19 2004 | http://epydoc.sf.net