edit tt display, tweak css

This commit is contained in:
2025-08-25 23:57:12 +02:00
parent ddef1be220
commit 21a11211c3
6 changed files with 263 additions and 208 deletions

13
app.py
View File

@@ -1,4 +1,4 @@
from flask import Flask, render_template, url_for, jsonify, send_file
from flask import Flask, render_template, url_for, jsonify, send_file, request
from datetime import datetime
from pathlib import Path
@@ -18,6 +18,8 @@ def compile_javascript(base_path = "static"):
return js_files
eva = 8002377
# eva = 8004158
app = Flask(__name__)
@@ -28,19 +30,16 @@ def favicon():
@app.route("/")
def main_page():
# print(compile_javascript())
tt = Timetable(eva)
tt.get_changes()
return render_template(
'base.html',
title="testin",
station="Gröbenzell",
station=tt.station,
current_time_str=datetime.now().strftime(r"%H:%M:%S"),
js_files=compile_javascript()
)
# TODO: add a text entry field to change the EVA
# @app.route("/setup")
# def setup():
# return ""
@app.route("/update", methods=['POST'])
def update():