initial commit
This commit is contained in:
commit
e7352b0551
13
static/index.css
Normal file
13
static/index.css
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
body {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe.embed {
|
||||||
|
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'invert\'><feColorMatrix in='SourceGraphic' type='matrix' values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>#invert");
|
||||||
|
-webkit-filter: invert(100%);
|
||||||
|
}
|
27
templates/index.html
Normal file
27
templates/index.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<head>
|
||||||
|
<title>Test App</title>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
||||||
|
<!-- <meta http-equiv="refresh" content="10"> -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h4>TODO:</h4>
|
||||||
|
<ul>
|
||||||
|
{% for item in todo %}
|
||||||
|
<li>{{ item }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<h4>HW:</h4>
|
||||||
|
<ul>
|
||||||
|
{% for item in hw %}
|
||||||
|
<li>{{ item }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<iframe class="embed" id="forecast" type="text/html" frameborder="0" height="245" width="49%" src="http://forecast.io/embed/#lat=43.515250&lon=-72.110568&name=Home&units=si"> </iframe>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.write ('<p>Current time is: <span id="date-time">', new Date().toLocaleString(), '<\/span>.<\/p>')
|
||||||
|
if (document.getElementById) onload = function () {
|
||||||
|
setInterval ("document.getElementById ('date-time').firstChild.data = new Date().toLocaleString()", 50)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
19
wallDisplay.py
Normal file
19
wallDisplay.py
Normal file
@ -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')
|
1
wallDisplay.wsgi
Normal file
1
wallDisplay.wsgi
Normal file
@ -0,0 +1 @@
|
|||||||
|
from wallDisplay import app as application
|
Loading…
Reference in New Issue
Block a user