2016-04-14 08:29:16 +03:00
|
|
|
|
|
|
|
hledger_timeclock(5) hledger User Manuals hledger_timeclock(5)
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
NAME
|
2016-04-14 08:29:16 +03:00
|
|
|
Timeclock - the time logging format of timeclock.el, as read by hledger
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
DESCRIPTION
|
2019-09-02 21:11:56 +03:00
|
|
|
hledger can read timeclock files. As with Ledger, these are (a subset
|
2016-04-14 08:29:16 +03:00
|
|
|
of) timeclock.el's format, containing clock-in and clock-out entries as
|
2019-09-02 21:11:56 +03:00
|
|
|
in the example below. The date is a simple date. The time format is
|
|
|
|
HH:MM[:SS][+-ZZZZ]. Seconds and timezone are optional. The timezone,
|
|
|
|
if present, must be four digits and is ignored (currently the time is
|
2016-05-28 22:58:30 +03:00
|
|
|
always interpreted as a local time).
|
2016-04-14 08:29:16 +03:00
|
|
|
|
|
|
|
i 2015/03/30 09:00:00 some:account name optional description after two spaces
|
|
|
|
o 2015/03/30 09:20:00
|
|
|
|
i 2015/03/31 22:21:45 another account
|
|
|
|
o 2015/04/01 02:00:34
|
|
|
|
|
2019-09-02 21:11:56 +03:00
|
|
|
hledger treats each clock-in/clock-out pair as a transaction posting
|
|
|
|
some number of hours to an account. Or if the session spans more than
|
|
|
|
one day, it is split into several transactions, one for each day. For
|
2016-04-14 08:29:16 +03:00
|
|
|
the above time log, hledger print generates these journal entries:
|
|
|
|
|
|
|
|
$ hledger -f t.timeclock print
|
|
|
|
2015/03/30 * optional description after two spaces
|
|
|
|
(some:account name) 0.33h
|
|
|
|
|
|
|
|
2015/03/31 * 22:21-23:59
|
|
|
|
(another account) 1.64h
|
|
|
|
|
|
|
|
2015/04/01 * 00:00-02:00
|
|
|
|
(another account) 2.01h
|
|
|
|
|
|
|
|
Here is a sample.timeclock to download and some queries to try:
|
|
|
|
|
|
|
|
$ hledger -f sample.timeclock balance # current time balances
|
|
|
|
$ hledger -f sample.timeclock register -p 2009/3 # sessions in march 2009
|
|
|
|
$ hledger -f sample.timeclock register -p weekly --depth 1 --empty # time summary by week
|
|
|
|
|
|
|
|
To generate time logs, ie to clock in and clock out, you could:
|
|
|
|
|
2019-09-02 21:11:56 +03:00
|
|
|
o use emacs and the built-in timeclock.el, or the extended timeclock-
|
2019-05-24 08:26:43 +03:00
|
|
|
x.el and perhaps the extras in ledgerutils.el
|
2016-04-14 08:29:16 +03:00
|
|
|
|
2019-05-24 08:26:43 +03:00
|
|
|
o at the command line, use these bash aliases: shell alias ti="echo i
|
2019-09-02 21:11:56 +03:00
|
|
|
`date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG" alias to="echo o `date
|
2019-05-24 08:26:43 +03:00
|
|
|
'+%Y-%m-%d %H:%M:%S'` >>$TIMELOG"
|
2016-04-14 08:29:16 +03:00
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
o or use the old ti and to scripts in the ledger 2.x repository. These
|
2019-09-02 21:11:56 +03:00
|
|
|
rely on a "timeclock" executable which I think is just the ledger 2
|
2016-04-14 08:29:16 +03:00
|
|
|
executable renamed.
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
REPORTING BUGS
|
2019-09-02 21:11:56 +03:00
|
|
|
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
|
2016-04-14 08:29:16 +03:00
|
|
|
or hledger mail list)
|
|
|
|
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
AUTHORS
|
2016-04-14 08:29:16 +03:00
|
|
|
Simon Michael <simon@joyful.com> and contributors
|
|
|
|
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
COPYRIGHT
|
2019-09-13 18:26:49 +03:00
|
|
|
Copyright (C) 2007-2019 Simon Michael.
|
2016-04-14 08:29:16 +03:00
|
|
|
Released under GNU GPL v3 or later.
|
|
|
|
|
|
|
|
|
2016-06-12 07:34:20 +03:00
|
|
|
SEE ALSO
|
2019-09-02 21:11:56 +03:00
|
|
|
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
|
2016-04-14 08:29:16 +03:00
|
|
|
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
|
|
|
|
dot(5), ledger(1)
|
|
|
|
|
|
|
|
http://hledger.org
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-13 21:00:03 +03:00
|
|
|
hledger 1.15.99 September 2019 hledger_timeclock(5)
|