hledger
hledger copied to clipboard
querying based on tags in a CSV file doesn't work
I'm attempting to do hledger print -f example.csv tag:account=1111111111 with the attached files and I'm unable to get any output. I'm creating the query based on https://hledger.org/hledger.html#queries and https://hledger.org/tags-tutorial.html
1111111111,2020-12-09T00:00:00.058,Debit,061,,4000.00,EFT/ACH DEBIT Internet transfer 8888888888
2222222222,2020-12-09T00:00:00.063,Credit,006,,2600.00,Internet transfer from 8888888888
The rules file I've got is:
skip 0
currency $
date-format %Y-%0m-%0dT%H:%M:%S%Q
fields acct, date, incexp, _, code, amount, desc
comment account:%acct
status *
account1 assets:Checking
if %incexp Debit
amount -%amount
I've minimized my real data into a smaller example that shows the issue I'm running into. It likely can be minimized further. It appears every other query except for tags are working.
Thanks for the bug report, which I confirm. As a temporary workaround, you can do:
hledger print -f example.csv | hledger -f- -I print tag:account=1111111111
Still an issue in current hledger.
(When fixed, update https://github.com/simonmichael/hledger/tree/master/examples/self-tracking)