summaryrefslogtreecommitdiff
path: root/contrib/report
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-23 14:04:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-23 14:04:50 -0400
commit08559bff349b8266331389c9a0c579798ce94b4c (patch)
tree829d8c4f0c12855814d1d4891889fbfc655de8ed /contrib/report
parenta61901a0923a1b4413fcc44a8ff259d309c064b0 (diff)
downloadfork-ledger-08559bff349b8266331389c9a0c579798ce94b4c.tar.gz
fork-ledger-08559bff349b8266331389c9a0c579798ce94b4c.tar.bz2
fork-ledger-08559bff349b8266331389c9a0c579798ce94b4c.zip
Moved scripts from contrib/scripts/ into contrib/
Diffstat (limited to 'contrib/report')
-rwxr-xr-xcontrib/report21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/report b/contrib/report
new file mode 100755
index 00000000..24418cdc
--- /dev/null
+++ b/contrib/report
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# 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
+
+if [ -z "$LEDGER_TERM" ]; then
+ LEDGER_TERM="x11 persist"
+fi
+
+(cat <<EOF; ledger "$@") | gnuplot
+ set terminal $LEDGER_TERM
+ set xdata time
+ set timefmt "%Y/%m/%d"
+ plot "-" using 1:2 with lines
+EOF