Commit 5d87a98c authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

add a drawword route in the server

not yet used in the client
parent cc8daba4
Pipeline #7295 passed with stage
in 1 minute and 57 seconds
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Laboratoire de Recherche et Développement de
# Copyright (C) 2018-2019 Laboratoire de Recherche et Développement de
# l'Epita.
# This application is free software; you can redistribute it and/or
......@@ -643,7 +643,16 @@ def compare(ltlformula, method='GET'):
return jsonify(result)
if __name__ == '__main__':, use_reloader=True, use_debugger=False)
def drawword(word, method='GET'):
result = {}
w = spot.parse_word(word)
except SyntaxError as e:
return jsonify({'parse_error': str(e)})
return jsonify({'svg': w.as_svg()})
if __name__ == '__main__':, use_reloader=True, use_debugger=False)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment