Re: Making the expense conduit work with gnucash.



On Sat, 1 Apr 2000, Robert Graham Merkel wrote:

> support for importing expenses from the Palm expense tracker into 
> Gnucash.  

This is something I'd like to see. Not that I use expense, but I think
synchronizing to gnucash would improve the "integratedness" of
gnome-pilot.

> Unfortunately, such an operation would break the semantics of the 
> conduit methods (it is neither a copy nor a merge).  Can the design of
> gnome-pilot cope with this admittedly slightly unusual operation?

If you use the GnomePilotConduitStandardAbs class ;

I as well think, that letting the conduit mark the pilot-side record as
deleted as soon as it is added would be a wise choice. Although it would
smell of a hack, and make it difficult to sync between more pc's.

Alternatively, you could write the store_remote method (the call you have
to implement that save a record from the pilot) to only accept new
records. However - if people modify an entry, gnucash will not reflect
that. In addition, the set_status (another call you must implement) can be
written so that eg. deletion has no effect.

It is also in the store_remote call you can write a special call to mark
the record as deleted on the pilot. At the end of the sync, the deleted
records are purged. This then entails, that the iterate functions you
write would be almost empty, since you wouldn't want to either add entries
to the pilot nor want to update it reg. deletion/modification.

However, since you're implementing a conduit that will not do
"real" synchronization, but rather a oneway move of new records, you could
easily write it as a GnomePilotConduitStandard. This is used for eg. the
email conduit, and that's more "pure", since, like the email conduit, you
want simply to take entries from the pilot and move to the pc.

Let us know what happens.

/dev/eskil
---





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]