Hello,
First of all: I'm new here, so please forgive me if I breach some rule. I'll try to do better next time.
I'm trying to associate all my PDFs and other scanned bills, statements and notes with my ledger, and so far, fava helps me a lot, but I cannot find a way to easily do this from the CLI.
Fava has a "drag and drop upload and rename" feature. In which it finds out how to name the full path to a document and then moves it there.
For example:
2019-01-01 txn "DIGITALOCEAN.COM 6463978051"
statement: "2019-01-01_DigitalOcean_Invoice_2018_Dec_340201-390969932.pdf"
Liabilities:Creditcard -XXXX EUR
Expenses:Itinfra
2019-01-01 txn "LINODE.COM 855-4546633"
statement: "2019-01-01_invoice-2019-01-01.pdf"
Liabilities:Creditcard -XXXX EUR
Expenses:Itinfra
2019-01-01 txn "AWS EMEA"
statement: "2019-01-01_Billing_Management_Console__non-Linux-generated_files-job_549.pdf"
Liabilities:Creditcard -XXXX EUR
Expenses:Itinfra
And the associated tree:
└── Liabilities
├── Creditcard
│ ├── 2019-01-01_Billing_Management_Console__non-Linux-generated_files-job_549.pdf
│ ├── 2019-01-01_DigitalOcean_Invoice_2018_Dec_340201-390969932.pdf
│ ├── 2019-01-01_invoice-2019-01-01.pdf
I'm looking for something similar for the commandline. So that I can script it. It would seem `bean-file` is meant for this, but I cannot find documentation on how to use it for managing attached statments or documents; only for managing imports from other sources. Maybe I missed some crucial piece here? Does this part in fava have an API or CLI interface maybe?
Or are there third party tools? I've searched, but could not find it.
Preferably, I'd have a tool that does not change the ledger file itself; as is the rule of thumb for most CLI-tools. Instead, given a transaction statement (line in file, the statement itself?) it should move or copy the file into the correct location and then present a formatted string that can be copied into that statement in an editor. This could easily be part of a vim macro for example.
Kind regards,
Bèr