beangulp
beangulp copied to clipboard
Automatic insertion
To speed up my weekly import I am planning to implement the automatic insertion of extracted transactions to my main ledger.
I would be happy to add it as feature to beangulp, but I would first like to discuss if what I am trying to do is right.
I was thinking about following design:
- create new command, e.g.
insert
- it would get two arguments, the directory where imported files are located (the same way as
exteact
command) and the main ledger file - do almost the same thing as
extract
command but insert the transactions in the main ledger file - the main difference to
extract
would be to change the per file header to include the file name thatfile
command generates instead of absolute path to the file - another argument would be format for a line before which we should add imported transactions (e.g.
; IMPORT: {account}
).
Another option would be to somehow include the account name and filing_filename in the output from extract, and then have insert
command be responsible for just merging those two files.
Something like this has been discussed before. There should be a couple of issues similar to this one. However, making the mechanism general enough to serve more than one user is tricky. I think that the command should not exist as a beangulp framework subcommand but as a separate tool or as a subcommnad to the bean-gadget
we have been discussing a bit with Martin.
If you want to prototype something I would be happy to review it and discuss further.