simonmichael / hledger_site

The repo for hledger.org, the hledger project's website.
GNU General Public License v3.0
63 stars 37 forks source link

count descriptions? #110

Closed jungle-boogie closed 2 months ago

jungle-boogie commented 2 months ago

Hello,

Assume I want to see how many times I've been to costco and I want to use hledger to do. I know I can grep/rg the file, but is there an hledger way to give me a count?

hledger print desc:costco will list all the transactions hledger register -m costco will tell me the most recent amount I've spent hledger bal --count shows total number of transactions across all accounts

What's the right command to tell me how many times I've been to costco?

Thanks!

jungle-boogie commented 2 months ago

And of course I would eventually like to know how much I spent at Costco for a given month/year/week, etc.

I can probably do that with tags, if i were to add a tag to every transactions, but I would think the description field would be good enough to filter and contain all this data.

jungle-boogie commented 2 months ago

ah, ha!

This does it: hledger bal desc:Costco --count