Thanks for your feedback Justus.

I've noted down your suggestions as issues here
https://github.com/zacchiro/beangrep/issues

The first one (making --somewhere a flag-less default) is something I've
played with already. I ended up not including it, because it was a bit
tricky to detect the "no criteria given" situation, but I'll give it
another stab.

The second one (auto-detect predicate type where possible) is a great
idea. A sweet spot need to be found to avoid making the heuristic over
zealous (e.g., you want to detect 2024-05-14 and 2024-05 as dates, but
probably not 2734, which is more likely to be an amount), but I'll give
it a try.

Also remember: patches welcome ;-))

Meanwhile, I've uploaded beangrep to pypi, so it can now be installed
with a simple "pip install beangrep".

Cheers

On Mon, May 13, 2024 at 07:36:15PM -0700, Justus Pendleton wrote:
> 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 . [email protected] . 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beancount/1a6bab93-fa16-4271-8382-b55c70a19d07n%40googlegroups.com.


-- 
Stefano Zacchiroli . [email protected] . 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20240514081816.n2rqftupxt7ffvyj%40upsilon.cc.

Reply via email to