2016-05-29 09:31:44 +03:00
|
|
|
% hledger_timedot(5) hledger _version_
|
|
|
|
% _author_
|
|
|
|
% _monthyear_
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2020-01-26 03:57:51 +03:00
|
|
|
_man_({{
|
2016-02-20 02:14:25 +03:00
|
|
|
# NAME
|
2020-01-26 03:57:51 +03:00
|
|
|
}})
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2016-04-09 23:56:09 +03:00
|
|
|
Timedot - hledger's human-friendly time logging format
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2020-01-26 03:57:51 +03:00
|
|
|
_man_({{
|
2016-02-20 02:14:25 +03:00
|
|
|
# DESCRIPTION
|
2016-04-16 20:09:51 +03:00
|
|
|
}})
|
2016-02-21 13:32:40 +03:00
|
|
|
|
2017-08-22 03:28:57 +03:00
|
|
|
Timedot is a plain text format for logging dated, categorised quantities (of time, usually), supported by hledger.
|
2016-02-20 02:14:25 +03:00
|
|
|
It is convenient for approximate and retroactive time logging,
|
|
|
|
eg when the real-time clock-in/out required with a timeclock file is too precise or too interruptive.
|
|
|
|
It can be formatted like a bar chart, making clear at a glance where time was spent.
|
|
|
|
|
2020-02-08 23:08:47 +03:00
|
|
|
Though called "timedot", this format is read by hledger as commodityless quantities,
|
2017-08-22 03:28:57 +03:00
|
|
|
so it could be used to represent dated quantities other than time.
|
|
|
|
In the docs below we'll assume it's time.
|
2016-02-20 02:14:25 +03:00
|
|
|
|
|
|
|
A timedot file contains a series of day entries.
|
2020-02-28 12:33:11 +03:00
|
|
|
A day entry begins with a non-indented hledger-style
|
|
|
|
[simple date](journal.html#simple-dates) (Y-M-D, Y/M/D, Y.M.D..)
|
|
|
|
Any additional text on the same line is used as a transaction description for this day.
|
2020-02-28 12:03:27 +03:00
|
|
|
|
|
|
|
This is followed by optionally-indented timelog items for that day, one per line.
|
|
|
|
Each timelog item is a note, usually a hledger:style:account:name representing a time category,
|
|
|
|
followed by two or more spaces, and a quantity.
|
2020-02-28 12:33:11 +03:00
|
|
|
Each timelog item generates a hledger transaction.
|
2017-08-22 03:28:57 +03:00
|
|
|
|
|
|
|
Quantities can be written as:
|
|
|
|
|
2020-02-29 21:22:43 +03:00
|
|
|
- dots: a sequence of dots (.) representing quarter hours.
|
2020-02-28 12:03:27 +03:00
|
|
|
Spaces may optionally be used for grouping.
|
2020-02-08 23:08:47 +03:00
|
|
|
Eg: .... ..
|
2017-08-22 03:28:57 +03:00
|
|
|
|
|
|
|
- an integral or decimal number, representing hours.
|
|
|
|
Eg: 1.5
|
2020-02-08 23:08:47 +03:00
|
|
|
|
|
|
|
- an integral or decimal number immediately followed by a unit symbol
|
2017-08-22 03:28:57 +03:00
|
|
|
`s`, `m`, `h`, `d`, `w`, `mo`, or `y`, representing seconds, minutes, hours, days
|
2020-02-08 23:08:47 +03:00
|
|
|
weeks, months or years respectively.
|
2017-08-22 03:28:57 +03:00
|
|
|
Eg: 90m.
|
2020-02-08 23:08:47 +03:00
|
|
|
The following equivalencies are assumed, currently:
|
2017-08-22 03:28:57 +03:00
|
|
|
1m = 60s, 1h = 60m, 1d = 24h, 1w = 7d, 1mo = 30d, 1y=365d.
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2020-02-28 12:03:27 +03:00
|
|
|
There is some flexibility allowing notes and todo lists to be kept
|
|
|
|
right in the time log, if needed:
|
|
|
|
|
|
|
|
- Blank lines and lines beginning with `#` or `;` are ignored.
|
|
|
|
|
|
|
|
- Lines not ending with a double-space and quantity are parsed as
|
|
|
|
items taking no time, which will not appear in balance reports by
|
|
|
|
default. (Add -E to see them.)
|
|
|
|
|
2020-02-29 21:22:43 +03:00
|
|
|
- Org mode headlines (lines beginning with one or more `*` followed by
|
|
|
|
a space) can be used as date lines or timelog items (the stars are
|
|
|
|
ignored). Also all org headlines before the first date line are
|
|
|
|
ignored. This means org users can manage their timelog as an org
|
|
|
|
outline (eg using org-mode/orgstruct-mode in Emacs), for
|
|
|
|
organisation, faster navigation, controlling visibility etc.
|
|
|
|
|
2020-02-28 12:03:27 +03:00
|
|
|
|
|
|
|
Examples:
|
2016-02-20 02:14:25 +03:00
|
|
|
|
|
|
|
```timedot
|
|
|
|
# on this day, 6h was spent on client work, 1.5h on haskell FOSS work, etc.
|
|
|
|
2016/2/1
|
|
|
|
inc:client1 .... .... .... .... .... ....
|
2020-02-08 23:08:47 +03:00
|
|
|
fos:haskell .... ..
|
2016-02-20 02:14:25 +03:00
|
|
|
biz:research .
|
|
|
|
|
|
|
|
2016/2/2
|
|
|
|
inc:client1 .... ....
|
|
|
|
biz:research .
|
|
|
|
```
|
|
|
|
|
|
|
|
```timedot
|
2016-02-20 21:26:42 +03:00
|
|
|
2016/2/3
|
|
|
|
inc:client1 4
|
|
|
|
fos:hledger 3
|
|
|
|
biz:research 1
|
2016-02-20 02:14:25 +03:00
|
|
|
```
|
|
|
|
|
2020-02-28 12:03:27 +03:00
|
|
|
```timedot
|
|
|
|
* Time log
|
|
|
|
** 2020-01-01
|
|
|
|
*** adm:time .
|
|
|
|
*** adm:finance .
|
|
|
|
```
|
|
|
|
|
|
|
|
```timedot
|
2020-02-29 21:22:43 +03:00
|
|
|
* 2020 Work Diary
|
|
|
|
** Q1
|
|
|
|
*** 2020-02-29
|
|
|
|
**** DONE
|
2020-02-28 12:03:27 +03:00
|
|
|
0700 yoga
|
2020-02-29 21:22:43 +03:00
|
|
|
**** UNPLANNED
|
|
|
|
**** BEGUN
|
2020-02-28 12:03:27 +03:00
|
|
|
hom:chores
|
|
|
|
cleaning ...
|
|
|
|
water plants
|
|
|
|
outdoor - one full watering can
|
|
|
|
indoor - light watering
|
2020-02-29 21:22:43 +03:00
|
|
|
**** TODO
|
2020-02-28 12:03:27 +03:00
|
|
|
adm:planning: trip
|
|
|
|
*** LATER
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2016-02-20 21:26:42 +03:00
|
|
|
Reporting:
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2016-02-20 21:26:42 +03:00
|
|
|
```shell
|
|
|
|
$ hledger -f t.timedot print date:2016/2/2
|
2020-01-13 22:44:18 +03:00
|
|
|
2016-02-02 *
|
2016-02-20 21:26:42 +03:00
|
|
|
(inc:client1) 2.00
|
|
|
|
|
2020-01-13 22:44:18 +03:00
|
|
|
2016-02-02 *
|
2016-02-20 21:26:42 +03:00
|
|
|
(biz:research) 0.25
|
|
|
|
```
|
|
|
|
```shell
|
|
|
|
$ hledger -f t.timedot bal --daily --tree
|
2020-01-13 22:44:18 +03:00
|
|
|
Balance changes in 2016-02-01-2016-02-03:
|
2016-02-20 21:26:42 +03:00
|
|
|
|
2020-01-13 22:44:18 +03:00
|
|
|
|| 2016-02-01d 2016-02-02d 2016-02-03d
|
2016-02-20 21:26:42 +03:00
|
|
|
============++========================================
|
|
|
|
biz || 0.25 0.25 1.00
|
|
|
|
research || 0.25 0.25 1.00
|
|
|
|
fos || 1.50 0 3.00
|
|
|
|
haskell || 1.50 0 0
|
|
|
|
hledger || 0 0 3.00
|
|
|
|
inc || 6.00 2.00 4.00
|
|
|
|
client1 || 6.00 2.00 4.00
|
|
|
|
------------++----------------------------------------
|
|
|
|
|| 7.75 2.25 8.00
|
2016-02-20 02:14:25 +03:00
|
|
|
```
|
|
|
|
|
2016-02-21 13:32:40 +03:00
|
|
|
I prefer to use period for separating account components.
|
2019-09-09 16:24:08 +03:00
|
|
|
We can make this work with an [account alias](journal.html#rewriting-accounts):
|
2016-02-20 02:14:25 +03:00
|
|
|
|
2016-02-20 21:26:42 +03:00
|
|
|
```timedot
|
|
|
|
2016/2/4
|
|
|
|
fos.hledger.timedot 4
|
|
|
|
fos.ledger ..
|
|
|
|
```
|
2016-02-20 02:14:25 +03:00
|
|
|
```shell
|
2016-02-20 21:26:42 +03:00
|
|
|
$ hledger -f t.timedot --alias /\\./=: bal date:2016/2/4
|
|
|
|
4.50 fos
|
|
|
|
4.00 hledger:timedot
|
|
|
|
0.50 ledger
|
|
|
|
--------------------
|
|
|
|
4.50
|
2016-02-20 02:14:25 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Here is a
|
2017-01-08 16:20:04 +03:00
|
|
|
[sample.timedot](https://raw.github.com/simonmichael/hledger/master/examples/sample.timedot).
|
2016-02-20 02:14:25 +03:00
|
|
|
<!-- to download and some queries to try: -->
|
|
|
|
|
|
|
|
<!-- ```shell -->
|
|
|
|
<!-- $ hledger -f sample.timedot balance # current time balances -->
|
|
|
|
<!-- $ hledger -f sample.timedot register -p 2009/3 # sessions in march 2009 -->
|
|
|
|
<!-- $ hledger -f sample.timedot register -p weekly --depth 1 --empty # time summary by week -->
|
|
|
|
<!-- ``` -->
|