Пример #1
0
 def __init__(self, *args, **kwargs):
     if hasattr(kwargs, "prog"):
         namespace, util = kwargs["prog"].split(None, 1)
         resource_loc = ResourceLocator(namespace=namespace, util=util)
     else:
         resource_loc = ResourceLocator.default()
     kwargs["prog"] = resource_loc.get_util_name()
     if not hasattr(kwargs, "usage"):
         kwargs["usage"] = resource_loc.get_synopsis()
     OptionParser.__init__(self, *args, **kwargs)
     self.add_my_options("debug_mode", "profile_mode",
                         "quietness", "verbosity")
Пример #2
0
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Rose Documentation'
copyright = (': British Crown Copyright 2012-8 Met Office. See Terms of Use. '
             'This document is released under the Open Government Licence')

# The full version for the project you're documenting, acts as replacement for
# |version|.
release = ResourceLocator().get_version(ignore_environment=True)
# The short X.Y version, acts as replacement for |release|.
version = release

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'autumn'


# -- Options for HTML output ----------------------------------------------

html_theme = 'sphinx_rtd_theme'
# rtd_theme only handles 4 levels for the sidebar navigation.