On average, we record 5 transactions each day — or 35 transactions if you record them at the end of the week. In order for this operation not to consume too much time, transaction entry should be very quick and easy. That's why I made several changes to hledger so that it better fits my workflow.
It took a while before my changes made their way to the main hledger repository. Benefits of some of these patches may be not obvious, so I am going to make a series of blog posts which describe my workflow and show how to efficiently use hledger.
I am going to start with the chart facility. It is useful e.g. when you want to know the structure of your expenses, like: where the most of the money go, where you can save and where saving does not make sense etc.
By the way, I find a lot of criticism of pie charts. But for this purpose I don't see any good alternative.
In order to create ledger charts you have to enable it. E.g. if you use cabal-install, just type "cabal install -fchart" from inside hledger source directory (as of 2010-02-06, hledger with chart facility is not yet released). You will need Chart package installed.
Everything else is trivial. Just type
hledger chart ^Expenses
to get a fancy pie chart packed in a PNG file. Here's an example:
- Plotting everything does not make sense since ledger has both positive and negative accounts. Make sure that you plot only accounts with the same sign. «Expenses» accounts are almost always positive.
- Usual hledger filtering constructs apply. Some useful examples:
hledger chart --depth 2 ^Expenses— plot only top-level subaccounts of Expenses
hledger chart -p Dec ^Expenses—make a report for the last December
hledger chart ^Expenses not:Rent— ignore Rent account (useful if its balance is too big relative to other expenses)
- chart command has some additional options. Use
hledger chart -o mychart.png --size 300x500 ^Expensesto specify output file name and dimensions of the image.