[Epydoc-commits] SF.net SVN: epydoc: [1770] trunk/epydoc/src/epydoc
Brought to you by:
edloper
|
From: <ed...@us...> - 2008-02-24 03:42:22
|
Revision: 1770
http://epydoc.svn.sourceforge.net/epydoc/?rev=1770&view=rev
Author: edloper
Date: 2008-02-23 19:42:20 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
- Added --no-submodule-list option
Modified Paths:
--------------
trunk/epydoc/src/epydoc/cli.py
trunk/epydoc/src/epydoc/docwriter/html.py
trunk/epydoc/src/epydoc/docwriter/latex.py
Modified: trunk/epydoc/src/epydoc/cli.py
===================================================================
--- trunk/epydoc/src/epydoc/cli.py 2008-02-24 03:41:21 UTC (rev 1769)
+++ trunk/epydoc/src/epydoc/cli.py 2008-02-24 03:42:20 UTC (rev 1770)
@@ -152,7 +152,7 @@
external_api=[], external_api_file=[], external_api_root=[],
redundant_details=False, src_code_tab_width=8, verbosity=0,
include_timestamp=True, target={}, default_target=None,
- pdfdriver='auto')
+ pdfdriver='auto', show_submodule_list=True)
# append_const is not defined in py2.3 or py2.4, so use a callback
# instead, with the following function:
@@ -314,12 +314,21 @@
action='store_true', dest='include_log',
help=("Include a page with the process log (epydoc-log.html)"))
- generation_group.add_option(
- '--redundant-details',
+ generation_group.add_option('--redundant-details',
action='store_true', dest='redundant_details',
help=("Include values in the details lists even if all info "
"about them is already provided by the summary table."))
+ generation_group.add_option('--show-submodule-list',
+ action='store_true', dest='show_submodule_list',
+ help="Include a list of submodules on package documentation "
+ "pages. (default)")
+
+ generation_group.add_option('--no-submodule-list',
+ action='store_false', dest='show_submodule_list',
+ help="Do not nclude a list of submodules on package "
+ "documentation pages.")
+
output_group = OptionGroup(optparser, 'Output Options')
optparser.add_option_group(output_group)
@@ -636,6 +645,8 @@
options.include_log = _str_to_bool(val, optname)
elif optname in ('redundant-details', 'redundant_details'):
options.redundant_details = _str_to_bool(val, optname)
+ elif optname in ('submodule-list', 'submodule_list'):
+ options.show_submodule_list = _str_to_bool(val, optname)
# Output options
elif optname == 'name':
Modified: trunk/epydoc/src/epydoc/docwriter/html.py
===================================================================
--- trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-24 03:41:21 UTC (rev 1769)
+++ trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-24 03:42:20 UTC (rev 1770)
@@ -376,6 +376,10 @@
"""If true, then include objects in the details list even if all
info about them is already provided by the summary table."""
+ self._show_submodule_list = kwargs.get('show_submodule_list', True)
+ """If true, the include a list of submodules on the package
+ documentation page."""
+
# For use with select_variables():
if self._show_private:
self._public_filter = None
@@ -769,7 +773,7 @@
self.write_standard_fields(out, doc)
# If it's a package, then list the modules it contains.
- if doc.is_package is True:
+ if doc.is_package is True and self._show_submodule_list:
self.write_module_list(out, doc)
# Write summary tables describing the variables that the
Modified: trunk/epydoc/src/epydoc/docwriter/latex.py
===================================================================
--- trunk/epydoc/src/epydoc/docwriter/latex.py 2008-02-24 03:41:21 UTC (rev 1769)
+++ trunk/epydoc/src/epydoc/docwriter/latex.py 2008-02-24 03:42:20 UTC (rev 1770)
@@ -59,6 +59,7 @@
self._top_section = 2
self._index_functions = 1
self._hyperref = 1
+ self._show_submodule_list = kwargs.get('show_submodule_list', True)
self._graph_types = kwargs.get('graphs', ()) or ()
"""Graphs that we should include in our output."""
@@ -341,8 +342,8 @@
self.write_standard_fields(out, doc)
# If it's a package, list the sub-modules.
- if (self._list_submodules and doc.submodules !=
- UNKNOWN and doc.submodules):
+ if (self._list_submodules and self._show_submodule_list and
+ doc.submodules != UNKNOWN and doc.submodules):
self.write_module_list(out, doc)
# Contents.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|