From e7352b0551ab75dc02aa2193f611457d11d85bf9 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 15 Aug 2015 12:16:42 -0400 Subject: [PATCH] initial commit --- static/index.css | 13 +++++++++++++ templates/index.html | 27 +++++++++++++++++++++++++++ wallDisplay.py | 19 +++++++++++++++++++ wallDisplay.wsgi | 1 + 4 files changed, 60 insertions(+) create mode 100644 static/index.css create mode 100644 templates/index.html create mode 100644 wallDisplay.py create mode 100644 wallDisplay.wsgi diff --git a/static/index.css b/static/index.css new file mode 100644 index 0000000..6aeae86 --- /dev/null +++ b/static/index.css @@ -0,0 +1,13 @@ +body { + background-color: black; + color: white; +} + +iframe { + display:inline-block; +} + +iframe.embed { + filter: url("data:image/svg+xml;utf8,#invert"); + -webkit-filter: invert(100%); +} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e51f1db --- /dev/null +++ b/templates/index.html @@ -0,0 +1,27 @@ + + + Test App + + + + +

TODO:

+ +

HW:

+ + + + diff --git a/wallDisplay.py b/wallDisplay.py new file mode 100644 index 0000000..b885137 --- /dev/null +++ b/wallDisplay.py @@ -0,0 +1,19 @@ +from flask import Flask +from flask import render_template +app = Flask(__name__) + +todo_file = "/home/adam/Sync/todo/todo.txt" +num_lines = 5 + +@app.route("/") +def index(): + with open(todo_file) as f: + lines = [i for i in f.read().splitlines() if not i == ""] + lines.sort() + todo = lines[:num_lines] + hw = [i for i in lines if "+hw" in i][:num_lines] + print(hw) + return render_template('index.html', todo = todo, hw = hw) + +if __name__ == "__main__": + app.run(debug=True, host='0.0.0.0') diff --git a/wallDisplay.wsgi b/wallDisplay.wsgi new file mode 100644 index 0000000..d4aa636 --- /dev/null +++ b/wallDisplay.wsgi @@ -0,0 +1 @@ +from wallDisplay import app as application