summaryrefslogtreecommitdiff
path: root/contrib/getquote-uk.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-03 15:06:15 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-03 15:06:15 -0400
commit4af1bfdde3118b6abc19ca87ef99d42bec58197b (patch)
treed5e55db57e8991d7dce0ecb94a275ddd48051e55 /contrib/getquote-uk.py
parentde3bafc0d75410a86f13d63411271bf09fde3d6f (diff)
downloadfork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.tar.gz
fork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.tar.bz2
fork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.zip
Allow special %{} formatting sequence
Although %(amount) inserts an item's amount, it only does exactly that. There is no special consideration like stripping of lot details, or reduction to the base commodity, etc. For those things, and to make sure it was display in red if negative, the canonical form would be: %(ansify_if(justify(scrub(amount), 12, -1, true), red if amount < 0)) You can now use the special %{} form as an alternate to this: %12{amount, red if amount < 0} The two expand to the same underlying expression.
Diffstat (limited to 'contrib/getquote-uk.py')
0 files changed, 0 insertions, 0 deletions