diff options
author | John Wiegley <johnw@newartisans.com> | 2004-11-08 06:43:11 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:47 -0400 |
commit | c9fb11bd60a2170fb896d77ff8d7706f563ad597 (patch) | |
tree | 42bdf09e7d8727ba31d1d8dae9b4eb4b2a605441 /scripts/report | |
parent | fa2ceaed13c031add578ee8eb33da0c9980b9fb1 (diff) | |
download | fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.gz fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.bz2 fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.zip |
updated to version 2.0
Diffstat (limited to 'scripts/report')
-rwxr-xr-x[-rw-r--r--] | scripts/report | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/scripts/report b/scripts/report index aa42982e..24418cdc 100644..100755 --- a/scripts/report +++ b/scripts/report @@ -1,17 +1,21 @@ #!/bin/sh -dir=$HOME/doc/finance +# This script facilities plotting of a ledger register report. If you +# use OS/X, and have AquaTerm installed, you will probably want to set +# LEDGER_TERM to "aqua". +# +# Examples of use: +# +# report -j -M reg food # plot monthly food costs +# report -J reg checking # plot checking account balance -cd /tmp +if [ -z "$LEDGER_TERM" ]; then + LEDGER_TERM="x11 persist" +fi -ledger -M -G register "$@" > $1 - -gnuplot <<EOF -set terminal png -set output "report.png" -set xdata time -set timefmt "%Y/%m/%d" -plot "$1" using 1:2 with linespoints +(cat <<EOF; ledger "$@") | gnuplot + set terminal $LEDGER_TERM + set xdata time + set timefmt "%Y/%m/%d" + plot "-" using 1:2 with lines EOF - -open report.png |