Remove config
dependency
This commit is contained in:
parent
6f97554195
commit
480072779c
@ -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+')
|
||||
|
Loading…
Reference in New Issue
Block a user