From f8337105832d7d22d22dc7dcdb00630f690ba9ab Mon Sep 17 00:00:00 2001 From: Benedikt Morbach Date: Wed, 23 Jul 2014 18:02:53 +0200 Subject: [PATCH] make --suppress-timestamp the default add option to include timestamp --- epydoc/doc/manual-usage.txt | 4 ++-- epydoc/doc/using.html | 5 +++-- epydoc/man/epydoc.1 | 6 +++++- epydoc/src/epydoc/cli.py | 10 +++++++--- epydoc/src/epydoc/docwriter/html.py | 2 +- epydoc/src/epydoc/docwriter/html_css.py | 4 ++-- epydoc/src/epydoc/docwriter/html_help.py | 4 ++-- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/epydoc/doc/manual-usage.txt b/epydoc/doc/manual-usage.txt index 5a845dc..575f212 100644 --- a/epydoc/doc/manual-usage.txt +++ b/epydoc/doc/manual-usage.txt @@ -307,8 +307,8 @@ The following list describes each of the files generated by epydoc: ``epydoc-log.html`` A page with the log of the epydoc execution. It is available clicking on the timestamp below each page, if the documentation was created using the - ``--include-log`` option. The page also contains the list of the options - enabled when the documentation was created. + ``--include-log`` and ``--include-timestamp`` options. The page also + contains the list of the options enabled when the documentation was created. ``api-objects.txt`` A text file containing each available item and the URL where it is diff --git a/epydoc/doc/using.html b/epydoc/doc/using.html index 82c4bf5..76d8a0e 100644 --- a/epydoc/doc/using.html +++ b/epydoc/doc/using.html @@ -384,8 +384,9 @@ class directly.

  • epydoc-log.html A page with the log of the epydoc execution. It is available clicking on the timestamp below each page, if the documentation was created using the - --include-log option. The page also contains the list of the - options enabled when the documentation was created.
  • + --include-log and --include-timestamp options. + The page also contains the list of the options enabled when the documentation + was created.
  • api-objects.txt A text file containing each available item and the URL where it is diff --git a/epydoc/man/epydoc.1 b/epydoc/man/epydoc.1 index 5fbfcf9..4d527dc 100644 --- a/epydoc/man/epydoc.1 +++ b/epydoc/man/epydoc.1 @@ -293,10 +293,14 @@ documentation, instead of including them in the documentation for their modules. This creates a separate LaTeX file for each class, so it can also be useful if you want to include the documentation for one or two classes as sections of your own LaTeX document. +.\" --include-timestamp +.TP +.B \-\-include\-timestamp +Include a timestamp in the generated output. .\" --suppress-timestamp .TP .B \-\-suppress\-timestamp -Do not include a timestamp in the generated output. +ignored, only exists for backwards compatibility. (it is now the default) .RE .PP .\"-------------------------------------------------- diff --git a/epydoc/src/epydoc/cli.py b/epydoc/src/epydoc/cli.py index d7a308c..fbbe5de 100644 --- a/epydoc/src/epydoc/cli.py +++ b/epydoc/src/epydoc/cli.py @@ -152,7 +152,7 @@ def option_defaults(): fail_on=None, exclude=[], exclude_parse=[], exclude_introspect=[], 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, + include_timestamp=False, target={}, default_target=None, pdfdriver='auto', show_submodule_list=True, inherit_from_object=False) # append_const is not defined in py2.3 or py2.4, so use a callback @@ -404,9 +404,13 @@ def parse_arguments(): help=("When generating HTML output, sets the number of spaces " "each tab in source code listings is replaced with.")) + output_group.add_option('--include-timestamp', + action='store_true', dest='include_timestamp', + help=("Include a timestamp in the generated output.")) + output_group.add_option('--suppress-timestamp', - action='store_false', dest='include_timestamp', - help=("Do not include a timestamp in the generated output.")) + action='store_false', dest='ignored_options', + help=("Ignored, only exists for backwards compatibility. (this is now the default)")) # The group of external API options. # Skip if the module couldn't be imported (usually missing docutils) diff --git a/epydoc/src/epydoc/docwriter/html.py b/epydoc/src/epydoc/docwriter/html.py index b6be5f4..e496f56 100644 --- a/epydoc/src/epydoc/docwriter/html.py +++ b/epydoc/src/epydoc/docwriter/html.py @@ -361,7 +361,7 @@ class HTMLWriter: self._include_log = kwargs.get('include_log', False) """Are we generating an HTML log page?""" - self._include_timestamp = kwargs.get('include_timestamp', True) + self._include_timestamp = kwargs.get('include_timestamp', False) """Include a timestamp on the generated docs?""" self._src_code_tab_width = kwargs.get('src_code_tab_width', 8) diff --git a/epydoc/src/epydoc/docwriter/html_css.py b/epydoc/src/epydoc/docwriter/html_css.py index 53923aa..9b0c837 100644 --- a/epydoc/src/epydoc/docwriter/html_css.py +++ b/epydoc/src/epydoc/docwriter/html_css.py @@ -82,8 +82,8 @@ a.link { font-family: monospace; } * variables and to show/hide frames; and a page title (using *

    ). The page title may be followed by a link to the * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. + * - The footer consists of a navigation bar, a timestamp + * (if --include-timestamp was passed), and a pointer to epydoc's homepage. */ h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } h2.epydoc { font-size: +130%; font-weight: bold; } diff --git a/epydoc/src/epydoc/docwriter/html_help.py b/epydoc/src/epydoc/docwriter/html_help.py index 92653b4..50b02a1 100644 --- a/epydoc/src/epydoc/docwriter/html_help.py +++ b/epydoc/src/epydoc/docwriter/html_help.py @@ -185,6 +185,6 @@ are private objects; but "re.sub", if a module defines the "__all__" variable, then its contents are used to decide which objects are private.

    -

    A timestamp below the bottom navigation bar indicates when each -page was last updated.

    +

    If --include-timestamp was passed, a timestamp below the bottom navigation bar indicates +when each page was last updated.

    ''' -- 1.9.3