summaryrefslogtreecommitdiffstats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-07-11 10:36:06 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-07-11 10:36:06 +0200
commit97c66c2aee58370044b6444251266d7177caab9e (patch)
treeb491fa86d2e9e34ccea9cb62854f04741f1fc033 /docs/conf.py
parent802046908ae2b39c25fa11a056a02fecb0f20a38 (diff)
downloaduca-97c66c2aee58370044b6444251266d7177caab9e.tar.gz
uca-97c66c2aee58370044b6444251266d7177caab9e.tar.bz2
uca-97c66c2aee58370044b6444251266d7177caab9e.tar.xz
uca-97c66c2aee58370044b6444251266d7177caab9e.zip
Move to Sphinx-based documentation
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..ac1a43e
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+def get_version():
+ patterns = [
+ r'^set\(UCA_VERSION_MAJOR "(\d*)"\)',
+ r'^set\(UCA_VERSION_MINOR "(\d*)"\)',
+ r'^set\(UCA_VERSION_PATCH "(\d*)"\)'
+ ]
+ version = ["0", "0", "0"]
+
+ with open('../CMakeLists.txt', 'r') as f:
+ lines = f.readlines()
+ major_pattern = r'^set\(UCA_VERSION_MAJOR "(\d*)"\)'
+
+ for line in lines:
+ for i, pattern in enumerate(patterns):
+ m = re.match(pattern, line)
+
+ if m:
+ version[i] = m.group(1)
+
+ return '.'.join(version)
+
+extensions = []
+templates_path = ['_templates']
+source_suffix = '.rst'
+master_doc = 'index'
+
+project = u'libuca'
+copyright = u'2014, Matthias Vogelgesang'
+
+version = get_version()
+release = version
+
+exclude_patterns = ['_build']
+pygments_style = 'sphinx'
+
+html_theme = 'default'
+
+html_static_path = ['_static']
+htmlhelp_basename = 'libucadoc'
+
+latex_documents = [
+ ('index', 'libuca.tex', u'libuca Documentation',
+ u'Matthias Vogelgesang', 'manual'),
+]
+
+man_pages = [
+ ('index', 'libuca', u'libuca Documentation',
+ [u'Matthias Vogelgesang'], 1)
+]