conference-check/web_view.py

26 lines
563 B
Python
Executable file

#!/usr/bin/python3
"""When conference websites appeared."""
import flask
from conference import LiveConference, load_yaml
app = flask.Flask(__name__)
app.debug = False
@app.route("/")
async def index() -> str:
"""Index page."""
conferences = load_yaml("conferences")
live: list[LiveConference] = load_yaml("live")
for c in live:
c["url"] = conferences[c["conference"]].format(year=c["year"])
return flask.render_template("index.html", live=live, conferences=conferences)
if __name__ == "__main__":
app.run(host="0.0.0.0")