Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Extract transactions from Nordea Finnair Plus Mastercard PDF

License

Notifications You must be signed in to change notification settings

venikx/nordea-finnair-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parser for the Nordea Finnair Plus Mastercard

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.

Status

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.

Add tests with example pdf’s

Support pdf’s generated by Firefox

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.

Usage

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

Nix(OS)

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

Plain pip

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