]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Simplify and improve viewing of public transport.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 26 Oct 2021 09:23:03 +0000 (11:23 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 26 Oct 2021 09:23:03 +0000 (11:23 +0200)
wrpylib/templates/sledrun_wiki.txt

index a62d7c7c147be626a74b20093f41de6eeea8bb10..ae04836069ff0e72d2704b19caa09c63fb34a8e8 100644 (file)
@@ -64,7 +64,7 @@
 ''Hier wird die Anreise mit öffentlichen Verkehrsmitteln beschrieben.''
 {%- endif %}
 
-{% for pt_stop in sledrun_json.get('public_transport_stops', []) -%}
+{% for pt_stop in public_transport_stops -%}
 * {{ h.list_template('Haltestelle', [pt_stop.get('name', ''), '', h.json_pos_ele_position(pt_stop.get('position', '')), h.json_pos_ele_elevation(pt_stop.get('position', ''))]) }}
 {% for template_name in ['monitor_template', 'route_arrival_template', 'route_departure_template'] -%}
 {% if template_name in pt_stop -%}
 {% endif %}
 {%- endfor %}
 {%- endfor -%}
-{% for pt_line in sledrun_json.get('public_transport_lines', []) -%}
+{% for pt_line in public_transport_lines -%}
 {% if loop.first -%}
 * '''Fahrplan''':
-{% endif -%}
+{%- endif %}
 ** {% if pt_line.timetable_template is defined %}{{ h.json_template(pt_line.timetable_template) }}
    {%- else %}{{ pt_line.name }}{% endif %}
 {%- endfor %}