From: Philipp Spitzer Date: Tue, 12 Jul 2022 19:41:38 +0000 (+0200) Subject: Allow bus stops with name instead of municipality and name_local. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/4ac8c5a6f0a235b908814439afe2f6f8c62ac581 Allow bus stops with name instead of municipality and name_local. --- diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index c27faf3..da6bd88 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -122,7 +122,8 @@ Leider ist keine Anreise mit öffentlichen Verkehrsmitteln möglich. {%- endif %} {% for pt_stop in public_transport_stops -%} -* {{ h.list_template('Haltestelle', [pt_stop.municipality, pt_stop.name_local, h.json_pos_ele_position(pt_stop.get('position', {})), h.json_pos_ele_elevation(pt_stop.get('position', {}))]) }} +* {{ h.list_template('Haltestelle', [pt_stop.get('municipality', pt_stop.get('name', '')), pt_stop.get('name_local', ''), + h.json_pos_ele_position(pt_stop.get('position', {})), h.json_pos_ele_elevation(pt_stop.get('position', {}))]) }} {%- if pt_stop.note %} ({{ pt_stop.note }}){% endif %} {% for template_name in ['monitor_template', 'route_arrival_template', 'route_departure_template'] -%} {% if template_name in pt_stop -%}