|
@@ -45,9 +45,9 @@ with open("ergebnis.csv", 'w', newline='') as csvfile:
|
|
|
print("Beginne mit " + file + " alles guddes!")
|
|
print("Beginne mit " + file + " alles guddes!")
|
|
|
spamwriter.writerow([str(file)])
|
|
spamwriter.writerow([str(file)])
|
|
|
out = convert_pdf_to_txt(file)
|
|
out = convert_pdf_to_txt(file)
|
|
|
- file = open("testfile.txt","w", encoding='utf-8')
|
|
|
|
|
- file.write(out)
|
|
|
|
|
- file.close()
|
|
|
|
|
|
|
+ #file = open("testfile.txt","w", encoding='utf-8')
|
|
|
|
|
+ #file.write(out)
|
|
|
|
|
+ #file.close()
|
|
|
matches = re.finditer(regex, out, re.MULTILINE | re.DOTALL)
|
|
matches = re.finditer(regex, out, re.MULTILINE | re.DOTALL)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -56,6 +56,8 @@ with open("ergebnis.csv", 'w', newline='') as csvfile:
|
|
|
|
|
|
|
|
for matchNum, match in enumerate(matches, start=1):
|
|
for matchNum, match in enumerate(matches, start=1):
|
|
|
##print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
|
|
##print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
|
|
|
|
|
+ if match.group(3) == "Kran 21 t":
|
|
|
|
|
+ continue
|
|
|
spamwriter.writerow([str("=\"" + match.group(1) + "\"")] + [str(match.group(4)).replace(",",",")] + [str(match.group(3)).replace(",",",")])
|
|
spamwriter.writerow([str("=\"" + match.group(1) + "\"")] + [str(match.group(4)).replace(",",",")] + [str(match.group(3)).replace(",",",")])
|
|
|
print ("Tour " + str(i) + "," + str(match.group(1)) + "," + str(match.group(3)).replace(",","."))
|
|
print ("Tour " + str(i) + "," + str(match.group(1)) + "," + str(match.group(3)).replace(",","."))
|
|
|
daily = daily + float(match.group(4).replace(",","."))
|
|
daily = daily + float(match.group(4).replace(",","."))
|