diff options
| author | Martin Vilcans <martin@librador.com> | 2011-09-05 23:09:05 +0200 |
|---|---|---|
| committer | Martin Vilcans <martin@librador.com> | 2011-09-10 20:45:56 +0200 |
| commit | 7d3877f94a8de98a11bcea631b79b6db9b7f47fe (patch) | |
| tree | 637d0b0c2c32494d9426fca9bda20270ff164f6b /server/main.py | |
| parent | 56551b10935c9027d8e1178430f7d8e82e078150 (diff) | |
Removed server code from Screenplain library project.
Diffstat (limited to 'server/main.py')
| -rw-r--r-- | server/main.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/server/main.py b/server/main.py deleted file mode 100644 index f3f5e40..0000000 --- a/server/main.py +++ /dev/null @@ -1,34 +0,0 @@ - -# See http://blog.rutwick.com/use-bottle-python-framework-with-google-app-engine - -from StringIO import StringIO - -import bottle -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('/convert', method='POST') -def DisplayForm(): - response.content_type = 'text/html; charset=utf-8' - input = StringIO(request.forms.get('data')) - output = StringIO() - to_annotated_html(input, output) - return output.getvalue() - -def main(): - debug(True) - run_wsgi_app(bottle.default_app()) - -@error(403) -def Error403(code): - return 'Forbidden!' - -@error(404) -def Error404(code): - return 'Not found' - -if __name__=="__main__": - main() |
