quentinsf / icsv2ledger

Interactive importing of CSV files to Ledger
196 stars 70 forks source link

Optionally read account definitions from a ledger file #70

Closed mlamby closed 10 years ago

mlamby commented 10 years ago

The ledger documentation (section 4.6 of the ledger 3.0 manual) suggests one way to organise your ledger files is to keep a separate ledger file containing allowable account name definitions. I use this file to define all possible account names and is basically my master set of account names.

Since I am only starting to manage my finances in ledger I haven't got transactions for every account yet, and therefore running ledger account via the --ledger-file option does not list these currently unused accounts.

This pull request contains an additional '--accounts-file' option that allows the user to point icsv2ledger to this master account list. It will fallback to a default .icsv2ledger-accounts file as per the same logic as the mappings file option. The accounts file is completely optional and all changes are completely backwards compatible.

I've also updated the readme to describe the option and file format.

petdr commented 10 years ago

thanks.