diff options
Diffstat (limited to 'doc/build/runhtml.py')
-rwxr-xr-x | doc/build/runhtml.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/doc/build/runhtml.py b/doc/build/runhtml.py index 591e3b7f7..c5b34e4bf 100755 --- a/doc/build/runhtml.py +++ b/doc/build/runhtml.py @@ -1,15 +1,13 @@ #!/usr/bin/env python
import sys,re,os
-print "Running txt2myt.py..."
-execfile("txt2myt.py")
+"""starts an HTTP server which will serve generated .myt files from the ./components and
+./output directories."""
-print "Generating docstring data"
-execfile("compile_docstrings.py")
component_root = [
{'components': './components'},
- {'content' : './content'}
+ {'content' : './output'}
]
doccomp = ['document_base.myt']
output = os.path.dirname(os.getcwd())
@@ -18,15 +16,16 @@ sys.path = ['./lib/'] + sys.path import myghty.http.HTTPServerHandler as HTTPServerHandler
+port = 8080
httpd = HTTPServerHandler.HTTPServer(
- port = 8080,
-
+ port = port,
handlers = [
- {'.*(?:\.myt|/$)' : HTTPServerHandler.HSHandler(path_translate=[(r'^/$', r'/index.myt')], data_dir = './cache', component_root = component_root)},
+ {'.*(?:\.myt|/$)' : HTTPServerHandler.HSHandler(path_translate=[(r'^/$', r'/index.myt')], data_dir = './cache', component_root = component_root, output_encoding='utf-8')},
],
docroot = [{'.*' : '../'}],
)
-
+
+print "Listening on %d" % port
httpd.serve_forever()
|