Add Web UI to see when conference websites appeared

Closes: #4
This commit is contained in:
Edward Betts 2024-07-21 10:53:22 +09:00
parent 87009c2247
commit 187214cfa1
4 changed files with 114 additions and 26 deletions

25
web_view.py Executable file
View file

@ -0,0 +1,25 @@
#!/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")