Integration with other applications?

Rob Browning rlb@cs.utexas.edu
10 Aug 2000 11:42:48 -0500


Drew Bernat <abernat@zathras.net> writes:

> My view on integration has always been that GUI apps should be
> integrated the same way command-line apps are -- we don't have one
> big do-everything application (well, except find) but you can use
> both pipes and command-line arguments to patch together almost
> anything you want. Of course, this is a whole lot harder to do with
> GUI stuff, but I don't think it is impossible.

To all of you.  Fear not.  We're on the same page.

The recurring transaction system I'll propose will take into account
all of these bits.  As a first pass, I plan to make it so that
recurring transactions only fire when you launch gnucash, or when it's
already running, but I *do* plan to deal with the modularity issues.
In fact, I'm going to see if it's feasible to make the scheduler
itself a separate, well-defined, well-behaved project that anyone can
use for other purposes.

For our purposes I think that cron and at just won't cut it -- I'll
elaborate on that later, but for now suffice to to say that once I
turn my full attention to this, I think we'll all be able to come up
with a tool that'll make nearly everyone happy.

I should be dealing with this in a fairly concentrated fashion in
about 2-3 weeks, after I finish up the initial implementation of the
text data format and get back from San Jose.

> Gnucash, by it's design, is/should be (I'm not sure which)
> scriptable. I see that in the same light as command-line flags --
> starting a program to do certain things without user input. For
> example, I could have a shell script download items from my bank,
> massage them, and inject them into Gnucash with a line like the
> following: gnucash --add --account <account> --item <item> Rough
> draft, but it _should_ be possible.

When I fininsh the text format, this will be a *lot* easier.  We're
going to use it for inter-save logging, and the mechanism that makes
playback of those logs possible will also allow what you want.

We're already moving in the direction of what you want anyway.  In the
latest CVS, I've added a preliminary --evaluate option that you can
specify on the command line multiple times to queue up forms that'll
be executed (in order) after gnucash is fully initialized, but before
the GUI appears.  Right now there's a bug with the tip-of-the-day
stuff that causes it to display its window even though it shouldn't,
but I have a fix for that here, and will be getting it submitted soon.
Once that's done, you can write your very own "hello world" from the
gnucash command line :>

  gnucash --evaluate '(display "hello world\n")'

> Did that make any sense, or should I go back to bed? :)

Made perfect sense to me.

And with respect to IPC, I think the jury's still out.  We'll probably
deal with bonobo, but I'm also interested in considering how far you
can get with a well specified API involving text forms.  This is
simple, easy to add safely to a guile app, and easy to understand:

  send_gnc_command("(delete-account (lookup-by-name \"checking\"))")

I'm not saying we should do this, but that we should consider it, but
lets leave that discussion off until we've gotten some of the more
immediate issues resolved.

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930