gnucash API

Linas Vepstas linas@linas.org
Fri, 26 Oct 2001 10:14:29 -0500


On Thu, Oct 25, 2001 at 04:44:31PM -0700, Michael Thompson was heard to remark:
> 
> Linas Vepstas wrote:
> > 
> > On Wed, Oct 24, 2001 at 06:18:03PM -0700, Michael Thompson was heard to remark:
> > > I've written a program to download transactions from my bank and I'd
> > > like to be able to insert these into my gnucash accounts automatically.
> > > 
> > > Has anyone done this already?
> > 
> > If they're QIF, then you can import them directly.
> 
> I know this, but I have 8 bank accounts, and importing interactivly gets
> very tedious very quickly.
> 
> > > I've seen from the archives that there used to be a perl API, but
> > > it seems to have disappeared. Is that true? At least, gnc-prices,
> > > an application that used this interface, isn't a perl program anymore.
> > Its semi-resurrected, in the cvs tree in src/optional directory.
> > it works, except that anything that returns a list isn't supported.
> > (i.e. is not converted to a perl array).
> 
> Got it. Thanks.
> 
> If this interface is to become obsolete, 

I don't think anyone is trying to 'obsolete' the interface; its just
that no one seemed terribly interested in maintaining it. I resurected
it partly to automate some performance tuning I was doing on the engine.
(the sample perl scripts repeat a set of queries over & over).

I'll try writing the perl typemap for converting glib linked lists to
perl arrays ... that should bring the perl bindings to 100%
compatibility .. 

> perhaps a reasonable strategy
> would be to produce a collection of guile scripts that perform a number
> of common functions: enter a transaction, import/export QIF, print
> account balances, generate reports, etc.. These scripts and their input
> could be piped to the gnucash guile shell by a perl (or whatever) program.
> 
> The point would be to would make it possible to extend gnucash without
> making it necessary to learn scheme.

I think such scripts would be great, espcially as just simple 'example'
scripts.

> I'm not volunteering yet; I don't know scheme. Come to think of it,
> if I did, I might not be suggesting this at all! So, perhaps the
> chances are slim that this will ever get done! :-)

I don't think its that hard.  think of its as 2 or 3 or 5 long
afternoons, and you'll have something working by the end of it.

--linas

> 
> Michael Thompson
> mickey@berkeley.innomedia.com

-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933