We want the year in the docs to always be current
This commit is contained in:
parent
85fc2b2666
commit
f7f7d5c4f0
1 changed files with 6 additions and 2 deletions
|
|
@ -12,6 +12,11 @@
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
import sys, os
|
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,
|
# 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
|
# 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.
|
# General information about the project.
|
||||||
project = u'OctoPrint'
|
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
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
import octoprint._version
|
|
||||||
version = octoprint._version.get_versions()["version"]
|
version = octoprint._version.get_versions()["version"]
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue