It's not a perfect fit but the tag stack is intended for this kind of use case. It isn't perfect because it relies on file position instead of a date. And you'd need a plugin to filter transactions with that tag and rewrite the accounts. There's a divert_expenses plugin that already does something like this but may not be exactly what you're looking for.
On Monday, July 20, 2020 at 9:49:44 PM UTC+7 TRS-80 wrote: > At the bottom of Events section of Docs [0] I noticed: > > > reports on events have not yet been re-implemented in Beancount > > 2.0. They will be reintroduced again soon, as well as filtering. > > I also did a quick text search in query_parser [1] and query_env [2] > for the word "event" and got no results, which would seem to support > this. > > I suppose I just wanted to confirm this was the case? > > In order not to get into XY Problem [3], I will state what I am > actually trying to accomplish. > > I travel for my work a fair amount, and so when I am "on the road" > many of my expenses (eating out, etc.) are now tax write-offs and > should be categorized into different accounts than when I am home. I > wanted to extend my custom categorizer to account for this, by being > able to query a given date (transaction date) and return whether I am > "home" or "away" and then return the expense account based on that > criteria (in addition to simple text matching on payee that I am > already doing). > > I am actually considering an alternative that is tied in through my > phone GPS and Home Automation system where I cross a certain radius > boundary and my "home" or "away" status is automatically logged to > some file (Graphite/Carbon perhaps) simply because I already have all > that infrastructure set up. I am already tracking GPS for "presence" > purposes for HA, so this would just be a matter of logging. Of > course, I could just as easily log this to some separate text file > within my Beancount files (or both, or whatever). > > Anyway what I envision is a simple list of dates and status changes in > some file, which could then be queried. Beancount events could be > used for this, or I could implement my own solution. Looks like I > will be doing the latter for now, unless I have overlooked something? > > Regards, > TRS-80 > > [0] > https://beancount.github.io/docs/beancount_language_syntax.html#events > [1] > > https://github.com/beancount/beancount/blob/master/beancount/query/query_parser.py > [2] > > https://github.com/beancount/beancount/blob/master/beancount/query/query_env.py > [3] http://xyproblem.info > -- 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/da50c1bf-e60f-4312-be50-e077ea10bc52n%40googlegroups.com.
