From 408611b21c4a085477acdc41fdc75e94e86a9504 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 10 Apr 2019 09:41:25 -0700 Subject: wip scripts --- benhours | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 benhours (limited to 'benhours') 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 -- cgit v1.2.3