Re[2]: Plugins, modules oe similar functionality

Derek Atkins warlord@MIT.EDU
09 Jun 2002 18:56:26 -0400


Michele Ravani <Michele.Ravani@swissonline.ch> writes:

> Thanks for the pointer. 
> I was thinking that may be there could be a way to plug scm code into gnucash
> without having to rebuild the system, e.g. modules which are detected and
> loaded at runtime.

In current-CVS, the gnc-modules are detected and loaded at runtime.
You do not need to rebuild the system to get a new gnc-module loaded,
sort of.  Unfortuately there is not a generic hook to actually load
any module (or scheme, for that matter).

We should probably do that -- provide a 'plugins' directory of scheme
files that all get loaded at runtime that allows you to "plug in' to
the various startup hooks.

> A quick question, one part of the discussion was about detecting double
> entries. Would it be wrong/difficult to allow the user to define the
> equality of two transactions when importing?

To some extent this is already the case.  What happens in the current
QIF importer is that it provides you a list of potential duplicate
transactions and asks you to match real duplicates.  Someone could
probably write some scheme to provide a fuzzy-match.

> For instance, my bank gives me a very simple mechanism: I can look at my
> transactions for one account at the time in a Java application and dump
> them to an ASCII file. Equality for me would be very simple (unless I am
> missing something): same date, amount, description and (!) same balance,
> and given the possibity I could easily define it in the settings for the
> import of a given account dumps.

Yet this is not necessarily sufficient.  For exmaple, the date of a
transfer from bank A account 1 might not be the same date that the
transaction cleared in bank B account 2.  So when you try to merge the
data files from banks A and B, the transactions are going to be on
different dates.

> For the account identification, something similar could be valid: the user
> may know and define things which would be extremely difficult to handle
> consistently by coding.

Of course.  You need to keep a user-supplied mapping of "bank names"
to "gnucash account names".  Once the user supplies a mapping, gnucash
should be able to remember it and apply that mapping to future
imports.

> Sorry if I am completely off-kilt ;O)

No, not at all. :)

-derek

-- 
       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@MIT.EDU                        PGP key available