Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Spot
spot-web-app
Commits
5d87a98c
Commit
5d87a98c
authored
Mar 13, 2019
by
Alexandre Duret-Lutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
server/spotapi.py
server/spotapi.py
+12
-3
No files found.
server/spotapi.py
View file @
5d87a98c
#!/usr/bin/python3
# -*- 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__'
:
app
.
run
(
debug
=
True
,
use_reloader
=
True
,
use_debugger
=
False
)
@
app
.
route
(
'/api/drawword/<path:word>'
)
@
cachecontrol
()
def
drawword
(
word
,
method
=
'GET'
):
result
=
{}
try
:
w
=
spot
.
parse_word
(
word
)
except
SyntaxError
as
e
:
return
jsonify
({
'parse_error'
:
str
(
e
)})
return
jsonify
({
'svg'
:
w
.
as_svg
()})
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
,
use_reloader
=
True
,
use_debugger
=
False
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment