[Kmymoney] Last update/transaction date for an account

Thomas Baumgart thb at net-bembel.de
Sun Sep 18 07:06:56 UTC 2011


Hi,

on Sunday 18 September 2011 01:24:19 aga wrote:

> On Fri, 16 Sep 2011 15:44:34 -0700
> 
> Niranjan Rao <nhrdls at gmail.com> 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?
> > 
> > Thanks,
> > 
> > - Niranjan
> 
> I think I remember doing this some while ago, before my bank ceased
> supporting OFX.  I'm petty sure it's covered in the KMM handbook,
> called I think 'web connect'.  Though, I don't think it was from command
> line, but via browser
> 
> It involves setting OFX files to be opened by KMM.  So,
> selecting/opening the file launches KMM. Or, you possibly have to have
> the right account open - sorry, it's a bit hazy now, but I'm pretty
> sure I got it working.

Yes, that is exactly how you need to get it working. Start KMyMoney with your 
file. From a second terminal, your can start KMyMoney again, now giving it the 
filename of the ofx file. This is how the browser starts KMyMoney and the 
method we refer to as 'web connect'. But it certainly works from the command 
line as well.  I cannot remember details on how the account is selected, but 
in case it needs a tweak, let us know. The original author of this code has 
abruptly disappeared years ago.

In terms of figuring out the date, you can keep track of it yourself. That 
should be the easiest way, as there is no interface to that data. KMyMoney 
nevertheless detects duplicate transactions, so even if you import all data 
two or more times, you will only see it once.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
The words GUESS and KNOW when used in the context of
flying may produce entirely opposite results.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20110918/a698e626/attachment.sig>


More information about the KMyMoney mailing list