Output StopPointName

Signed-off-by: Markus Birth <markus@birth-online.de>
This commit is contained in:
2025-08-04 17:59:59 +01:00
parent fd877186d7
commit 6c950e768f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
<p>Last update: {{c["ura"]["gmtime"]}} GMT</p> <p>Last update: {{c["ura"]["gmtime"]}} GMT</p>
{% for stop_id in c["stops"] %} {% for stop_id in c["stops"] %}
{% set s = c["stops"][stop_id] %} {% set s = c["stops"][stop_id] %}
<h1>{{s["name"]}}</h1> <h1>{{s["name"]}} (Stop: {{s["stop"]}})</h1>
<div class="towards">(Towards: <b>{{s["towards"]}}</b>)</div> <div class="towards">(Towards: <b>{{s["towards"]}}</b>)</div>
{% for m in s["messages"] %} {% for m in s["messages"] %}
<p class="message">{{m}}</p> <p class="message">{{m}}</p>
+2 -1
View File
@@ -19,7 +19,7 @@ class TflCountdown:
def __init__(self, api_key: str): def __init__(self, api_key: str):
self.api_key = api_key self.api_key = api_key
self.return_list = ["StopPointName", "StopID", "Towards", "LineName", "DestinationText", "EstimatedTime", "MessageText"] self.return_list = ["StopID", "StopPointName", "StopPointIndicator", "Towards", "LineName", "DestinationText", "EstimatedTime", "MessageText"]
self.stop_ids = ["1597", "1598", "11333", "11334"] self.stop_ids = ["1597", "1598", "11333", "11334"]
self.time_now = time.gmtime() * 1000 self.time_now = time.gmtime() * 1000
@@ -102,6 +102,7 @@ class TflCountdown:
result["stops"][stop_id] = { result["stops"][stop_id] = {
"id": stop_id, "id": stop_id,
"name": self.get_field(ld, "StopPointName"), "name": self.get_field(ld, "StopPointName"),
"stop": self.get_field(ld, "StopPointIndicator"),
"towards": self.get_field(ld, "Towards"), "towards": self.get_field(ld, "Towards"),
"lines": {}, "lines": {},
"messages": [] "messages": []