On Mon, May 20, 2024 at 11:22:33PM +0200, Daniele Nicolodi wrote: > From the perspective of the maintainer of bean-query, I wonder whether a > tool like this could have been implemented as a front-end that interprets > the command line options and translates them into a query for bean-query in > the form 'PRINT FROM ...' > > If you thought about this approach, I would like to know which shortcomings > of bean-query didn't allow to implement bean-grep this way.
Probably a disappointment to you (sorry!), but I didn't consider that approach. I'm familiar with the Python API of Beancount, so that was my go-to design choice. Hence I don't think I've useful feedback to give you on the applicability of the approach you propose. Just a gut feeling, though: if the translation you suggest requires generating queries as textual strings, that would make me feel itchy, due to the usual SQL-style problems of generating invalid syntax, possibly involuntary SQL-injections, etc. If OTOH there is an abstract (AST-based?) API to do the same, it would be less of a problem. 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/20240521073429.fwwzfrwhj762rxtz%40upsilon.cc.
