summaryrefslogtreecommitdiff
path: root/report
blob: 9e67850d3b12973843f429682a6675f69f008ea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

binary=ledger
LEDGER=$HOME/doc/finance/ledger.dat

line="$binary -f $ledger"

command=$1
shift

case "$command" in
    balance)  $line "$@" balance -s -- -Equity -Income -Expenses -Retirement ;;
    worth)    $line "$@" balance assets liabilities ;;
    profit)   $line "$@" balance income expense ;;
    spending) $line "$@" balance -F food movies gas tips \
	health supplies -insurance -vacation ;;
    huquq)    $line "$@" balance ^huquq ;;
    gold)     $line "$@" balance -G $1 ^huquq ;;
    equity)   $line "$@" equity -- -^Income -^Expenses -^Equity ;;
esac