Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add custom reports #34

Open
DamienCassou opened this issue Jan 1, 2021 · 1 comment
Open

How to add custom reports #34

DamienCassou opened this issue Jan 1, 2021 · 1 comment

Comments

@DamienCassou
Copy link
Contributor

Hi,

I maintain budget accounts and would appreciate seeing a report showing them. With ledger-mode, I configure ledger-reports with an item such as:

("Budget" "%(binary) -f %(ledger-file) balance --empty --sort account ^Budget and not \\(Unbudgeted\\)")

Is there a way to configure user-specific reports?

@narendraj9
Copy link
Owner

narendraj9 commented Jan 3, 2021

With the current implementation, there is no way to specify a custom report. We would need to modify hledger-run-command function to read the hledger command to execute from a configurable variable as ledger-mode does.

We can implement that by looking command here (

(command (if (and (member command '("balance" "register"))
) in an association list (similar to ledger-reports) and use the associated command in place of the input command string if there is a mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants