New run command to use Query directives

38 views
Skip to first unread message

Martin Blais

unread,
Sep 4, 2016, 2:46:50 PM9/4/16
to Beancount
Hi,
I just implemented a new "run" command to make use of the Query directive.
Thought it was worth of note.
Here's the changelog:

    Implemented new "run" shell command that allows you to run a named query.
    For example, if an input file has a Query directive like this:

      2016-09-01 query "home" "select account, sum(position) where account ~ 'Home' group by 1"

    And you input this command:

      run home

    The entries will be closed at tue query date (2016-09-01) and the query
    automatically run. If you want to always include all the transactions, set a
    date far into the future.

    This works from the command-line and from the shell, equally. You can also
    run all the queries in an input file, like this:

      run *

    To view the list of available queries, just type the "run" command without
    an argument.

joshua...@gmail.com

unread,
Sep 4, 2016, 2:56:19 PM9/4/16
to Beancount
Great work! Just out of curiosity, what's your release schedule for Pypi? 
Reply all
Reply to author
Forward
0 new messages