A User's view of Hledger

Learning about hledger

Zooming out and in

If I had to guess which hledger command I use the most, it would be aregister, or areg for short. The areg command results in a “zoomed-in” compact output, just one line per transaction. When I use areg, I specify a required category and very often add a query. Most of the time it’s exactly what I want.

So, if I might run the following command and see the corresponding output:

hledger areg expenses payee:Acme

Transactions in expenses and subaccounts (matching query):
2023-02-19 Acme Grocery     cash       3 EUR      3 EUR

Sometimes, though, I need to “zoom out” a bit. What I mean is that it is helpful to see whole transactions, a “zoomed-out” view, rather than the one-line-per-transaction output of areg. What recently came to my attention was that the “print” command can have same arguments (i.e., category and query) as the areg command. (Not sure why I wouldn’t have thought this, as it seems eminently logical, but it had escaped my notice.)

Therefore, if I want to see a wider view, I run the “print” command with the same arguments as shown below:

hledger print expenses payee:Acme

2023-02-19 Acme Grocery
    expenses:groceries           3 EUR
    cash                        -3 EUR

So, it’s “areg” most of the time, but if it helps to see whole transactions, I quickly switch to “print.”

Book of the week

The book of the week is The Plantagenets by Dan Jones. This is a history of the Plantagenet royal dynasty in medieval England. Of course, hledger is not mentioned once in the book, and plaintext accounting bears a similar absence.

However, as I read through the book I saw how finances were obtained and spent; used and misused; and how they brought about sometimes desired results but other times just the opposite. There are some valuable lessons to be learned there.

Also, the book is just plain well-written. After a hard day of work, perhaps you want a bit of entertainment, while at the same time expanding your knowledge of history. If so, this book may just fit the bill for you. It did for me!