aboutsummaryrefslogtreecommitdiff
path: root/share/templater/sphinx
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:23:15 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-31 17:23:15 -0200
commit82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4 (patch)
tree4b81210f80e8a3e85a1d65b01beb67f92a727066 /share/templater/sphinx
parent8e83eb20f8841022cf9a221f2e8447cdba1f7270 (diff)
downloadtemplater-82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4.tar.gz
templater-82e6bce4ea8fc61e99f6eb32dc12c470b93dccd4.tar.bz2
New module format
Diffstat (limited to 'share/templater/sphinx')
-rw-r--r--share/templater/sphinx/description1
-rw-r--r--share/templater/sphinx/files/.gitignore (renamed from share/templater/sphinx/.gitignore)0
-rw-r--r--share/templater/sphinx/files/Makefile (renamed from share/templater/sphinx/Makefile)0
-rw-r--r--share/templater/sphinx/files/conf.py (renamed from share/templater/sphinx/conf.py)0
-rwxr-xr-xshare/templater/sphinx/setup44
5 files changed, 45 insertions, 0 deletions
diff --git a/share/templater/sphinx/description b/share/templater/sphinx/description
new file mode 100644
index 0000000..4606250
--- /dev/null
+++ b/share/templater/sphinx/description
@@ -0,0 +1 @@
+Sphinx documentation compiler
diff --git a/share/templater/sphinx/.gitignore b/share/templater/sphinx/files/.gitignore
index e35d885..e35d885 100644
--- a/share/templater/sphinx/.gitignore
+++ b/share/templater/sphinx/files/.gitignore
diff --git a/share/templater/sphinx/Makefile b/share/templater/sphinx/files/Makefile
index 6f8ddaa..6f8ddaa 100644
--- a/share/templater/sphinx/Makefile
+++ b/share/templater/sphinx/files/Makefile
diff --git a/share/templater/sphinx/conf.py b/share/templater/sphinx/files/conf.py
index 6bc7b9a..6bc7b9a 100644
--- a/share/templater/sphinx/conf.py
+++ b/share/templater/sphinx/files/conf.py
diff --git a/share/templater/sphinx/setup b/share/templater/sphinx/setup
new file mode 100755
index 0000000..ec70c1e
--- /dev/null
+++ b/share/templater/sphinx/setup
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Sphinx templater module.
+#
+
+# Parameters
+SHARE="$1"
+
+# Include basic functions
+source $SHARE/templater/functions || exit 1
+
+# Sphinx implementation
+function templater_sphinx {
+ if [ ! -e "conf.py" ]; then
+ __templater_echo "Setting up sphinx..."
+
+ #__templater_checkout_develop
+ __templater_copy_or_append sphinx .gitignore
+
+ cp $SHARE/sphinx/files/conf.py .
+
+ if [ ! -e "Makefile" ]; then
+ cp $SHARE/sphinx/files/Makefile .
+ #elif ! grep -q sphinx Makefile; then
+ # grep -v '^#' $SHARE/sphinx/files/Makefile >> Makefile
+ else
+ cp $SHARE/ikiwiki/files/Makefile Makefile.sphinx
+ fi
+
+ if [ ! -d "_static" ]; then
+ cp -r $SHARE/sphinx/files/_static .
+ fi
+
+ if [ ! -d "_themes" ]; then
+ mkdir _themes
+ git submodule add https://github.com/snide/sphinx_rtd_theme _themes/sphinx_rtd_theme
+ fi
+ else
+ __templater_echo "Sphinx already set"
+ fi
+}
+
+# Dispatch
+templater_sphinx