Kaynağa Gözat

'nnyverter.py' ändern

fixed regex für emissionen
tsi 2 yıl önce
ebeveyn
işleme
6962cbf666
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 3
      nnyverter.py

+ 2 - 3
nnyverter.py

@@ -33,8 +33,7 @@ def convert_pdf_to_txt(path):
     retstr.close()
     return text
 
-regex = r"^Tour Nr:\n\n(\d*)\n\nAbfahrt:.*?(?!(StellPl.|StellPl))\nFahrzeugTyp:\s(.*?)\nR-Tour.*?\nMaut.*?^(\d*(,\d*)?|0)\sKM$"
-
+regex = r"^Tour Nr:\n\n(\d*)\n\nAbfahrt:.*?(?!(StellPl.|StellPl))\nFahrzeugTyp:\s(.*?)\nR-Tour.*?\nMaut.*?\nEmission.*?^(\d*(,\d*)?|0)\s(?:km|KM)$"
 
 total = 0.0
 total_15 = 0.0
@@ -45,7 +44,7 @@ print(" | '_ \| '_ \| | | \ \ / / _ \ '__| __/ _ \ '__|")
 print(" | | | | | | | |_| |\ V /  __/ |  | ||  __/ |   ")
 print(" |_| |_|_| |_|\__, | \_/ \___|_|   \__\___|_|   ")
 print("              |___/                         ")
-print("                             2023                      ")
+print("                             Version 2023.1                 ")
 print("       moin")
 print("")
 print("Spruch des Tages:")