From: Philipp Spitzer Date: Sun, 13 Mar 2022 13:05:08 +0000 (+0100) Subject: Add nightlight_weekdays_count and nightlight_weekdays_comment. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/9f318cd3e6c84e83adb20e62b28a1cd4526a7e1e Add nightlight_weekdays_count and nightlight_weekdays_comment. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 90cdc49..3201097 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -177,6 +177,12 @@ class SledrunWikiTextToJsonBot( if w is not None: sledrun_json['nightlight_description'] = w + v, w = rbb['Beleuchtungstage'] + if v is not None: + sledrun_json['nightlight_weekdays_count'] = v + if w is not None: + sledrun_json['nightlight_weekdays_comment'] = w + def _sled_rental(): v = rbb['Rodelverleih'] if v is not None: diff --git a/wrpylib/wrmwmarkup.py b/wrpylib/wrmwmarkup.py index 9426e98..8fc3647 100644 --- a/wrpylib/wrmwmarkup.py +++ b/wrpylib/wrmwmarkup.py @@ -482,7 +482,8 @@ def create_sledrun_wiki(sledrun_json: Dict, map_json: Optional[Dict], impression ('Gehzeit', sledrun_json.get('walkup_time')), ('Aufstiegshilfe', aufstiegshilfe()), ('Beleuchtungsanlage', opt_tristate_german_comment_from_str(sledrun_json.get('nightlight_possible', ''))), - ('Beleuchtungstage', nightlightdays_from_str(sledrun_json.get('nightlight_weekdays', ''))), + ('Beleuchtungstage', (sledrun_json.get('nightlight_weekdays_count'), + sledrun_json.get('nightlight_weekdays_comment'))), ('Rodelverleih', rodelverleih()), ('Gütesiegel', cachet()), ('Webauskunft', webauskunft()),