summaryrefslogtreecommitdiff
path: root/hledger-allocation
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-11-15 09:50:31 -0500
committerBen Sima <ben@bsima.me>2022-11-15 09:50:31 -0500
commit3f9ad400be3988244586cfae0c2181181b18c41d (patch)
tree419aea0a80d1a80525069ccfc87e9eda001bd558 /hledger-allocation
parentd3a4bf44df7801af48f2784a749b230a67dc264e (diff)
moved hledger scripts to ~/fund repo
Diffstat (limited to 'hledger-allocation')
-rwxr-xr-xhledger-allocation21
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