Hi,
I'd like to share a way to query the journal in addition to bean-query. Using a simple python script, the beancount journal could be converted to JSON. Then one can use command line JSON tools, for example
jq, to manipulate and query it.
For example:
./b2j.py test.beancount | jq '.[] | select (._type == "Event")'
{
"meta": {
"lineno": 50
},
"date": "2013-01-01",
"type": "employer",
"description": "Ace Corp",
"_type": "Event"
}
{
"meta": {
"lineno": 80
},
"date": "2016-01-01",
"type": "employer",
"description": "Bob Corp",
"_type": "Event"
}
Another use case is to query for transactions with certain metadata, which currently bean-count doesn't support querying. It's probably very hard for jq to do balance reports, but it's quite good at filtering and outputting parts of the transactions.
Hope this helps.