Index of /data/main/p/pythondoc/0.6-2

README for pythondoc

README for pythondoc

Daniel Larsson, Daniel.Larsson@vasteras.mail.telia.com
Version 0.6
Latest release: http://starship.python.net/crew/danilo/pythondoc

Contents

Short description

Pythondoc is a tool that extracts information from Python objects, and generates reference manuals and indices.

IMPORTANT! Many people seems to have problems running pythondoc. It is very important to know pythondoc is mostly implemented as a package. There's one file, 'pythondoc' (no extension). On the Windows platform it is probably best to rename this to 'pdoc.py' and move it to a directory in your path. On Unix, the Makefile install rule should take care of setting up everything for you.

The tool is extensible in at least two different ways:

Command line interface

Currently pythondoc only has a command line interface. To see the available arguments, and a description, run pythondoc with the --help option.

Extension module options

A writer of an extension module (formatter/crossreferencing module) can add its own options. Those options are given by the command line user as 'pythondoc <option name>=<option value>'. The option name may be qualified with the extension name, if two extensions register the same option name: <ext name>_<option name>

Options may also be set up in an option file. Two different option files are read, the global, residing in the directory containing the pythondoc package, and the local, residing in your home directory (os.environ['HOME']). Both must be called pythondoc.opts.

Output running with --help

Usage: pythondoc [-a] [-D] [-d dir] [-f format] [-h] [-i] [-l] [-o option_file] [-s dir] [-v] [key=value ...] [files]
-a, --all
Generate documentation for all modules in sys.path.
-D, --nodoc
Don't generate document pages.
-d dir, --directory dir
Save generated files in the dir directory.
-f format, --format format
Generate files using the formatter format.
-h, --help
Print help text.
-i, --index
Generate index pages.
-l, --load
Load previously saved doctrees.
-o option file, --options option file
Load options from given file.
-s dir, --savedir dir
Save/read doctrees from given directory.
-v, --verbose
Verbose mode
key=value
Pass formatter options.

DESCRIPTION

pythondoc scans one or several python modules for documentation strings. From the documentation strings, manual pages are generated in any of FrameMaker MIF, MML, HTML and ASCII formats. Note that you can give multiple format options at once. It is a lot faster, since the the source files are only parsed/imported and traversed once. The key=value options are used to send arguments to formatters. These definitions can be put in the environment as well.

If the program is called without arguments, a graphical UI will be shown.

all
main: Traverse sys.path and document everything (type: bool, default: 0)
options
main: Pythondoc option file (type: file path, default: )
document
main: Generate document pages (type: bool, default: 1)
directory
main: Directory to store output (type: file path, default: .)
savedir
main: Save doctrees (type: directory path, default: )
head
main: Generate head page (type: bool, default: 0)
index
main: Generate index pages (type: bool, default: 0)
load
main: Load previously saved doctrees (type: bool, default: 0)
frame
HTML4: Generate pages using frames. (type: bool, default: 0)
footer_file
HTML4: File containing HTML code inserted right before the body end tag. (type: file path, default: )
header_file
HTML4: File containing HTML code inserted right after the body start tag. (type: file path, default: )
stylesheet
HTML4: URL to stylesheet (CSS) to use. (type: URL, default: pythondoc.css)

FORMATTERS

Currently the following formatters are supported:

To do

These are things I plan to do:

Release notes

Version 0.6 (beta) - 1999-05-01

Version 0.5 (alpha) - 1998-12-14

Version 0.4 (alpha) - 1998-10-06

Hmmm, never do a hasty release... Joe van Andel found some annoying bugs, like DOS newlines in 'pythondoc', and some other stuff...

Version 0.3 (alpha) - 1998-10-04

This release contains bugfixes and very little new functionality:

Version 0.2 (alpha) - 1998-08-11

This release contains bugfixes and some new functionality:

Version 0.1 (alpha) - 1998-08-06

This is the first release, which is missing a lot, certainly contains bugs, but is released to the Python DOC-SIG in hope of feedback. It can generate HTML 4.0 code, but I haven't spent too much time making them look good. The style sheet uses all kinds of colors to verify things are working as they should...