[Kmymoney] Last update/transaction date for an account

Jack ostroffjh at sbcglobal.net
Sat Sep 17 22:21:42 UTC 2011


On 2011.09.16 18:44, Niranjan Rao wrote:
> Hi Folks,
> 
> I am trying to write automatic script to download ofx transactions  
> from my bank. My bank charges money if you use the ofx servers  
> directly, but allows me to download the transactions if I login to  
> online banking and download from there.
> 
> In my script, I would like to set the date range based on information  
> I can collect from kmymoney - e.g. last transaction date for my  
> account or ideally if it's available last ofx statement import date  
> for that account or something similar.
> 
> Is it possible to get such date from kmymoney programmatically? I  
> know file format is essentially xml on my machine and can probably  
> read it from there if required. However not prefer to that since I  
> want to treat kmymoney as blackbox file.
> 
> Also, is it possible to ask kmymoney to import a file using command  
> line by pointing it to account in which file needs to be imported and  
> ofx download?

KMM does save the date of the most recent OFX download - but only for  
OFX direct connect, not (as far as I know) for OFX file import.  Does  
your bank give you the option of downloading transactions since the  
last download?

As far as pointing KMM at the downloaded OFX file, that should work (I  
have not tried it myself) and it will either ask for the account to use  
or pick one based on the account ID, if you have previously imported  
OFX to that account.

One of the developers may have more information, but as far as I can  
tell, KMM can only take a file name as a command line argument - either  
a .kmy file to open, or a file to import (qif or ofx, I believe, but  
would need to confirm).  There are not many command line options, which  
can be seen by "kmymoney --help".  It might be worth opening a wishlist  
on bugs.kde.org to add new command line options and commands, such as  
perhaps running and saving a report, from which you might extract the  
data you want.


Jack


More information about the KMyMoney mailing list