[Kmymoney] Last update/transaction date for an account
nhrdls at gmail.com
Mon Sep 19 19:43:19 UTC 2011
Thanks all for the help.
I'll play with the code and see what I can do.
On 09/18/2011 12:06 AM, Thomas Baumgart wrote:
> 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?
>>> - 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.
More information about the KMyMoney