summaryrefslogtreecommitdiff
path: root/server/main.py
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2011-08-24 00:18:14 +0200
committerMartin Vilcans <martin@librador.com>2011-08-24 00:18:14 +0200
commitcd6a0be01d0f09faa55760769a9beee011599240 (patch)
tree94cdf1b3340be291af4686c1bd5e2fc8b82eb113 /server/main.py
parentbeec72fbfa4c462463d354dbc75392a47de77f74 (diff)
Serve annotated HTML from server so we can debug parsing
Diffstat (limited to 'server/main.py')
-rw-r--r--server/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/main.py b/server/main.py
index 6e87e18..f3f5e40 100644
--- a/server/main.py
+++ b/server/main.py
@@ -8,13 +8,14 @@ from bottle import route, template, request, response, error, debug
from google.appengine.ext.webapp.util import run_wsgi_app
from screenplain.export.text import to_text
+from screenplain.export.annotated_html import to_annotated_html
-@route('/text', method='POST')
+@route('/convert', method='POST')
def DisplayForm():
- response.content_type = 'text/plain; charset=utf-8'
+ response.content_type = 'text/html; charset=utf-8'
input = StringIO(request.forms.get('data'))
output = StringIO()
- to_text(input, output)
+ to_annotated_html(input, output)
return output.getvalue()
def main():