diff main.py @ 0:4a34f72f036b

Add initial conversion service
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 26 Sep 2014 14:21:21 +0200
parents
children 7f546e8a6e7a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.py	Fri Sep 26 14:21:21 2014 +0200
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+from flask import Flask
+
+from odfcast.convert import ConvertView
+
+app = Flask(__name__)
+app.config.from_object('odfcast.settings')
+app.config.from_envvar('ODFCAST_SETTINGS', silent=True)
+
+
+app.add_url_rule("/convert/",
+                 view_func=ConvertView.as_view(
+                     "convert",
+                     app.config["PY3O_UNO_DRIVER"],
+                     app.config["PY3O_UNO_SERVER_HOSTNAME"],
+                     app.config["PY3O_UNO_SERVER_PORT"],
+                 ))
+
+if __name__ == "__main__":
+    app.run()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)