On Feb 14, 2009, at 9:10 PM, Travis B. Hartwell wrote:
To get a list of all of the subaccounts, I use this query (for
example):
ledger -F "%A\n" -d "l>=2" bal "Assets"
I'll have to get -F working again, but the reason why neither is
working for you is because value expression and format strings have
changed significantly. You'd now write this:
ledger -F "%(account)\n" -d "depth>=2" bal "Assets"
Although I'm thinking about adding "format codes" for the most common
things, like getting the account name.
2) This one isn't a bug, more so a feature-request. I'd like to
have a
query that gives me the total amount I paidd off on my Liabilities
in a
given month. I've been using this query:
ledger -p "this month" -l "a>0" -n bal "Liabilities"
Again, it would now be: -l "amount>0".
Actually, for some reason, this isn't seeming to even work at all any
more. What it was giving me was the total paid towards liabilities
in a
given month. However, it didn't completely reflect what I want,
because
it would get cases where I did a balance transfer. So perhaps the
balance of a given Liability might have changed, but the total
Liability balance did not change within that entry. Is there a way
for
me to say "Show me the the total of all transactions within this
period
that reduced the total Liabilities balance"?
I would tag your balance transfers and then exclude them specifically
using the new query expression "and not %transfer". Or, if the word
"Transfer" occurs in your payee string, you could say "and not
@transfer". Or even, if you use a code like (xfer), you could say:
and not expr 'code = "xfer"'
Ledger 3.0 introduces a great many changes in value expression syntax,
and I haven't decided yet if it's worth the effort to try and maintain
compatibility with 2.x. How many people do you think were really
using valexprs before, when they were so utterly cryptic?
Thanks, John