Private
Public Access
1
0

work in progress: now has alternative way to find chart settings

This commit is contained in:
Sander Roosendaal
2017-11-07 17:00:18 +01:00
parent 9561245756
commit 5061cbcd1c

View File

@@ -19,6 +19,9 @@ import yamllint
from subprocess import call
import re
from verbal_expressions import VerEx
import django_rq
queue = django_rq.get_queue('default')
queuelow = django_rq.get_queue('low')
@@ -45,6 +48,29 @@ def cleanbody(body):
return body
def matchchart(line):
results = []
tester = VerEx().start_of_line().find('chart')
tester2 = VerEx().start_of_line().find('chart').anything().find('distance')
tester3 = VerEx().start_of_line().find('chart').anything().find('time')
tester4 = VerEx().start_of_line().find('chart').anything().find('pie')
if tester.match(line):
if tester2.match(line):
return 'distanceplot'
if tester3.match(line):
return 'timeplot'
if tester3.match(line):
return 'pieplot'
def get_plotoptions_body2(uploadoptions,body):
for line in body.splitlines():
chart = matchchart(line)
if chart:
uploadoptions['make_plot'] = True
uploadoptions['plottype'] = chart
def getsyncoptions(uploadoptions,values):
try:
value = values.lower()