API or Perl module / SQL access?

Lincoln A. Baxter lab at lincolnbaxter.com
Tue Mar 31 20:52:23 EDT 2009


On Thu, 2004-07-01 at 18:22 +0100, Charles, Tony (Exchange) wrote:
> Hi, I'm thinking of possibly using gnucash, but I'd like to automate certain things.
> 
> Is there a Perl module or some kind of API that can insert account
> entries directly into the underlying gnucash database? (ie. in real
> time, without user intervention. So, not a batch import.) If so, then
> is this kind of thing documented somewhere?

I am the author of Sys::SigAction and several other perl modules, and I
have  contributed to DBD::Oracle. (you can look it up on CPAN.org)

I have thought in the past about swig'ing a perl module for GC.  I love
GC, I love perl, but the developers of GC seem to have a low opinion of
perl.  If there is enough interest, I might consider taking it on... I
would very much like to automate certain things I do with perl scripts
(which I would much prefer to lisp) and I think the flexibility and
power of the language, with a clean modular interface could also be used
to generate custom reports.  This is just me... maybe I'm just an old
*nix fart.

So far, the kind of automation I think you are looking for has not been
provided, except through the various import formats.  There are always
multiple ways to skin the cat however...  A perl script could make a CSV
file that you import, or convert to QIF, heck a perl script could just
build the QIF. 

One problem to think about is that GC is not a multi-user program, so at
that time such a program is modifying the data file, GC must not be
running on that data file (so such a script must check and exit, if that
is the case).  This would even be true if the proposed MySQL backend
were provided, since GC as I understand it, reads from the data file (or
database) and runs with the data in memory. I gather it would me a major
re-architecture project to make GC multi-user.

That no one thinks I am whining... I love GC, it really is that cat's
meow, especially since it is a true double entry book keeping GUI _and_
is platform independent.  Long live GC, and many thanks to those who
keep it alive.

Lincoln

> 
> Or, must one use the GUI to do "data entry" and otherwise interact with gnucash?
> 
> (Or maybe I'm jumping the gun because the data is still an XML file?)

Yes, I guess so.

> 
> Thanks!
> 
> 
> (Posted similar question to the developer list, but have since decided that it's more a user oriented question)
> 
> 
> 
> 
> 
> 
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation, 
> offer or agreement or any information about any transaction, customer 
> account or account activity contained in this communication.
> ***********************************************************************
> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
> 



More information about the gnucash-user mailing list