diff --git a/Apol-Topics/app.py b/Apol-Topics/app.py new file mode 100644 index 0000000..542a222 --- /dev/null +++ b/Apol-Topics/app.py @@ -0,0 +1,20 @@ +#!flask/bin/python +from flask import Flask, request, render_template +import os +import subprocess +import re + +app = Flask(__name__) + +@app.route('/') +def my_form(): + return render_template('my-form.html') + +@app.route('/', methods=['POST']) +def form_post(): + command = "python apol-choice.py" + topics = subprocess.check_output(command, shell=True) + return topics + +if __name__ == '__main__': + app.run(host= '0.0.0.0') diff --git a/Apol-Topics/templates/my-form.html b/Apol-Topics/templates/my-form.html new file mode 100644 index 0000000..7ebba3c --- /dev/null +++ b/Apol-Topics/templates/my-form.html @@ -0,0 +1,11 @@ +
+

Hit the Button For Random Apol Topics

+
+ +
+