From 4ac8c5a6f0a235b908814439afe2f6f8c62ac581 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Tue, 12 Jul 2022 21:41:38 +0200 Subject: [PATCH] Allow bus stops with name instead of municipality and name_local. --- wrpylib/templates/sledrun_wikitext.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -%} -- 2.39.5