On Monday, 1 October 2012 07:24:29 UTC+1, Russell Adams wrote: > > > Not to beat a dead horse further, but CSV2Ledger (my perl variant) > does the same thing. Dynamic renaming based on payee, account > matching, even file matching using a YAML format. > > I have a related question to the original poster. At the moment I use CSV2Ledger to import csv files, but I suspect I'm doing it in a somewhat inefficient way. In particular:
- I have both US and UK accounts, and at the moment before I import the UK ones I create and run an emacs macro on them to convert the dates to US format. Probably an improvement would be to learn to write a script to do this for me automatically, but better would just be to have the importing program do that for me (I guess it looks like the built-in import can do this via --input-date-format, but I don't know if CSV2Ledger can do it). - at the moment I run something like: csvToLedger -o "fd.csv" -a "Assets:First Direct, Liabilities:Other" -d "Date" -n "Description" -f "Amount" >>/ledger/accounts.dat on my csv file from my First Direct account, and then I go to emacs and change all the Liabilities:Other to what they should be. On the other hand, it would be ideal if the liability could be assigned automatically from the payee - I think 80%+ of my transactions have the same payee as previous ones and should be mapped to the same liability. Now, at some point about a year ago, before there was more documentation for ledger 3.0, I had the impression that the builtin import function would try to do this automatically - is that right? On the other hand, from the manual on the convert command, it isn't even clear to me that it can assign the Asset name for all the entries from the same csv file (which I definitely need). So - is there a way to do this, either by the importing program analysing the accounts.dat file, or by manually setting up some rules for converting from payee to liability? I'm wondering if CSV2Ledger can do this, based on the above remark: "Dynamic renaming based on payee, account matching, even file matching using a YAML format." However I'm not sure how this works in practice - do I just need to read the comments in the perl file, learn what YAML is etc?
