I've got a flat set of account codes I'm using in my timelog, and I will
sometimes annotate them with payee details. So for example, in the snippet
below SYS-5576 is a general account id for general recurring meetings (ones
not tied to a specific project), and so I use the payee to call out which
type of meetings something is.
...
i 2018-12-10 08:30:00 SYS-5576 Green/Blue DevOps
o 2018-12-10 10:20:00
i 2018-12-10 10:20:00 SYS-11112 Ctr 5
o 2018-12-10 18:00:00
i 2018-12-11 06:00:00 SYS-5966 Email
o 2018-12-11 06:58:00
i 2018-12-11 08:30:00 SYS-5576 Change Mgmt
o 2018-12-11 08:49:00
i 2018-12-11 08:49:00 SYS-11112 Ctr 5
o 2018-12-11 09:59:00
i 2018-12-11 09:59:00 SYS-5576 US Ops Staff Mtg
o 2018-12-11 10:29:00
...
ledger can produce a nice balance summary:
$ ledger -f timelog.txt -p 'this week' balance
35.15h SYS-11112
2.65h SYS-5576
35.0m SYS-5741
1.52h SYS-5966
--------------------
39.90h
or a register that details payee fields:
$ ledger -f timelog.txt -p 'this week' register
2018-12-09 Ctr 5 (SYS-11112) 1.85h
1.85h
2018-12-10 Ctr 5 (SYS-11112) 1.25h
3.10h
2018-12-10 Green/Blue DevOps (SYS-5576) 1.83h
4.93h
2018-12-10 Ctr 5 (SYS-11112) 7.67h
12.60h
2018-12-11 Email (SYS-5966) 58.0m
13.57h
2018-12-11 Ctr 5 (SYS-11112) 49.0m
14.38h
2018-12-11 Ctr 5 (SYS-11112) 24.0m
14.78h
2018-12-11 Change Mgmt (SYS-5576) 19.0m
15.10h
2018-12-11 Ctr 5 (SYS-11112) 1.17h
16.27h
2018-12-11 US Ops Staff Mtg (SYS-5576) 30.0m
16.77h
2018-12-11 Ctr 5 (SYS-11112) 11.0m
16.95h
2018-12-11 Ctr 5 (SYS-11112) 3.17h
20.12h
2018-12-12 Email (SYS-5966) 33.0m
20.67h
2018-12-12 Ctr 5 (SYS-11112) 1.77h
22.43h
2018-12-12 Ctr 5 (SYS-11112) 4.22h
26.65h
2018-12-12 Tutorial (SYS-5741) 8.0m
26.78h
2018-12-12 Ctr 5 (SYS-11112) 21.0m
27.13h
2018-12-12 Tutorial (SYS-5741) 27.0m
27.58h
2018-12-12 Ctr 5 (SYS-11112) 2.67h
30.25h
2018-12-13 Ctr 5 (SYS-11112) 7.92h
38.17h
2018-12-13 Ctr 5 (SYS-11112) 1.73h
39.90h
Is there a way to both sort by account and compute subtotals within each
group? Something like:
2018-12-09 Ctr 5 (SYS-11112) 1.85h 1.85h
2018-12-10 Ctr 5 (SYS-11112) 1.25h 3.10h
2018-12-10 Ctr 5 (SYS-11112) 7.67h 10.77h
2018-12-11 Ctr 5 (SYS-11112) 49.0m 11.58h
2018-12-11 Ctr 5 (SYS-11112) 24.0m 11.98h
2018-12-11 Ctr 5 (SYS-11112) 1.17h 13.15h
2018-12-11 Ctr 5 (SYS-11112) 11.0m 13.33h
2018-12-11 Ctr 5 (SYS-11112) 3.17h 16.50h
2018-12-12 Ctr 5 (SYS-11112) 1.77h 18.27h
2018-12-12 Ctr 5 (SYS-11112) 4.22h 22.48h
2018-12-12 Ctr 5 (SYS-11112) 21.0m 22.83h
2018-12-12 Ctr 5 (SYS-11112) 2.67h 25.50h
2018-12-13 Ctr 5 (SYS-11112) 7.92h 33.42h
2018-12-13 Ctr 5 (SYS-11112) 1.73h 35.15h
2018-12-10 Green/Blue DevOps (SYS-5576) 1.83h 1.83h
2018-12-11 Change Mgmt (SYS-5576) 19.0m 2.15h
2018-12-11 US Ops Staff Mtg (SYS-5576) 30.0m 2.65h
2018-12-12 Tutorial (SYS-5741) 8.0m 8.0m
2018-12-12 Tutorial (SYS-5741) 27.0m 35.0m
2018-12-11 Email (SYS-5966) 58.0m 58.0m
2018-12-12 Email (SYS-5966) 33.0m 1.52h
Using --sort account will group everything but doesn't over a per-account
total
$ ledger -f timelog.txt -p 'this week' register --sort account
2018-12-09 Ctr 5 (SYS-11112) 1.85h
1.85h
2018-12-10 Ctr 5 (SYS-11112) 1.25h
3.10h
2018-12-10 Ctr 5 (SYS-11112) 7.67h
10.77h
2018-12-11 Ctr 5 (SYS-11112) 49.0m
11.58h
2018-12-11 Ctr 5 (SYS-11112) 24.0m
11.98h
2018-12-11 Ctr 5 (SYS-11112) 1.17h
13.15h
2018-12-11 Ctr 5 (SYS-11112) 11.0m
13.33h
2018-12-11 Ctr 5 (SYS-11112) 3.17h
16.50h
2018-12-12 Ctr 5 (SYS-11112) 1.77h
18.27h
2018-12-12 Ctr 5 (SYS-11112) 4.22h
22.48h
2018-12-12 Ctr 5 (SYS-11112) 21.0m
22.83h
2018-12-12 Ctr 5 (SYS-11112) 2.67h
25.50h
2018-12-13 Ctr 5 (SYS-11112) 7.92h
33.42h
2018-12-13 Ctr 5 (SYS-11112) 1.73h
35.15h
2018-12-10 Green/Blue DevOps (SYS-5576) 1.83h
36.98h
2018-12-11 Change Mgmt (SYS-5576) 19.0m
37.30h
2018-12-11 US Ops Staff Mtg (SYS-5576) 30.0m
37.80h
2018-12-12 Tutorial (SYS-5741) 8.0m
37.93h
2018-12-12 Tutorial (SYS-5741) 27.0m
38.38h
2018-12-11 Email (SYS-5966) 58.0m
39.35h
2018-12-12 Email (SYS-5966) 33.0m
39.90h
Using register with -s just outputs something very much like the balance
output:
$ ledger -f timelog.txt -p 'this week' register -s
2018-12-09 - 2018-12-13 (SYS-11112) 35.15h
35.15h
(SYS-5576) 2.65h
37.80h
(SYS-5741) 35.0m
38.38h
(SYS-5966) 1.52h
39.90h
I can obviously just write something to call ledger multiple times for each
period and account, but that's slow unless perhaps I go into the python api.
Jim
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.