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 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
|
<?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>epydoc.html.HTMLFormatter</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="epydoc-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 2.0</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="epydoc-module.html">Package epydoc</a> ::
<a href="epydoc.html-module.html">Module html</a> ::
Class HTMLFormatter
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<a href="../private/epydoc.html.HTMLFormatter-class.html">show private</a> | hide private]</font></td></tr>
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="epydoc.html.HTMLFormatter-class.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class HTMLFormatter</h2>
<hr/>
Documentation to HTML converter. The API documentation produced
<code>HTMLFormatter</code> consists of a set of HTML files. Two
subdirectories are created for the public and private documentation.
Within each subdirectories, every class and module is documented in its
own file. An index file, a trees file, a help file, and a frames-based
table of contents are also created. In particular,
<code>HTMLFormatter</code> generates the following files:
<ul>
<li>
<a name="index-index_html"></a><i
class="indexterm">index.html</i>: The standard entry point for the
documentation. Normally, index.html is a frame index file, which
defines three frames: two frames on the left side of the browser
contain a table of contents, and the main frame on the right side of
the window contains documentation pages. But if the --no-frames
option is used, then index.html will redirect the user to the
project's top page.
</li>
<li>
<a name="index-module_module_html"></a><i
class="indexterm"><i>module</i>-module.html</i>: The API
documentation for a module. <i>module</i> is the complete dotted name
of the module, such as sys or epydoc.epytext.
</li>
<li>
<a name="index-class_class_html"></a><i
class="indexterm"><i>class</i>-class.html</i>: The API documentation
for a class, exception, or type. <i>class</i> is the complete dotted
name of the class, such as epydoc.epytext.Token or
array.ArrayType.
</li>
<li>
<a name="index-trees_html"></a><i
class="indexterm">trees.html</i>: The module and class
hierarchies.
</li>
<li>
<a name="index-indices_html"></a><i
class="indexterm">indices.html</i> The term and identifier
indices.
</li>
<li>
<a name="index-help_html"></a><i class="indexterm">help.html</i>:
The help page for the project. This page explains how to use and
navigate the webpage produced by epydoc.
</li>
<li>
<a name="index-toc_html"></a><i class="indexterm">toc.html</i>:
The top-level table of contents page. This page is displayed in the
upper-left frame, and provides links to toc-everything.html and the
toc-<i>module</i>-module.html files. toc.html is not generated if the
--no-frames option is used.
</li>
<li>
<a name="index-toc_everything_html"></a><i
class="indexterm">toc-everything.html</i>: The table of contents for
the entire project. This page is displayed in the lower-left frame,
and provides links to every class, type, exception, function, and
variable defined by the project. toc-everything.html is not generated
if the --no-frames option is used.
</li>
<li>
<a name="index-toc_module_module_html"></a><i
class="indexterm">toc-<i>module</i>-module.html</i>: The table of
contents for a module. This page is displayed in the lower-left
frame, and provides links to every class, type, exception, function,
and variable defined by the module. module is the complete dotted
name of the module, such as sys or epydoc.epytext. toc-m-module.html
is not generated if the --no-frames option is used.
</li>
<li>
<a name="index-epydoc_css"></a><i
class="indexterm">epydoc.css</i>: The CSS stylesheet used to display
all HTML pages.
</li>
</ul>
<hr/>
<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="epydoc.html.HTMLFormatter-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>docmap</span>,
<span class="summary-sig-kwarg">**kwargs</span>)</span></code>
<br />
Construct a new HTML formatter, using the given documentation map.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="epydoc.html.HTMLFormatter-class.html#format" class="summary-sig-name"><code>format</code></a>(<span class=summary-sig-arg>object</span>,
<span class=summary-sig-arg>error_stream</span>,
<span class=summary-sig-arg>show_private</span>,
<span class=summary-sig-arg>body_only</span>,
<span class="summary-sig-kwarg">**options</span>)</span></code>
<br />
Return a string containing the HTML documentation for the given object. <i>(Static method)</i>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>int</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.html.HTMLFormatter-class.html#num_files" class="summary-sig-name"><code>num_files</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return the number of files that this <code>HTMLFormatter</code> will
generate.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>None</code>
</font></td>
<td><code><span class="summary-sig"><a href="epydoc.html.HTMLFormatter-class.html#write" class="summary-sig-name"><code>write</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>directory</span>,
<span class=summary-sig-arg>progress_callback</span>)</span></code>
<br />
Write the documentation to the given directory.</td></tr>
</table><br />
<!-- =========== START OF INSTANCE METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Instance Method Details</th></tr>
</table>
<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>docmap</span>,
<span class="sig-kwarg">**kwargs</span>)</span>
<br /><i>(Constructor)</i>
</h3>
Construct a new HTML formatter, using the given documentation
map.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>docmap</b></code> -
The documentation to output.
<br /><i>
(type=<a href="epydoc.objdoc.DocMap-class.html"
class="link"><code>DocMap</code></a>)</i>
</dd>
</dl>
<dl><dt><b>Keyword Parameters:</b></dt>
<dd><code><b>prj_name</b></code> -
The name of the project. Defaults to none.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>prj_url</b></code> -
The target for the project hopeage link on the navigation bar.
If <code>prj_url</code> is not specified, then no hyperlink is
created.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>prj_link</b></code> -
The label for the project link on the navigation bar. This
link can contain arbitrary HTML code (e.g. images). By default, a
label is constructed from <code>prj_name</code>.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>top</b></code> -
The top page for the documentation. This is the default page
shown main frame, when frames are enabled. <code>top</code> can
be a URL, the name of a module, the name of a class, or one of
the special strings <code>"trees.html"</code>,
<code>"indices.html"</code>, or
<code>"help.html"</code>. By default, the top-level
package or module is used, if there is one; otherwise,
<code>"trees"</code> is used.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>css</b></code> -
The CSS stylesheet file. If <code>css</code> is a file name,
then the specified file's conents will be used. Otherwise, if
<code>css</code> is the name of a CSS stylesheet in <a
href="epydoc.css-module.html"
class="link"><code>epydoc.css</code></a>, then that stylesheet
will be used. Otherwise, an error is reported. If no stylesheet
is specified, then the default stylesheet is used.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>private_css</b></code> -
The CSS stylesheet file for the private API documentation. If
<code>css</code> is a file name, then the specified file's
conents will be used. Otherwise, if <code>css</code> is the name
of a CSS stylesheet in <a href="epydoc.css-module.html"
class="link"><code>epydoc.css</code></a>, then that stylesheet
will be used. Otherwise, an error is reported. If no stylesheet
is specified, then the private API documentation will use the
same stylesheet as the public API documentation.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>help</b></code> -
The name of the help file. If no help file is specified, then
the default help file will be used.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>private</b></code> -
Whether to create documentation for private objects. By
default, private objects are documented.
<br /><i>
(type=<code>boolean</code>)</i>
<dd><code><b>frames</b></code> -
Whether to create a frames-based table of contents. By
default, it is produced.
<br /><i>
(type=<code>boolean</code>))</i>
<dd><code><b>show_imports</b></code> -
Whether or not to display lists of imported functions and
classes. By default, they are not shown.
<br /><i>
(type=<code>boolean</code>)</i>
<dd><code><b>index_parameters</b></code> -
Whether or not to include function parameters in the
identifier index. By default, they are not included.
<br /><i>
(type=<code>boolean</code>)</i>
<dd><code><b>variable_maxlines</b></code> -
The maximum number of lines that should be displayed for the
value of a variable in the variable details section. By default,
8 lines are displayed.
<br /><i>
(type=<code>int</code>)</i>
<dd><code><b>variable_linelength</b></code> -
The maximum line length used for displaying the values of
variables in the variable details sections. If a line is longer
than this length, then it will be wrapped to the next line. The
default line length is 70 characters.
<br /><i>
(type=<code>int</code>)</i>
<dd><code><b>variable_summary_linelength</b></code> -
The maximum line length used for displaying the values of
variables in the summary section. If a line is longer than this
length, then it will be truncated. The default is 40
characters.
<br /><i>
(type=<code>int</code>)</i>
<dd><code><b>variable_tooltip_linelength</b></code> -
The maximum line length used for tooltips for the values of
variables. If a line is longer than this length, then it will be
truncated. The default is 600 characters.
<br /><i>
(type=<code>int</code>)</i>
<dd><code><b>property_function_linelength</b></code> -
The maximum line length used to dispaly property functions
(<code>fget</code>, <code>fset</code>, and <code>fdel</code>)
that contain something other than a function object. The dfeault
length is 40 characters.
<br /><i>
(type=<code>int</code>)</i>
<dd><code><b>inheritance</b></code> -
How inherited objects should be displayed. If
<code>inheritance='grouped'</code>, then inherited objects are
gathered into groups; if <code>inheritance='listed'</code>, then
inherited objects are listed in a short list at the end of their
group; if <code>inheritance='included'</code>, then inherited
objects are mixed in with non-inherited objects. The default is
'grouped'.
<br /><i>
(type=<code>string</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="num_files"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">num_files</span>(<span class=sig-arg>self</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
The number of files that this <code>HTMLFormatter</code> will
generate.
<br /><i>
(type=<code>int</code>)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="write"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">write</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>directory</span>=<span class=sig-default>None</span>,
<span class=sig-arg>progress_callback</span>=<span class=sig-default>None</span>)</span>
</h3>
Write the documentation to the given directory.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>directory</b></code> -
The directory to which output should be written. If no
directory is specified, output will be written to the current
directory. If the directory does not exist, it will be
created.
<br /><i>
(type=<code>string</code>)</i>
<dd><code><b>progress_callback</b></code> -
A callback function that is called before each file is
written, with the name of the created file.
<br /><i>
(type=<code>function</code>)</i>
</dd>
</dl>
<dl><dt><b>Returns:</b></dt>
<dd>
<code>None</code>
</dd>
</dl>
<dl><dt><b>Raises:</b></dt>
<dd><code><b>OSError</b></code> -
If <code>directory</code> cannot be created,
<dd><code><b>OSError</b></code> -
If any file cannot be created or written to.
</dl>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF STATIC METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Static Method Details</th></tr>
</table>
<a name="format"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">format</span>(<span class=sig-arg>object</span>,
<span class=sig-arg>error_stream</span>=<span class=sig-default>None</span>,
<span class=sig-arg>show_private</span>=<span class=sig-default>1</span>,
<span class=sig-arg>body_only</span>=<span class=sig-default>1</span>,
<span class="sig-kwarg">**options</span>)</span>
</h3>
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>object</b></code> -
The object to document. <code>object</code> can be a module, a
class, a function, a method, or a property; or it can be the <a
href="epydoc.uid.UID-class.html"
class="link"><code>UID</code></a> of any object; or it can be a
<a href="epydoc.uid.Link-class.html"
class="link"><code>Link</code></a> to any object.
<dd><code><b>error_stream</b></code> -
A file or stream where errors and warnings will be written. If
<code>error_stream</code> is unspecified, then warnings and
errors are discarded.
<dd><code><b>show_private</b></code> -
If true, then include private objects in the output; if false,
then only include public objects.
<dd><code><b>body_only</b></code> -
If true, then don't include navigation bars and breadcrumbs
when generating the HTML documentation for a module or a class.
If false, then do include them.
<dd><code><b>options</b></code> -
Options for the <code>HTMLFormatter</code> object that will be
used to generate the HTML. See <a
href="epydoc.html.HTMLFormatter-class.html#__init__"
class="link"><code>HTMLFormatter.__init__</code></a> for a
complete list of options.
</dd>
</dl>
<dl><dt><b>Returns:</b></dt>
<dd>
A string containing the HTML documentation for the given
object.
</dd>
</dl>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="epydoc-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 2.0</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Sat Mar 20 17:46:11 2004</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>
|