1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>README for pythondoc</title>
<STYLE>
H1 {
text-align: center;
}
Author {
}
</STYLE>
</head>
<body>
<CENTER>
<H1>README for pythondoc</H1>
<P CLASS="Author">Daniel Larsson, <A HREF="mailto:Daniel.Larsson@vasteras.mail.telia.com">Daniel.Larsson@vasteras.mail.telia.com</A><BR>
Version 0.6<BR>
Latest release: <A HREF="http://starship.python.net/crew/danilo/pythondoc">http://starship.python.net/crew/danilo/pythondoc</A>
</P>
</CENTER>
<H2>Contents</H2>
<UL>
<LI><A HREF="#intro">Short description</A></LI>
<LI><A HREF="#todo">To do list</A></LI>
<LI><A HREF="#releases">Release notes</A></LI>
</UL>
<H2 id="intro">Short description</H2>
<P>
<EM>Pythondoc</EM> is a tool that extracts information from Python
objects, and generates reference manuals and indices.
</P>
<P>
<EM STYLE="color:red">IMPORTANT!</EM> 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 <KBD>install</KBD> rule should take care
of setting up everything for you.
</P>
<P>
The tool is extensible in at least two different ways:
</P>
<UL>
<LI>Formatting modules may be plugged in to generate output in
various formats. This version has formatters for a homegrown
XML format, and HTML 4.0. Expect others to follow... (or write
one yourself!!!)</LI>
<LI>Crossreferencing modules may be plugged in to support references
to external systems. This version handles standard web references
(http, ftp, ...) and internal references (i.e. references to Python
classes, functions and modules). Other possible modules might include
handling of references to, say MS Windows API routines.</LI>
</UL>
<H3>Command line interface</H3>
<P>
Currently <EM>pythondoc</em> only has a command line interface.
To see the available arguments, and a description, run
<EM>pythondoc</EM> with the <CODE>--help</CODE> option.
</P>
<H3>Extension module options</H3>
<P>
A writer of an extension module (formatter/crossreferencing module)
can add its own options. Those options are given by the command line
user as <CODE>'pythondoc <option name>=<option value>'</CODE>.
The option name may be qualified with the extension name, if two
extensions register the same option name: <CODE><ext name>_<option name></CODE>
</P>
<P>
Options may also be set up in an <EM>option file</EM>. Two different option
files are read, the global, residing in the directory containing the
<CODE>pythondoc</CODE> package, and the local, residing in your home
directory (<CODE>os.environ['HOME']</CODE>). Both must be called
<CODE>pythondoc.opts</CODE>.
</P>
<H3>Output running with --help</H3>
Usage: <EM>pythondoc</EM> [-a] [-D] [-d dir] [-f format] [-h] [-i] [-l] [-o option_file] [-s dir] [-v] [key=value ...] [files]
<DL>
<DT>
<STRONG>-a</STRONG>, <STRONG>--all</STRONG>
<DD>Generate documentation for all modules in sys.path.
<DT>
<STRONG>-D</STRONG>, <STRONG>--nodoc</STRONG>
<DD>Don't generate document pages.
<DT>
<STRONG>-d</STRONG> <EM>dir</EM>, <STRONG>--directory</STRONG> <EM>dir</EM>
<DD>Save generated files in the <EM>dir</EM> directory.
<DT>
<STRONG>-f</STRONG> <EM>format</EM>, <STRONG>--format</STRONG> <EM>format</EM>
<DD>Generate files using the formatter <EM>format</EM>.
<DT>
<STRONG>-h</STRONG>, <STRONG>--help</STRONG>
<DD>Print help text.
<DT>
<STRONG>-i</STRONG>, <STRONG>--index</STRONG>
<DD>Generate index pages.
<DT>
<STRONG>-l</STRONG>, <STRONG>--load</STRONG>
<DD>Load previously saved doctrees.
<DT>
<STRONG>-o</STRONG> <EM>option file</EM>, <STRONG>--options</STRONG> <EM>option file</EM>
<DD>Load options from given file.
<DT>
<STRONG>-s</STRONG> <EM>dir</EM>, <STRONG>--savedir</STRONG> <EM>dir</EM>
<DD>Save/read doctrees from given directory.
<DT>
<STRONG>-v</STRONG>, <STRONG>--verbose</STRONG>
<DD>Verbose mode
<DT>
<EM>key=value</EM>
<DD>Pass formatter options.
</DL>
<H3>DESCRIPTION</H3>
<P>
<EM>pythondoc</EM> 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 <EM>key=value</EM> options are used to send arguments to formatters. These
definitions can be put in the environment as well.
</P>
<P>
If the program is called without arguments, a graphical UI will be shown.
</P>
<DL>
<DT>
all
<DD>main: Traverse sys.path and document everything (type: bool, default: 0)
<DT>
options
<DD>main: Pythondoc option file (type: file path, default: )
<DT>
document
<DD>main: Generate document pages (type: bool, default: 1)
<DT>
directory
<DD>main: Directory to store output (type: file path, default: .)
<DT>
savedir
<DD>main: Save doctrees (type: directory path, default: )
<DT>
head
<DD>main: Generate head page (type: bool, default: 0)
<DT>
index
<DD>main: Generate index pages (type: bool, default: 0)
<DT>
load
<DD>main: Load previously saved doctrees (type: bool, default: 0)
<DT>
frame
<DD>HTML4: Generate pages using frames. (type: bool, default: 0)
<DT>
footer_file
<DD>HTML4: File containing HTML code inserted right before the body end tag. (type: file path, default: )
<DT>
header_file
<DD>HTML4: File containing HTML code inserted right after the body start tag. (type: file path, default: )
<DT>
stylesheet
<DD>HTML4: URL to stylesheet (CSS) to use. (type: URL, default: pythondoc.css)
</DL>
<H3>FORMATTERS</H3>
Currently the following formatters are supported:
<UL>
<LI>HTML4
<LI>XML
</UL>
<H2 id="todo">To do</H2>
<P>These are things I plan to do:
<UL>
<LI>Take a look at Microsoft HTMLHelp, and possibly generate such files.
Possibly generate them from the XML output.
<LI>Other suggestions from users... (hint, hint)
</UL>
</P>
<H2 id="releases">Release notes</H2>
<H3>Version 0.6 (beta) - 1999-05-01</H3>
<UL>
<LI>Added a Tkinter user interface.
pythondoc GUI needs the following components to work:
<UL>
<LI>tkFileDialog - Fetch it from Fredrik Lundh's home page at
<A HREF="http://starship.python.net/crew/fredrik">http://starship.python.net/crew/fredrik</A>
<LI>Pmw - Peter Munnings' and Greg McFarlane's Python megawidgets.
<A HREF="http://www.dscpl.com.au/pmw">http://www.dscpl.com.au/pmw</A>
</UL>
<LI>A number of bugs have been fixed:
<UL>
<LI>Builtin functions are now shown in the generated documents.
<LI>Problem with documenting dynamically loaded modules fixed.
<LI>pythondoc threw an unhandled exception on module "tricks" like the one
used in Pmw.__init__. These are now caught (but not really handled).
</UL>
</UL>
<H3>Version 0.5 (alpha) - 1998-12-14</H3>
<UL>
<LI>
Removed the 'path' attribute in the generated XML (and the internal tree), replacing it
with the 'id' tree. The 'id' attribute should now be globally unique.
</LI>
<LI>
Now makes an 'eval' on command line option values, so you don't get a 'type mismatch'
error on integer options.
</LI>
</UL>
<H3>Version 0.4 (alpha) - 1998-10-06</H3>
<P>
Hmmm, never do a hasty release... Joe van Andel found some annoying
bugs, like DOS newlines in 'pythondoc', and some other stuff...
</P>
<H3>Version 0.3 (alpha) - 1998-10-04</H3>
<P>
This release contains bugfixes and very little new functionality:
</P>
<UL>
<LI>Fixed stupid mistakes in Makefile (the xref directory wasn't created,
and the pythondoc file wasn't in the distribution).
<LI>Changed the help option from -? to -h.
<LI>Added long option names.
<LI>Removed <NAME> elements from XML output (names are stored in 'id'
attributes).
</UL>
<H3>Version 0.2 (alpha) - 1998-08-11</H3>
<P>
This release contains bugfixes and some new functionality:
</P>
<UL>
<LI>Generation of "Table of contents" added
<LI>Saving and loading of doctrees (-s and -l) now works. This is useful if
you want to parse modules one at a time, but make the index and table of
contents pages to retain old information.
<LI>Option files are added to store common options, such as HTML headers and
footers.
</UL>
<H3>Version 0.1 (alpha) - 1998-08-06</H3>
<P>
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...
</P>
</BODY>
</HTML>
|