Working on MT940 importer
Best, Jan-Pascal van
j.p.vanbest at tbm.tudelft.nl
Fri Sep 12 12:50:22 CDT 2003
> Thanks a lot for working on this topic. However, there has
> already been
> some discussion about this topic in early July, see e.g.
> http://article.gmane.org/gmane.comp.gnome.apps.gnucash.devel/9454
> Have you seen those emails, especially my remark about an
> existing mt940 parser inside the OpenHBCI library?
Yes, I've read those. I looked at the OpenHBCI C API at
http://openhbci.sourceforge.net/doc/api/group__HBCI__APIg.html
but didn't find anything in there to parse MT940 files directly,
so I kind of gave up on that.
Not that I've looked further, the parser in swiftparser.cpp
looks a fine piece of work (though the lex/yacc version looks
cleaner ;-). Can I call the parser directly, without first creating
an HBCI_API object?
It doesn't seem like there is a C wrapper
function available, at least not in core/swiftparser.h. Would it
be possible to create one?
Alternatively, can I use C++ code in the importer
module just to call this function? The code for reading from the file
could be in the gnucash module, just feeding strings to
SWIFTparser::readMT940 and then using trans_list_cb from
gnc-hbci-gettrans.c to turn them into gnucash transactions.
Some more things: is the booking code (you call it "transaction key")
interpreted somewhere? Is there a possibility to allow unstructured
:86: fields (my bank has them)? Maybe the bank-specific parsing should
be done in openhbci instead of in gnucash by the way.
(I'll leave the discussion of interfacing with libmt940 for now, since the
openhbci parser look quite nice and better maintained)
Jan-Pascal
More information about the gnucash-devel
mailing list