v, w = rbb['Aufstieg getrennt']
if v is not None:
sledrun_json['walkup_separate'] = tristate_german_to_str(v)
- optional_set(sledrun_json, 'walkup_comment', w)
+ optional_set(sledrun_json, 'walkup_note', w)
optional_set(sledrun_json, 'walkup_time', rbb['Gehzeit'])
walkup_support_rbb = rbb['Aufstiegshilfe']
if walkup_support_rbb is not None:
walkup_supports = []
- for walkup_support_type, comment in walkup_support_rbb:
+ for walkup_support_type, note in walkup_support_rbb:
walkup_support = {'type': walkup_support_type}
- optional_set(walkup_support, 'comment', comment)
+ optional_set(walkup_support, 'note', note)
walkup_supports.append(walkup_support)
sledrun_json['walkup_supports'] = walkup_supports
_walkup_support()
v, w = rbb['Beleuchtungsanlage']
if v is not None:
sledrun_json['nightlight_possible'] = tristate_german_to_str(v)
- optional_set(sledrun_json, 'nightlight_possible_comment', w)
+ optional_set(sledrun_json, 'nightlight_possible_note', w)
v, w = rbb['Beleuchtungstage']
optional_set(sledrun_json, 'nightlight_weekdays_count', v)
- optional_set(sledrun_json, 'nightlight_weekdays_comment', w)
+ optional_set(sledrun_json, 'nightlight_weekdays_note', w)
def _sled_rental():
v = rbb['Rodelverleih']
if v is not None:
sledrun_json['sled_rental_direct'] = v != []
w = []
- for name, comment in v:
+ for name, note in v:
x = {}
name_code = mwparserfromhell.parse(name)
wiki_link = next(name_code.ifilter_wikilinks(), None)
x['wr_page'] = wikilink_to_json(wiki_link)
else:
x['name'] = name
- optional_set(x, 'comment', comment)
+ optional_set(x, 'note', note)
w.append(x)
sledrun_json['sled_rental'] = w
_sled_rental()
ws = sledrun_json.get('walkup_supports')
if ws is None:
return None
- return [(w['type'], w.get('comment')) for w in ws]
+ return [(w['type'], w.get('note')) for w in ws]
def rodelverleih() -> Optional[List[Tuple[str, Optional[str]]]]:
v = sledrun_json.get('sled_rental')
w = []
for x in v:
n = x.get('name')
- c = x.get('comment')
+ c = x.get('note')
p = x.get('wr_page')
if p is not None:
n = Jinja2Tools().json_wr_page(p)
('Gehzeit', sledrun_json.get('walkup_time')),
('Aufstiegshilfe', aufstiegshilfe()),
('Beleuchtungsanlage', (opt_tristate_german_from_str(sledrun_json.get('nightlight_possible', '')),
- sledrun_json.get('nightlight_possible_comment'))),
+ sledrun_json.get('nightlight_possible_note'))),
('Beleuchtungstage', (sledrun_json.get('nightlight_weekdays_count'),
- sledrun_json.get('nightlight_weekdays_comment'))),
+ sledrun_json.get('nightlight_weekdays_note'))),
('Rodelverleih', rodelverleih()),
('Gütesiegel', cachet()),
('Webauskunft', webauskunft()),