Module __main__
[hide private]
[frames] | no frames]

Module __main__

Command-line interface for epydoc. Abbreviated Usage:

epydoc [options] NAMES...

    NAMES...                  The Python modules to document.
    --html                    Generate HTML output (default).
    --latex                   Generate LaTeX output.
    --pdf                     Generate pdf output, via LaTeX.
    -o DIR, --output DIR      The output directory.
    --inheritance STYLE       The format for showing inherited objects.
    -V, --version             Print the version of epydoc.
    -h, --help                Display a usage message.

Run "epydoc --help" for a complete option list. See the epydoc(1) man page for more information.

Config Files

Configuration files can be specified with the --config option. These files are read using ConfigParser. Configuration files may set options or add names of modules to document. Option names are (usually) identical to the long names of command line options. To specify names to document, use any of the following option names:

 module modules value values object objects

A simple example of a config file is:

 [epydoc]
 modules: sys, os, os.path, re, %(MYSANDBOXPATH)/utilities.py
 name: Example
 graph: classtree
 introspect: no

All ConfigParser interpolations are done using local values and the environment variables.

Verbosity Levels

The -v and -q options increase and decrease verbosity, respectively. The default verbosity level is zero. The verbosity levels are currently defined as follows:

               Progress    Markup warnings   Warnings   Errors
-3               none            no             no        no
-2               none            no             no        yes
-1               none            no             yes       yes
 0 (default)     bar             no             yes       yes
 1               bar             yes            yes       yes
 2               list            yes            yes       yes
Classes [hide private]
  ConsoleLogger
  HTMLLogger
A logger used to generate a log of all warnings and messages to an HTML file.
  TerminalController
A class that can be used to portably generate formatted output to a terminal.
  UnifiedProgressConsoleLogger
Functions [hide private]
 
_profile()
 
_str_to_bool(val, optname)
 
_str_to_int(val, optname)
 
_str_to_list(val)
 
check_docs(docindex, options)
 
cli()
 
main(options, names)
 
parse_arguments()
 
parse_configfiles(configfiles, options, names)
 
pickle_persistent_id(obj)
Helper for pickling, which allows us to save and restore UNKNOWN, which is required to be identical to apidoc.UNKNOWN.
 
pickle_persistent_load(identifier)
Helper for pickling, which allows us to save and restore UNKNOWN, which is required to be identical to apidoc.UNKNOWN.
 
write_html(docindex, options)
 
write_latex(docindex, options, format)
 
write_pickle(docindex, options)
Helper for writing output to a pickle file, which can then be read in at a later time.
 
write_text(docindex, options)
Variables [hide private]
  ACTIONS = ('html', 'text', 'latex', 'dvi', 'ps', 'pdf', 'check')
  CSS_STYLESHEETS = {'black': ('\n\n/* Epydoc CSS Stylesheet\n *...
  DEFAULT_DOCFORMAT = 'epytext'
  DOCFORMATS = ('epytext', 'plaintext', 'restructuredtext', 'jav...
  GRAPH_TYPES = ('classtree', 'callgraph', 'umlclasstree')
  HELP_TOPICS = {'css': 'The following built-in CSS stylesheets ...
  INHERITANCE_STYLES = ('grouped', 'listed', 'included')
  OPTION_DEFAULTS = {'action': 'html', 'debug': False, 'docforma...
  PROFILER = 'profile'
  SUPPRESS_HELP = 'SUPPRESSHELP'
  UNKNOWN = ??
  _RERUN_LATEX_RE = re.compile(r'(?im)^LaTeX\s+Warning:\s+Label\...
  descr = 'Black on white, with blue highlights'
  key = 'white'
  sheet = '\n\n/* Epydoc CSS Stylesheet\n *\n * This stylesheet ...
  topic = 'inheritance'

Imports: ConfigParser, OptionGroup, OptionParser, RunSubprocessError, epydoc, glob, log, optparse, os, pickle, plaintext_to_html, re, run_subprocess, sys, textwrap, time, wordwrap, xlink


Function Details [hide private]

write_pickle(docindex, options)

 

Helper for writing output to a pickle file, which can then be read in at a later time. But loading the pickle is only marginally faster than building the docs from scratch, so this has pretty limited application.


Variables Details [hide private]

CSS_STYLESHEETS

Value:
{'black': ('''

/* Epydoc CSS Stylesheet
 *
 * This stylesheet can be used to customize the appearance of epydoc\'\
s
 * HTML output.
 *
...

DOCFORMATS

Value:
('epytext', 'plaintext', 'restructuredtext', 'javadoc')

HELP_TOPICS

Value:
{'css': '''The following built-in CSS stylesheets are available:
        blue: Black on steel blue
     default: Default stylesheet (=white)
   grayscale: Grayscale black on white
       black: White on black, with blue highlights
       green: Black on green
       white: Black on white, with blue highlights''',
 'docformat': '''__docformat__ is a module variable that specifies the\
...

OPTION_DEFAULTS

Value:
{'action': 'html',
 'debug': False,
 'docformat': 'epytext',
 'exclude': [],
 'exclude_introspect': [],
 'exclude_parse': [],
 'external_api': [],
 'external_api_file': [],
...

_RERUN_LATEX_RE

Value:
re.compile(r'(?im)^LaTeX\s+Warning:\s+Label\(s\)\s+may\s+have\s+change\
d.\s+Rerun')

sheet

Value:
'''

/* Epydoc CSS Stylesheet
 *
 * This stylesheet can be used to customize the appearance of epydoc\'\
s
 * HTML output.
 *
...