I've added option --time-report, which at the moment just rewrites the
--balance-format so that you can see balance reports like this:

  03/05/12 02:16 PM    03/06/12 11:16 AM     6.52h  272
  02/24/12 08:44 AM    02/24/12 12:16 PM     3.53h  791
  01/11/12 09:37 AM    01/31/12 07:57 AM    42.50h  796
  01/30/12 08:37 AM    01/30/12 10:53 AM     2.27h  799
  03/09/12 08:17 AM    03/09/12 05:33 PM     9.27h  832
  02/27/12 09:44 AM    02/28/12 03:53 PM     6.89h  merge fixes
--------------------------------------------------
                                           822.50h

This shows me accumulation of time within accounts, along with the earliest
checkin and latest checkout times for the postings which matches my query.

I use it like this:

    #!/bin/bash
    
    ledger -f $1 balance                            \
           --account=payee                          \
           --time-report                            \
           -d "latest > [2012/$2]"                  \
           --datetime-format='%m/%d/%y %I:%M %p'

This makes entering time data into my project planning software (Merlin)
vastly easier.  I combine it with M-x hl-line-mode in the Eshell output to
track which line I'm entering data from.

John

Reply via email to