diff options
Diffstat (limited to 'hledger-allocation')
-rwxr-xr-x | hledger-allocation | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/hledger-allocation b/hledger-allocation deleted file mode 100755 index 077e1b8..0000000 --- a/hledger-allocation +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -function cleanup() { - tail -n1 $1 | tr -d [:alpha:] | tr -d [:blank:] | tr -d [=,=] -} - -networth=$(hledger bal ^as ^li --value=now,USD --auto --output-format=csv \ - | tail -n1 \ - | tr -d [totalUSD,\"]) - -#commodities=$(hledger commodities) -commodities=("BTC|sat|SAT|GBTC" GROQ USD ETH BCH LTC XLM) - -printf "networth: %.2f USD\n\n" $networth - -for com in ${commodities[@]} -do - n=$(hledger bal ^as ^li cur:"$com" --value=now,USD | cleanup) - pct=$(bc -l <<< "$n/$networth*100") - printf "%s: %.1f%%\n" $com $pct -done |