### Run it locally
You may want the manual available on a machine that doesn't have constant
-internet access. You will need `git`, and `python3` installed.
+internet access. You will need `git`, `python3` and `cherrypy` python module installed.
1. Download code and build manual
./build.py
```
-2. Install and configure a web server on your machine. Any web server should
-work, Apache, nginx, etc... The following steps are for nginx, using another
-server means following the same procedure for the server you decide to use.
-
-3. Install [nginx](http://wiki.nginx.org/Install)
-
-4. Configure nginx server block in `/etc/nginx/sites-available/default`
-
+2. Run the following:
```
- server {
- listen 80;
- server_name localhost;
-
- root ...path_to_.../ardour-manual/website;
- index index.html;
- }
+ ./servit.py
```
-5. Restart nginx server
-
- service nginx restart
+3. The manual will now be available at http://127.0.0.1:8080
-6. The manual will now be available at http://localhost
+ (Ctrl-c to quit the server).
### Helper scripts: `implode` and `explode`
--- /dev/null
+#!/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()