This is pretty great! I often need to find some previous transaction and 
don't remember where it is across multiple beancount files. I'll do a grep, 
which really just tells me which file(s) and line(s) to look at. Then I 
need to switch to an editor to actually see more context.

Anyway, a few thoughts from using it for a few minutes.

- Maybe make -s/--somewhere/--anywhere a flag-less default so you can use 
it more like regular grep? That is: bean-grep foo my.beancount is 
equivalent to bean-grep -s foo my.beancount
- A way to filter out transactions from closed accounts? Maybe even make 
that the default?

It feels like it might be nice to have it auto-infer the type of search. 
2002-12-30 means --date. #tag means --tag. I think you could do it for 
--meta, too? But maybe there's no good way to handle --account, --payee, 
and --narration without just turning it into --anywhere.

On Sunday, May 12, 2024 at 7:35:00 PM UTC+7 Stefano Zacchiroli wrote:

> Hello beancounters, I've just released a little tool that I've needed
> for quite a while but didn't have[^]: beangrep, a grep-like filter for
> Beancount ledgers.
>
> [^]: with the exception of grep.py from beanlabs at
> https://github.com/beancount/beanlabs/blob/master/beanlabs/scripts/grep.py
> which is more limited than my needs.
>
> It is meant to be way simpler than beanquery, but is super useful for
> quick queries via the CLI.
>
> Beangrep is available at: https://github.com/zacchiro/beangrep
> Its README is also attached to this email.
>
> The tool is almost feature complete for me, so it doesn't really have a
> roadmap. But I welcome feedback and suggestions for improvements (or,
> even better, patches!), that I'll be happy to consider. It is also not
> uploaded to pypi yet, but if that's useful for others I'll be happy to
> take care of that too.
>
> Thanks for all the beans!
> Cheers
> -- 
> Stefano Zacchiroli . za...@upsilon.cc . https://upsilon.cc/zack _. ^ ._
> Full professor of Computer Science o o o \/|V|\/
> Télécom Paris, Polytechnic Institute of Paris o o o </> <\>
> Co-founder & CTO Software Heritage o o o o /\|^|/\
> https://twitter.com/zacchiro . https://mastodon.xyz/@zacchiro '" V "'
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/1a6bab93-fa16-4271-8382-b55c70a19d07n%40googlegroups.com.

Reply via email to