From f7f7d5c4f067eed9489f976cf6b2dfc038f83166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 30 Jun 2014 11:18:22 +0200 Subject: [PATCH] We want the year in the docs to always be current --- docs/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 85e8d0c7..73af7be0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,11 @@ # serve to show the default. import sys, os +import octoprint._version +from datetime import date + +year_since = 2013 +year_current = date.today().year # 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 @@ -42,14 +47,13 @@ master_doc = 'index' # General information about the project. project = u'OctoPrint' -copyright = u'2013, Gina Häußge' +copyright = u'%d-%d, Gina Häußge' % (year_since, year_current) if year_current > year_since else u'%d, Gina Häußge' % year_since # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -import octoprint._version version = octoprint._version.get_versions()["version"] # The full version, including alpha/beta/rc tags. release = version