bjoern@0: # -*- coding: utf-8 -*- bjoern@0: bjoern@0: from flask import Flask bjoern@0: bjoern@0: from odfcast.convert import ConvertView bjoern@0: bjoern@0: app = Flask(__name__) bjoern@0: app.config.from_object('odfcast.settings') bjoern@0: app.config.from_envvar('ODFCAST_SETTINGS', silent=True) bjoern@0: bjoern@0: bjoern@0: app.add_url_rule("/convert/", bjoern@0: view_func=ConvertView.as_view( bjoern@0: "convert", bjoern@0: app.config["PY3O_UNO_DRIVER"], bjoern@0: app.config["PY3O_UNO_SERVER_HOSTNAME"], bjoern@0: app.config["PY3O_UNO_SERVER_PORT"], bjoern@0: )) bjoern@0: bjoern@0: if __name__ == "__main__": bjoern@0: app.run()