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.
UnifiedProgressConsoleLogger
Functions [hide private]
 
_profile()
 
_str_to_bool(val, optname)
 
_str_to_int(val, optname)
 
_str_to_list(val)
 
add_action(option, opt, value, optparser)
 
add_target(option, opt, value, optparser)
 
check_docs(docindex, options)
 
cli()
Perform all actions indicated by the options in sys.argv.
 
main(options)
Perform all actions indicated by the given set of options.
 
option_defaults()
 
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)
 
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_ACTIONS = ('html')
  DEFAULT_DOCFORMAT = 'epytext'
  DEFAULT_TARGET = {'dvi': 'api.dvi', 'html': 'html', 'latex': '...
  DOCFORMATS = ('epytext', 'plaintext', 'restructuredtext', 'jav...
  GRAPH_COLOR = {'BASECLASS_BG': '#e0b0a0', 'CLASS_BG': '#d8ffe8...
  GRAPH_TYPES = ('classtree', 'callgraph', 'umlclasstree')
  HELP_TOPICS = {'css': 'The following built-in CSS stylesheets ...
  INHERITANCE_STYLES = ('grouped', 'listed', 'included', 'hidden')
  PDFDRIVERS = ('pdflatex', 'latex', 'auto')
  PROFILER = 'profile'
  STY_STYLESHEETS = {'base': '\n% epydoc-base.sty\n%\n% Authors:...
  SUPPRESS_HELP = 'SUPPRESSHELP'
  TARGET_ACTIONS = ('html', 'latex', 'dvi', 'ps', 'pdf')
  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, DotGraph, OptionGroup, OptionParser, RunSubprocessError, TerminalController, epydoc, glob, log, optparse, os, pickle, plaintext_to_html, re, run_subprocess, shutil, sys, tempfile, textwrap, time, wordwrap, xlink


Function Details [hide private]

cli()

 

Perform all actions indicated by the options in sys.argv.

Returns:
the epydoc.apidoc.DocIndex object created while running epydoc (or None).

main(options)

 

Perform all actions indicated by the given set of options.

Returns:
the epydoc.apidoc.DocIndex object created while running epydoc (or None).

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.
 *
...

DEFAULT_TARGET

Value:
{'dvi': 'api.dvi',
 'html': 'html',
 'latex': 'latex',
 'pdf': 'api.pdf',
 'pickle': 'api.pickle',
 'ps': 'api.ps'}

DOCFORMATS

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

GRAPH_COLOR

Value:
{'BASECLASS_BG': '#e0b0a0',
 'CLASS_BG': '#d8ffe8',
 'INH_LINK': '#800000',
 'MODULE_BG': '#d8e8ff',
 'ROUTINE_BG': '#e8d0b0',
 'SELECTED_BG': '#ffd0d0',
 'SUBCLASS_BG': '#e0b0a0',
 'UNDOCUMENTED_BG': '#c0c0c0'}

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\
...

STY_STYLESHEETS

Value:
{'base': '''
% epydoc-base.sty
%
% Authors: Jonathan Guyer <guyer@nist.gov>
%          Edward Loper <edloper@seas.upenn.edu>
% URL: <http://epydoc.sf.net>
%
% This LaTeX stylesheet defines the basic commands that are used by
...

_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.
 *
...