Commit e11b0f00 authored by Arman Sobhi's avatar Arman Sobhi

Merge branch 'master' of gitlab.com:asobhi/GAS-gui

parents 8e2221d3 caf0abca
venv/
*temp*
*.pyc
*~
\ No newline at end of file
import os
import re
import gradaudit.gradaudit as gradaudit
from flask import Flask, render_template, request
app = Flask(__name__)
......@@ -22,8 +25,18 @@ def submit():
'{5}\n'.format(name,
degree, major, year, spec,
classes)
student_data = gradaudit.parse_transcript(transcript)
with open('temp.csv', 'w') as fil:
fil.write(transcript)
response = os.popen('./response.sh').read()
return transcript+response
main_contents = gradaudit.gen_main(*student_data)
with open('main.lp','w') as main_file:
main_file.write(main_contents)
response = os.popen('sasp main.lp').read()
can_grad = 'ableToGraduate({0})'.format(name) in response
reqClasses = re.findall('[a-zA-z]+[1-4][0-9][0-9V][0-9]',response)
return render_template('GASTemplate.html',
ableToGraduate=can_grad,
studentName=name,
requiredClasses=reqClasses,
degree=major)
Subproject commit d345650ea9aa8471ca5a968010c41fc66c623dd6
Subproject commit a5835170b08901c4248b0c4a28a632892b38776c
cp temp.csv gradaudit/transcripts/
cd gradaudit
python2 main_writer.py transcripts/temp.csv
sasp main.lp
......@@ -12,11 +12,11 @@
<li>{{class}}</li>
{% endfor %}
</ul>
{% endif}
{% endif %}
{# Variables Needed #}
{# ableToGraduate: boolean variable for whether or not a student can graduate #}
{# studentName: name of student as a string #}
{# requiredClasses: array of strings of classes needed to take #}
</body>
</html>
\ No newline at end of file
</html>
Markdown is supported
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