Querying GNUcash from external programs?
Dave Peticolas
dave@krondo.com
23 Sep 2001 13:57:08 -0700
--=-2vyin0K495dY+5ZObZ9T
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Thu, 2001-09-20 at 17:45, Ian Warford wrote:
>=20
> I've begun the process of taking over the FreeCoins<->GNUCash conduit,
> and I'm researching possible approaches.
>=20
> My initial approach looks like it's frontend is going to be written in
> Perl, and linked into pilot-manager, as well as having a command-line
> frontend. I'm after comments and thoughts on how best to go about the
> backend of it.
>=20
> I've gone through 3 different approaches in my mind right now :
>=20
> (1) If GNUCash is modular enough, write a set of functions that act as a
> 'headless' GNUCash, loading the specified data file in, and keeping
> it in memory. Then use the Query API, and various other functions to
> update the data back and forth between the Freecoins database, and then
> save the file to the drive. How this would interact with a running
> GNUCash is really the question.
GnuCash 1.6 does create a shared library just for the engine,
so that is a reasonable approach. However, the engine by itself
doesn't have any support for script language bindings.
GnuCash-the-app does support scheme bindings for the engine so
you could create a guile script that is invoked from perl.
> (2) Parse the GNUCash data files from scratch. This still leaves worryin=
g
> about interaction with a running GNUCash process.
You don't want to do this.
> (3) Use some form of IPC to talk to GNUCash while it's running.
GnuCash 1.6 doesn't support this at all. The development version
should soon have an xml-rpc interface.
dave
--=-2vyin0K495dY+5ZObZ9T
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA7rkyk5effKKCmfpIRAmmrAKCG0p1legFcnDQYP24Yu+HSeW0LggCg3FDg
gLWMb6pb89fU5nD4wOWoMQE=
=q1MX
-----END PGP SIGNATURE-----
--=-2vyin0K495dY+5ZObZ9T--