- Set up credentials and config file
- Install poetry: https://python-poetry.org/docs/
- Install chocolatey https://chocolatey.org/install
- Then install poppler using choco: choco install poppler
from pdf2image import convert_from_path
images = convert_from_path("mypdf.pdf", 500,poppler_path=r'C:\Program Files\poppler-0.68.0\bin')
for i, image in enumerate(images):
fname = 'image'+str(i)+'.png'
image.save(fname, "PNG")
- Run in terminal:
poetry run python GCloud/parse_all.py --settings receipt_parser.conf
- Before scanning fold receipt from the last item line down to the date (just after barcode) and scan like that (One day I'll remove that bit with code...maybe)
- You might need to adjust the BLACKLIST
- Keep an eye on the numbers. Mostly the tool runns like a charm, but sometimes hiccups and mix things up. Double check numbers are alligning with the receipt total
[sheets]
spreadsheet_id = <'from url of your spreadsheet'>
spreadsheet_range = Sheet1!A:Z
oauth_token = <'path to your token'>.json
oauth_pickle = <'path to your token'>.json
[drive]
receipts_path = <'path to your folder in Google Drive'>