diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-25 03:34:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-25 03:34:28 -0400 |
commit | 887376915587bc23a26d48c6a5c8cbfbf5feab07 (patch) | |
tree | 994e85132a3828e314dd77126f7a925951b4f6aa /pysample.dat | |
parent | 66bc51db6d17d9fd01baed7ae85099094a00c091 (diff) | |
download | fork-ledger-887376915587bc23a26d48c6a5c8cbfbf5feab07.tar.gz fork-ledger-887376915587bc23a26d48c6a5c8cbfbf5feab07.tar.bz2 fork-ledger-887376915587bc23a26d48c6a5c8cbfbf5feab07.zip |
added documentation for the 'prices' command
Diffstat (limited to 'pysample.dat')
-rw-r--r-- | pysample.dat | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pysample.dat b/pysample.dat new file mode 100644 index 00000000..feac582e --- /dev/null +++ b/pysample.dat @@ -0,0 +1,36 @@ +!python +# These functions maintain the minimum and maximum of the values +# passed to them. This is used to maintain the current min/max in the +# prices report. + +min_val = 0 +def vmin(d, val): + global min_val + if not min_val or val < min_val: + min_val = val + return val + return min_val + +max_val = 0 +def vmax(d, val): + global max_val + if not max_val or val > max_val: + max_val = val + return val + return max_val +!end + +; Change the 'prices' report format to show min/max values +--prices-format %[%Y/%m/%d %H:%M:%S %Z] %-8N %10t %10('vmin'a) %10('vmax'a) %12T\n + +2004/05/01 Checking balance + Assets:Checking $500.00 + Equity:Opening Balances + +2004/05/29 Book Store + Expenses:Books $20.00 + Assets:Checking + +2004/05/29 Restaurant + Expenses:Food $50.00 + Liabilities:MasterCard |