diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/README | 5 | ||||
-rwxr-xr-x | scripts/bal | 27 | ||||
-rwxr-xr-x | scripts/entry | 16 | ||||
-rwxr-xr-x | scripts/getquote | 16 | ||||
-rwxr-xr-x | scripts/mean | 27 | ||||
-rwxr-xr-x | scripts/profit | 2 | ||||
-rwxr-xr-x | scripts/reg | 14 | ||||
-rwxr-xr-x | scripts/report | 17 | ||||
-rwxr-xr-x | scripts/spending | 8 | ||||
-rwxr-xr-x | scripts/worth | 2 |
10 files changed, 0 insertions, 134 deletions
diff --git a/scripts/README b/scripts/README deleted file mode 100644 index 7221f95f..00000000 --- a/scripts/README +++ /dev/null @@ -1,5 +0,0 @@ -This scripts are provided just in the way of giving ideas. They -probably all need to be modified to suit your particular environment. -Beware! - -John diff --git a/scripts/bal b/scripts/bal deleted file mode 100755 index 7fdf54ca..00000000 --- a/scripts/bal +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -switch="" -current="-c" -limit="-l \$50" -negonly="-N ^Liabilities" - -if [ "$1" = "-C" -o "$1" = "-U" -o "$1" = "-P" ]; then - switch="$1" - shift -elif [ "$1" = "-b" -o "$1" = "-e" ]; then - current="$1 $2" - shift 2 -fi - -accts="$@" -if [ -z "$accts" ]; then - accts="-Equity -Income -Expenses" - if [ ! "$switch" = "-P" ]; then - accts="$accts -Savings -Retirement" - fi -else - limit="" - negonly="" -fi - -ledger $current $limit $negonly -s $switch balance $accts diff --git a/scripts/entry b/scripts/entry deleted file mode 100755 index 28daf8c8..00000000 --- a/scripts/entry +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$LEDGER" -o ! -r $LEDGER ]; then - echo Please set your LEDGER environment variable. -fi - -line=`wc -l $LEDGER | awk '{print $1}'` - -if ledger entry "$@" > /tmp/entry; then - cat /tmp/entry >> $LEDGER -else - echo "$@" >> $LEDGER -fi -rm /tmp/entry - -vi +$line $LEDGER diff --git a/scripts/getquote b/scripts/getquote deleted file mode 100755 index cf8c8abd..00000000 --- a/scripts/getquote +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/perl - -exit 0 if $ARGV[0] eq "\$"; - -use Finance::Quote; - -$q = Finance::Quote->new; - -$q->timeout(60); -$q->require_labels(qw/price/); - -%quotes = $q->fetch("nasdaq", $ARGV[0]); - -if ($quotes{$ARGV[0], "price"}) { - print "\$", $quotes{$ARGV[0], "price"}, "\n"; -} diff --git a/scripts/mean b/scripts/mean deleted file mode 100755 index 3c6f779a..00000000 --- a/scripts/mean +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl - -$last = $ARGV[-1]; -splice(@ARGV, -1); - -open(PIPE, "ledger -MG @ARGV register $last |") || die; -@values = (); -while (<PIPE>) { - ($date, $value) = split; - push @values, $value; -} -close(PIPE); - -@values = sort @values; -splice(@values, 0, 1); -splice(@values, -1); - -$value = 0.0; -for $item (@values) { - $value += $item; -} - -if (@values) { - printf("%.2f\n", $value / @values); -} else { - die "There are no values to average!\n"; -} diff --git a/scripts/profit b/scripts/profit deleted file mode 100755 index 26f112d1..00000000 --- a/scripts/profit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -ledger "$@" balance ^Income$ ^Expenses$ diff --git a/scripts/reg b/scripts/reg deleted file mode 100755 index 75ac364e..00000000 --- a/scripts/reg +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -switch="-U" -current="-c" - -if [ "$1" = "-C" -o "$1" = "-U" -o "$1" = "-P" -o "$1" = "-M" ]; then - switch="$1" - shift -elif [ "$1" = "-b" -o "$1" = "-e" ]; then - current="$1 $2" - shift 2 -fi - -ledger $current -s $switch register "$@" diff --git a/scripts/report b/scripts/report deleted file mode 100755 index aa42982e..00000000 --- a/scripts/report +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -dir=$HOME/doc/finance - -cd /tmp - -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 -EOF - -open report.png diff --git a/scripts/spending b/scripts/spending deleted file mode 100755 index 895c4170..00000000 --- a/scripts/spending +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -ledger "$@" balance \ - Expenses:Food \ - Expenses:Movies \ - Expenses:Auto:Gas \ - Expenses:Tips \ - Expenses:Health \ - Expenses:Supplies diff --git a/scripts/worth b/scripts/worth deleted file mode 100755 index 58b20440..00000000 --- a/scripts/worth +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -ledger "$@" balance ^Assets$ ^Liabilities$ |