Importing data from custom software
Nicolas Marchildon
nicolas@marchildon.net
Tue, 13 Nov 2001 00:29:19 -0500
Some years ago, I wrote a basic PHP interface over a simple MySQL database,
for managing my expenses. This has satisfied my needs for a long time, but I
now realized it was getting complex, and I needed real accounting. I found
GnuCash, and gave it a short try, and read lots of documentation, and even
some source code.
Now that I've made my decision to move to GnuCash, I need a way to transfer
all my previous data, without having to re-enter it by hand, which would take
me many weeks, in my opinion.
To my knowledgde, GnuCash only imports one or two file formats, where the
most used is the QIF format. Therefore, I'm thinking of generating one or
many QIF files out of MySQL. An alternative, which seems that it would take
me much more time, is to build a simple "plugin" that would access the Engine
and add transactions.
So, I'm currently planning to generate QIF files, but I have little knowledge
of them, for now. I'm wondering if anybody ever wrote a C of Java module
having the same data structure as QIF files, that would allow me to simply
call some methods, and call a dump() or generate() method to get a QIF file
at the end, without having to care much about its format.
I've also thought of setting up GnuCash with a PostgreSQL backend, and
writing a simple script to transfer from MySQL to PostgreSQL, but I don't
know whether I'd be able to transfer the PostgreSQL data back into the
regular XML format GnuCash uses.
So, I'd like to have some opinions on which way would be the easiest, or
which one would give the community reusable tools. From a point of view,
writing a QIF-generator API seems to be generic enough to interest more
people than me alone ;)
Regards,
Nicolas Marchildon