I would like to script some graphs about my savings, investments... The idea would be to generate static graph files or to create jupyter/org-mode notebooks to dynamically recreate them. I think Python with matplotlib could be the solution. However, I do not know how to execute hledger commands and get the output of the commands in Python. Should I use the subprocess module? Do you have any skeleton of one python file to run and parse the output of hledger command?
Yes, i looked at that webpage and tried several options: years ago with ledger-cli I made custom gnuplot graphs, then with hledger I tried hledger-vega and Paisa.
What I want to create custom graphs which require data manipulation before creating the graphs.
Perhaps hledger-vega was the solution most suitable for this task, because it provides a kind of framework to create queries, export queries results to csv and then create graphs. But Vega specification was a bit complex for my understanding....