-----BEGIN PGP SIGNED MESSAGE----- On Donnerstag, 3. Juli 2003 23:49, Benoit Grégoire wrote: > On July 3, 2003 03:40 pm, you wrote: > > Hi Benoit, I'd like to take a stab at providing MT940 support, do you > > have any tips for importing files with gnucash? > > The first step would be to take a look at the documentation for: the > generic import module, the header files transaction.h and account.h. They > are all documented with doxygen. Those docs live in src/doc/html. To get > them, you can either download a gnucash tarball, they will already be > included. Or you can download gnucash cvs and run make doc (you'll need > doxygen installed if you go this route).
Just to add a note here: The header files are much more documented in the HEAD (experimental/unstable) branch of CVS, which is not available as a tarball. It has to be downloaded from anonymus CVS. The tarballs are from the gnucash-1-8-branch, which is the stable gnucash version (1.8.4 is latest IIRC), but the files in the 1.8-branch are much less documented. I.e. if you look for documentation, please always look into gnucash HEAD. If you want a stable program to test some new code with, you can choose either to use 1.8-branch or HEAD branch. Except for some small changes in header file names (date.h -> gnc-date.h) those two branches are still relatively comparable to each other. > After that, I don't know the scope of the MT940 standard (couldn't find any > info in english or french about it). With a little more info, I may be > able to guide you better. I know SWIFT MT940 from our HBCI work -- it's the data format in which the banks send us the transaction reports. We have (well, Martin Preuss has) therefore a MT940 parser in the LGPL library OpenHBCI, http://www.openhbci.de , parser in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/openhbci/openhbci/src/openhbci/core/swiftparser.cpp?rev=1.22&content-type=text/vnd.viewcvs-markup However, that code is in C++ and the results are of course stored in OpenHBCI's internal data structures. On the other hand OpenHBCI comes with a full C wrapper layer. You might be interested in the code in gnucash's src/import-export/hbci/gnc-hbci-gettrans.c, function trans_list_cb() -- this is where the HBCI transaction report entries get converted into gnucash Transactions. If you don't have any MT940 parser currently at hand, it might be worth a try to extend OpenHBCI's swiftparser.cpp so that it also accepts a character buffer (that was read from a file) as data source, and can then be treated just as the existing import-export/hbci code already does. I'm one of the developers of OpenHBCI, so if you have any suggestions like that (which would a) increase our developer/ user base and b)improve our parser code) they might well be picked up quickly. > Actual programming would be in C, in a new import module. If you are > serious about coding it, I'll be happy to create and commit a new skeleton > import module to jump start you (including menu item, file selection and > build system integration). Of course Benoit is probably much better than me for file importing (cause that's what he already implemented in gnucash), so this offer sounds well worth a try :-) Christian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iQCVAwUBPwSvwmXAi+BfhivFAQFXewP/dx72EMWOgxF64a6bgTnku4U185FPt5+a vM6UXQgFH6XPi3ln86rkflG3lV0yB1lKmoEHKHp8UvZhLIyzKkXM0ddpF+G79/D1 rLjOOAlB60u9FI4e/+9m+WY83RDuOC5OXTca6blyVjwV9EnfBRi2PJlNYICW1oNZ x094kiMpCMI= =VvLO -----END PGP SIGNATURE----- _______________________________________________ gnucash-devel mailing list [EMAIL PROTECTED] http://www.gnucash.org/cgi-bin/mailman/listinfo/gnucash-devel