]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Add nightlight_weekdays_count and nightlight_weekdays_comment.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Mar 2022 13:05:08 +0000 (14:05 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Mar 2022 13:05:26 +0000 (14:05 +0100)
bots/sledrun_wikitext_to_json.py
wrpylib/wrmwmarkup.py

index 90cdc49e24c70ec108d7bef1ddc486123c250521..3201097206a72cfda4422faa077cbef57cf1611b 100644 (file)
@@ -177,6 +177,12 @@ class SledrunWikiTextToJsonBot(
             if w is not None:
                 sledrun_json['nightlight_description'] = w
 
             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:
             def _sled_rental():
                 v = rbb['Rodelverleih']
                 if v is not None:
index 9426e9893eadce67101fe195006e82acc952d712..8fc36472dbd3ef3e66b078d622b667bab43e2cfc 100644 (file)
@@ -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', ''))),
         ('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()),
         ('Rodelverleih', rodelverleih()),
         ('Gütesiegel', cachet()),
         ('Webauskunft', webauskunft()),