How to use tags?

13 views
Skip to first unread message

Marko Kocić

unread,
Apr 8, 2013, 10:43:43 AM4/8/13
to hle...@googlegroups.com
Hi all again,

what is the current state of using tags. I looked at (not that big) documentation part about tags, but didn't quite figure it.

I'll just to explain what I want to achieve, and you can tell me if tags would help there or there's a better way.
Say I have some unexpected expenses and incomes during the month that belong to already existing account. I'd like to tag them somehow, with eg. one-time tag.
Then when I run incomestatement or cashflow report for that month, I'd like to be able to exclude or include only those tags into calculation.

This are fake cmdlines:

hledger inc -p 2013/04 -tag-one-time ;; Dispaly incomestaement but don't consider transactions marked as one-time
hledger inc -p 2013/04 ;; display change in all accounts
hledger inc -p 2013/04 tag+one-time ;; display all accounts but consider only transactions tagged as one-time

As a bonus, it should be possible to combine multiple tags.
What do you think about idea, or there is a better way to do it?

Cheers,
Marko

Simon Michael

unread,
Apr 8, 2013, 11:36:16 AM4/8/13
to hle...@googlegroups.com
On Apr 8, 2013, at 7:43 AM, Marko Kocić wrote:
Say I have some unexpected expenses and incomes during the month that belong to already existing account. I'd like to tag them somehow, with eg. one-time tag.
Then when I run incomestatement or cashflow report for that month, I'd like to be able to exclude or include only those tags into calculation.

Hi Marko,

tag: is one of the criteria you can use in http://hledger.org/MANUAL.html#queries . So eg "tag:one-time", "not:tag:one-time", "tag:frequency=one-time" should work. It looks like the tags section in the manual needs a little expansion.

Marko Kocić

unread,
Apr 8, 2013, 6:14:41 PM4/8/13
to hle...@googlegroups.com
Ok great,

I was confused by tag syntax, was trying to add tag as ";one-time", while instead it should be ";one-time:"
Also, I didn't realise I shouldn't use -d flag for tags.

Thanks,
Marko


--
-- You received this message because you are subscribed to the Google Groups hledger group. To post to this group, send email to hle...@googlegroups.com. To unsubscribe from this group, send email to hledger+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/hledger?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "hledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hledger/R9vxBvY8v5k/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to hledger+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages