]> Shamusworld >> Repos - ardour-manual/blobdiff - servit.py
Remove dependency on external http server for local viewing
[ardour-manual] / servit.py
diff --git a/servit.py b/servit.py
new file mode 100755 (executable)
index 0000000..0b7f701
--- /dev/null
+++ b/servit.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python3
+#
+# Script to locally host the manual as a simple http site
+
+import os
+import cherrypy
+
+PATH = os.path.abspath(os.path.dirname(__file__))
+
+class Root(object):
+       pass
+
+cherrypy.tree.mount(Root(), '/', config={
+       '/': {
+               'tools.staticdir.on': True,
+               'tools.staticdir.dir': os.path.join(PATH, 'website'),
+               'tools.staticdir.index': 'index.html',
+       },
+})
+
+cherrypy.engine.start()
+cherrypy.engine.block()