andreasgerstmayr / fava-dashboards

Custom Dashboards for Beancount in Fava
MIT License
176 stars 21 forks source link

Dynamic links creation. Refer to file title and accounts title #66

Closed eBober closed 4 months ago

eBober commented 4 months ago

Hello, beancount has an option "title" for beancount file. For example,"title" "MO Wealth"which generates links mo-wealth instead of beancount So, your hardcoded link/beancount/balance_sheet/ in my case /mo-wealth/balance_sheet/ It will be cool to receive some variable like ledger.titleto use in links creation

Another options is names for root accounts, it useful in other languages, for example in Russian it will be looks like: option "name_assets" "Активы" option "name_liabilities" "Пассивы" option "name_income" "Доходы" option "name_expenses" "Расходы" option "name_equity" "Капитал" 

So it will be cool to use variables name_assets instead of real names: Assets, etc.

andreasgerstmayr commented 4 months ago

Where is /beancount/balance_sheet/ hardcoded? As far as I'm aware it is only given as an example in the https://github.com/andreasgerstmayr/fava-dashboards/blob/main/example/dashboards.yaml file. This example dashboard is meant to be adapted based on your individual ledger.

Instead of templating every aspect of this file, I find it much simpler the way it is. I suggest to run a search & replace over it to adjust the links and asset names to your specific configuration.

eBober commented 4 months ago

First of all, your work is great and yes, links not hardcoded but they are not variables, so you can't create universal template for testing for example. Sure, I could search &replace but if I use multiply files it could be rather easy to use links for root accounts and for file name. Thank you