The monthly Finnair Plus Mastercard transactions are sent as a PDF. The parser
converts the transactions from the invoicer’s breakdown pdf
into csv
format,
so the transactions can be imported into beancount using hledger’s importer.
It’s a plain csv, so as long as the service or program accepts csv files to import transactions you’ll be able to convert it.
The parser has been tested on the Nordea Finnair Plus Mastercard invoicer’s breakdown from June 2022. The pdfs are generated using Brave Browser, so I assume any Chrome based browser would work. Unfortunately Firefox doesn’t work.
At the moment downloading pdf’s with Firefox result in encoding issues, and I’m not familiar as to why it’s happening, nor do I have a need to solve it.
It’s an issue with pdfplumber
, pdfminer.six
, and also persists in
pdf.js-extract
.
Clone it first, and cd
into the folder.
- SSH:
git clone [email protected]:venikx/nordea-finnair-parser.git
- HTTPS:
git clone https://github.com/venikx/nordea-finnair-parser.git
I’ve added a default.nix
which builds a python file where the dependencies
defined in requirements.txt
are wrapped together with the code for the nordea
parser. So, that means you can run that python script from anywhere, and doesn’t
need pip to run as it was already built.
nix-build
./result/bin/parse.py 20220630-nordea-finnair.pdf
I’m not too familiar with the Python ecosystem and especially package management (like pip), so let me know if this doesn’t work
pip install -t requirements.txt
python parse.py 20220630-nordea-finnair.pdf