Auto translation of descriptions in imported OFX files?

Mike or Penny Novack stepbystepfarm at mtdata.com
Fri Mar 20 08:44:26 EDT 2015


On 3/19/2015 10:25 PM, Edward Doolittle wrote:
> You can probably do what you want with a stream editor like sed or Perl
> before you import to GnuCash. Many users enter transactions by hand,
> though, which allows them to use the capitalization they wish.
>

That's really the only way to go because ......

This is an "alpha index" problem, parsing "names" as "entered" into a 
desired format. Each person doing this is likely to have their own set 
of names to be "translated" with general rules plus special handling for 
the exception cases. If it were JUST a matter of changing all but the 
first character of name components to lower case you could be asking the 
gnucash developers to provide something. But look at the example again.....

TRADER JOES M ==> Trader Joes' Market

But how is a generalized program to realize that in this case the "M" 
should become

CLARK M ==> Clark Museum

In other words, in YOUR personal version of the  translation, you have 
to be able to recognize specific names that are exceptions. If you only 
had ONE "M" that became "Museum" and all the rest "Market" a rule like 
"M ==> Market except "M preceded by "CLARK " ==> Museum".

The only way the developers could include this service is to provide for 
an explicit translation list, no general rules but any names coming in  
that are matched by names on the user created list are translated. But 
this doesn't have to be on the developers as could (and really should 
be) a script any of us in the community capable of producing could supply.

Michael D Novack  (who in my day, among other things, worked on some 
(large) alpha index systems  ------parse input to find the person's last 
name with exceptions like sometimes "Major" is the military title and 
sometimes the person's last name, sometimes Della is part of the last 
name and sometimes the person's middle name, etc.)


More information about the gnucash-user mailing list