|
@@ -12,6 +12,9 @@
|
|
|
# serve to show the default.
|
|
|
|
|
|
import sys, os
|
|
|
+from datetime import date
|
|
|
+import string
|
|
|
+from shutil import copy
|
|
|
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
@@ -20,6 +23,24 @@ if not os.getenv('GISBASE'):
|
|
|
sys.exit("GISBASE not defined")
|
|
|
sys.path.insert(0, os.path.abspath(os.path.join(os.environ['GISBASE'], 'etc', 'python', 'grass')))
|
|
|
|
|
|
+from grass.script import core
|
|
|
+
|
|
|
+footer_tmpl = string.Template(\
|
|
|
+r"""
|
|
|
+{% block footer %}<hr class="header">
|
|
|
+<p><a href="../index.html">Help Index</a> | <a href="../topics.html">Topics Index</a> | <a href="../keywords.html">Keywords Index</a> | <a href="../full_index.html">Full Index</a></p>
|
|
|
+<p>© 2003-${year} <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${grass_version} Reference Manual</p>
|
|
|
+{% endblock %}
|
|
|
+""")
|
|
|
+
|
|
|
+grass_version = core.version()['version']
|
|
|
+today = date.today()
|
|
|
+
|
|
|
+copy("_templates/layout.html.template", "_templates/layout.html")
|
|
|
+with open("_templates/layout.html", "a+b") as f:
|
|
|
+ f.write(footer_tmpl.substitute(grass_version=grass_version, year=today.year))
|
|
|
+ f.close()
|
|
|
+
|
|
|
# -- General configuration -----------------------------------------------------
|
|
|
|
|
|
# If your documentation needs a minimal Sphinx version, state it here.
|
|
@@ -50,9 +71,9 @@ copyright = u'2012-2014, Pietro Zambelli'
|
|
|
# built documents.
|
|
|
#
|
|
|
# The short X.Y version.
|
|
|
-version = '0.2'
|
|
|
+#version = '0.2'
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
-release = 'beta'
|
|
|
+#release = 'beta'
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
# for a list of supported languages.
|
|
@@ -100,7 +121,7 @@ intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)}
|
|
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
# a list of builtin themes.
|
|
|
-html_theme = 'default'
|
|
|
+html_theme = 'traditional'
|
|
|
|
|
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
|
# further. For a list of options available for each theme, see the
|
|
@@ -140,7 +161,7 @@ html_static_path = ['_static']
|
|
|
#html_use_smartypants = True
|
|
|
|
|
|
# Custom sidebar templates, maps document names to template names.
|
|
|
-#html_sidebars = {}
|
|
|
+html_sidebars = {"**":["localtoc.html",'relations.html','searchbox.html']}
|
|
|
|
|
|
# Additional templates that should be rendered to pages, maps page names to
|
|
|
# template names.
|