summaryrefslogtreecommitdiff
path: root/benhours
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-04-10 09:41:25 -0700
committerBen Sima <ben@bsima.me>2019-04-10 09:41:25 -0700
commit408611b21c4a085477acdc41fdc75e94e86a9504 (patch)
tree4edc76043714a3765cc030f9504d1a8536cd8e29 /benhours
parenta11c3f21f713e2c9aaf26f50b9cb2452c3610aa9 (diff)
wip scripts
Diffstat (limited to 'benhours')
-rwxr-xr-xbenhours41
1 files changed, 41 insertions, 0 deletions
diff --git a/benhours b/benhours
new file mode 100755
index 0000000..c490e2a
--- /dev/null
+++ b/benhours
@@ -0,0 +1,41 @@
+#!/bin/bash -e
+
+org2tc "$@"
+ | ledger -f - --day-break print > /tmp/work.dat
+
+echo
+echo Daily totals
+echo ================================================================================
+
+ledger -f /tmp/work.dat \
+ --columns=80 --day-break --daily \
+ --base --total='(1.00 hrs*amount)/3600' \
+ --sort date --collapse reg
+
+echo
+echo Daily breakdown
+echo ================================================================================
+
+ledger -f /tmp/work.dat \
+ --columns=80 --day-break --daily \
+ --base --total='(1.00 hrs*amount)/3600' \
+ --sort date reg
+
+echo
+echo Weekly totals
+echo ================================================================================
+
+ledger -f /tmp/work.dat --weekly \
+ --columns=80 --day-break \
+ --base --total='(1.00 hrs*total)/3600' \
+ --sort date bal
+
+echo
+
+echo Allocations
+echo ================================================================================
+
+ledger -f /tmp/work.dat bal --base --percent --depth=1
+echo
+
+ledger -f /tmp/work.dat bal --base --percent --depth=2 55AJK