Further QIF moaning
by mark | 1 Oct 2022, 9:35 p.m.
Been bashing QIFs again.
There's a fault with the Quiffen parser. It uses the caret singletons to chunk the QIF into individual records. Unfortunately this means the first record gets dropped as the header row gets used and anything between the header and the first sentinel caret get dropped. Urgh. Wrote some python to make sure the second row of a QIF is a singleton caret, inserting a row if necessary. I'll make a pull at some point.
Next thing is TSB QIFs. These have a couple of interesting features. The date format is ISO yyyy-mm-dd, which is fine, but Quiffen doesn't like it. So I had to write some sed to rewrite these:
sed -E 's/^D([0-9]{4})-([0-9]{2})-([0-9]{2})/D\3-\2-\1/g' tsb.qif
Basically it finds a line DYYYY-MM-DD
and rewrites it DDD-MM-YYYY
.
Another is that the transaction payee and transaction memo are on one line. If a transaction has a memo then it has a 40 char field for the payee and the remainder the memo. Easy enough to deal with but annoying nonetheless.
I've now got a build process for this one QIF. Wrote a makefile to orchestrate everything. It shouldn't be this hard. But it is. None of the free apps actually do what I want so I had to resort to python, regular expressions, make and gnucash to watch my finances. Mad.
Back to all articles