summaryrefslogtreecommitdiffstats
path: root/templates/layout.txt
blob: 242fd940575cb75bc409410b28d7f2e6bd99fb0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Last updated: {{ data['ResponseData']['LatestUpdate'] }}
{% if data['ResponseData']['StopPointDeviations'] %}
Stop deviations:
{% for d in data['ResponseData']['StopPointDeviations'] %}
{% set stopinfo = d['StopInfo'] %}
{% set deviation = d['Deviation'] %}
  {{ stopinfo['StopAreaName'] }} ({{ stopinfo['TransportMode'] }})
    {{ deviation['ImportanceLevel'] }} :: {{ deviation['Consequence'] }}
      {{ deviation['Text'] }}

{% endfor %}

{% endif %}
{% for transport in ['Trains', 'Metros', 'Buses'] %}
{% if data['ResponseData'][transport] %}
:: {{ transport }} ::
{% for departure in data['ResponseData'][transport] %}
{% if departure['SecondaryDestinationName'] %}
{{ departure['LineNumber'] }} :: {{ departure['Destination'] }} ({{ departure['SecondaryDestinationName'] }}) :: {{ departure['DisplayTime'] }}
{% else %}
{{ departure['LineNumber'] }} :: {{ departure['Destination'] }} :: {{ departure['DisplayTime'] }}
{% endif %}
{% if transport == 'Buses' %}
  Stop: {{ departure['StopPointDesignation'] }}
{% endif %}
{% if 'TimeTabledDateTime' in departure or 'ExpectedDateTime' in departure %}
  Timetable: {{ departure['TimeTabledDateTime'] }}
  Expected:  {{ departure['ExpectedDateTime'] }}
{% endif %}
{% if departure['Deviations'] %}
  Deviations:
  {% for deviation in departure['Deviations'] %}
    {{ deviation['ImportanceLevel'] }} :: {{ deviation['Consequence'] }}
      {{ deviation['Text'] }}
  {% endfor %}
{% endif %}

{% endfor %}
{% endif %}
{% endfor %}