commit 327e007d9c6c8c94f3f2115b1b0d9f2e4a3bb19b
parent e759ffb1822a3cd2889ada46289e191cc3cb88b9
Author: John Kubach <johnkubach@gmail.com>
Date: Thu, 4 Apr 2019 11:41:31 -0400
Code cleanup
Diffstat:
1 file changed, 0 insertions(+), 9 deletions(-)
diff --git a/src/python/main.py b/src/python/main.py
@@ -17,10 +17,6 @@ app.config['MYSQL_DATABASE_DB'] = 'curricular_management'
app.config['MYSQL_DATABASE_HOST'] = 'localhost'
mysql.init_app(app)
-
-# cursor.execute("SELECT * from proposal")
-# data = cursor.fetchone()
-
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
def allowed_file(filename):
@@ -51,17 +47,12 @@ def index():
filename = secure_filename(file.filename)
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
- # doctype = request.form.get('doc_select')
-
if filename.endswith('.pdf'):
- # doctype = "-s"
cmd = "./archiver.sh -n " + uname + " -f " + filename + " " + doctype
if filename.endswith('.docx'):
conv = "soffice --convert-to pdf /tmp/" + filename + " --outdir " + UPLOAD_FOLDER + " --headless"
subprocess.call(conv, shell=True)
- uname = "Kubach"
- # doctype = "-s"
cmd = "./archiver.sh -n " + uname + " -f " + filename.replace(".docx",".pdf") + " " + doctype
if filename.endswith('png'):