]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Parse "freizeitticket_tyrol" and "regio_card_tyrol".
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 11 Jun 2022 12:04:58 +0000 (14:04 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 11 Jun 2022 12:04:58 +0000 (14:04 +0200)
bots/update_sledrun_json_from_wikitext_corection.py

index bd4431c796d8a5100a2701b185aa9b2007f94104..01311a3f6c709b41ffed2342b4d120d7c2ddf788 100644 (file)
@@ -82,6 +82,12 @@ class UpdateSledrunJsonFromWikiText(
                 correction_name = bb.get('Korrektur_To_Name', None)
                 if isinstance(correction_name, Parameter) and correction_name.value.strip() != "":
                     sledrun_json['correction_name'] = correction_name.value.strip()
                 correction_name = bb.get('Korrektur_To_Name', None)
                 if isinstance(correction_name, Parameter) and correction_name.value.strip() != "":
                     sledrun_json['correction_name'] = correction_name.value.strip()
+                freizeitticket = bb.get('Freizeitticket', None)
+                if isinstance(freizeitticket, Parameter) and freizeitticket.value.strip() == "Ja":
+                    sledrun_json['freizeitticket_tyrol'] = True
+                regiocard = bb.get('Regiocard', None)
+                if isinstance(regiocard, Parameter) and regiocard.value.strip() != "":
+                    sledrun_json['regio_card_tyrol'] = True
 
         _button_bar()
 
 
         _button_bar()