Freecoins conduit (again)
warlord at mit.edu
Thu Dec 4 16:56:53 CST 2003
Quoting Will McDonald <will at cs.wisc.edu>:
> On Thu, Dec 04, 2003 at 04:58:53PM -0500, Derek Atkins wrote:
> > There are a number of ways to deal with it.. The easiest thing to do in
> > short term would be to create a way to export your chart of accounts
> > to the palm, and then use the QIF or OFX importer to bring transaction
> > data out of the palm and back into GnuCash.
> > In other words, your conduit would just output a regular QIF or OFX file
> > and then you can use the existing importer to pull the data into your
> > gnucash file.
> True, but there are already (commercial) palm apps that do that (not
> that that's a bad thing, and freecoins should probably be able to do
> that, but if that's all I wanted I'd just pay the $20). I want my palm
> data to automagically go into GnuCash.
Ok, fair enough.. I just figured that the easiest thing to do would be
to use an existing import method so you'd have to touch as little GnuCash
code as possible.
Another thing to keep in mind is that if you DO use the GnuCash API, then
you wont be able to run the sync command while you're running GnuCash.
Either that or you'd have to make the conduit be a module and run it from
a running GnuCash.
> > Honestly I see little reason to have much in your pilot except, perhaps,
> > for current balances. I see the pilot as a useful tool to keep real-time
> > track of actual transactions which then get loaded into Gnucash during
> > sync (at which time the txns and balances are reconciled on the pilot
> > and you return to a clean state.
> OK, I don't need all my transactions in my palm, and it is mostly used
> for "enter on palm, import to GC", but it would be nice to have, say, my
> last month's worth of transactions on my palm. The hard parts of this
> are 1) writing the functions to translate the palm data to/from a
> canonical format, and 2) talking to GC to get/set the transactions. Once
> I have that (which seems to be a base level of functionality if I'm not
> going the QIF route), it shouldn't be that hard to figure out *what* I
> want to get/set. Again, pushing new transactions, deleting stuff older
> than a month, then gettting the new stuff shouldn't be *that* hard.
> Once that's done, actual conflict resolution shouldn't be that hard
> either, especially since transactions are very small and self-contained
> units (as opposed to say, a text file).
Sure, that makes sense. If you're going to use the GnuCash API then you
might as well consider the GnuCash Transaction and Account objects
as the "canonical format" ;)
> > > * Is there a howto/tutorial/documentation on the Query API somewhere?
> > No, not really... There are some docs in the sources, but generally
> > (at this time) the sources (and headers) are the canonical documentation
> > for developers. If you'd like to help with documenting the APIs that
> > also be welcome ;)
> In that case, is there someone who can help me (point me to existing code
> or provide sample function calls) fulfill the ambitious desires of "I
> have a transaction I'd like to commit now, please" and "Please to be showing
> me all the transactions that happened today" and "Good sir, may I
> inquire as to what accounts you currently possess"? :)
> Hell, I can even promise to document (for some value of "document")
> everything that I do so that future generations can learn from my
Yes, a bunch of us. I already mentioned #gnucash on irc.gnome.org --
a lot of the developers hang out there (I'm just not on IRC right now
because my disk crashed and I've spent the last three days working at
recovering all my data).
Most of what you want to do is relatively easy.. Take a look at
src/engine/*.h -- focus particularly on Account.h, Transaction.h,
and the query headers (the name is dependent on whether you're using
1.8 or CVS Head).
> My first goal wrt GnuCash is to deal with setting/getting transactions.
> I understand that other changes (adding/deleting accounts, etc etc) will
> add more complexity, but that can come later.
Look in src/engine/Transaction.h for the transaction (and Split) API.
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel