[Linux, command line] Importing transactions from bank account data file, into a gnucash account

Georgios Tzanakis gtzanakis at fastmail.fm
Fri Mar 20 09:55:37 EDT 2015


Hi Jeff,

On Fri, Mar 20, 2015, at 09:38 AM, Jeff Kletsky wrote:
> George,
> 
> The product manager in me has to ask, "Why?" What are you trying to 
> accomplish that the time it is going to take you to learn how to do this 
> all, decide how to robustly handle exceptions, and provide sufficient 
> testing that it can be run "blind" from the command line is easier than 
> running it from within the GUI?
> 
> I'm not saying that you don't have a valid use case. I'm just trying to 
> have you articulate it so that the group here can point you in a 
> reasonable direction.

I have 2 banks with 3 different accounts each, for which I want to get
the transactions at least on a weekly basis. The first bank can be
accessed through gnucash, but I have to click on every account, select
the appropriate online action, and wait for 2 minutes until it finishes
getting the transactions. The second bank cannot be accessed through
gnucash, so I have to download the statements for each account and
import them manually. (Furthermore, I will be soon doing that for
another 2 banks with 2 accounts each..)

The whole process takes long, consists of the repetition of exactly the
same actions, and it has to be repeated at least every week; this begs
for automation. 

Using iMacros for firefox, with the double click of an icon I can have
all 6 statements of my 2 banks downloaded in a folder with appropriate
naming in a few seconds. If I can add to all this importing them to
gnucash too, so much the better. All in all, that means a double click
vs 20 minutes of clickedy clicking, every few days. I'm definitely
willing to spend a couple of hours refreshing my python for something
like that. 

> (George -- apologies for the double message. I inadvertently failed to 
> reply to the list on my previous email.)

Just saw that, I also replied to you personally. Sorry too for the
double message!

George 


> 
> On 3/20/15 12:13 PM, George wrote:
> > Thank you for your replies everybody.
> >
> > After reading your comments, I think that I will go with either the
> > python keybindings or pycash. My python is not the best, but I'll figure
> > it out, it seems to be the way to go.
> >
> >  From a first (admittedly superficial) eye-balling of the documentations,
> > I could not see how to insert a transaction to an existing gnucash
> > account with either the python bindings, or piecash. I will definitely
> > read the documentations more carefully, but for now could you point me
> > to something more specific, like a link to an example or the function
> > names?
> >
> > Thanks again.
> >
> > On Fri, Mar 20, 2015, at 03:56 AM, Fabio Coatti wrote:
> >> In data giovedì 19 marzo 2015 15:58:24, geo909 ha scritto:
> >>> Hi all,
> >>>
> >>> I would like to write a linux script that imports the transactions from a
> >>> bank account data file to an existing gnucash account.
> >>>
> >>> The bank account data file can be a quicken, quickbooks, excel, ms money,
> >>> simply accounting, ascii, or qif file.
> >>>
> >>> I don't mind if the imported transactions show as "Imbalanced", as long as
> >>> everything is done from the command line, and without running the gnucash
> >>> gui.
> >>>
> >>> I don't have the words to describe how convenient that would be! I'd
> >>> appreciate any suggestions.
> >>>
> >>> Thanks,
> >>>
> >>> George
> >>
> >> I recently used ofxstatement https://github.com/kedder/ofxstatement to
> >> convert
> >> xls files from my bank to ofx files that gnucash can import. The problem
> >> is
> >> that, unless you are very lucky to find a plugin that works for your
> >> bank, you
> >> have to write a small python plugin for your data.
> >> So if you are a bit confident with python this could be an option. Using
> >> provided examples to wrap up something working is not too hard: if I done
> >> it
> >> everyone can do the same :)
> >>
> >>
> >> -- 
> >> Fabio
> > _______________________________________________
> > gnucash-user mailing list
> > gnucash-user at gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> >
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list