diff --git a/bnp_pdf_statement_parser.py b/bnp_pdf_statement_parser.py index cf9bda3..e036db4 100755 --- a/bnp_pdf_statement_parser.py +++ b/bnp_pdf_statement_parser.py @@ -2,9 +2,11 @@ # Depends on `pdftotext`. -import os, subprocess, re, config +import os +import subprocess +import re -path = f'/home/benjamin/Desktop/bens_folder/bazaar/documents/bnp/RLV_CHQ_{config.RLV_CHQ}' +path = f'/home/benjamin/Desktop/bens_folder/bazaar/documents/bnp/bank_statements/' os.chdir(path) @@ -23,7 +25,7 @@ def execute(command): return subprocess.check_output(command).decode('utf-8') def getTextFromPdf(pdfPath): - return execute(['pdftotext', '-raw', pdfPath, '-') + return execute(['pdftotext', '-raw', pdfPath, '-']) firstLineOfPaymentRegex = re.compile('\d{2}\.\d{2} \d{2}\.\d{2} \d+,\d{2}') endPageAfterTheFirstOneRegex = re.compile('P\. \d+/\d+')