@@ -6,10 +6,6 @@ category: bash
6
6
tags : [bash, utility, time]
7
7
---
8
8
9
- # clock
10
-
11
- Track your working hours on the command line
12
-
13
9
# Install
14
10
15
11
Available as a [ bpkg] ( http://www.bpkg.io/ )
@@ -19,24 +15,51 @@ bpkg install [-g] lordvlad/clock
19
15
20
16
# Usage
21
17
``` sh
22
- clock < command> [< task> ] [-m < message > ] [-f < clockfile > ] [-t < dir > ]
18
+ clock < command> [< task> ] [< options > ]
23
19
```
24
20
25
21
## Commands
26
22
- ` clock help ` show the help
27
23
- ` clock in ` clock in, will clock out any running task
28
24
- ` clock out ` clock out
29
25
- ` clock log ` show all log entries, or log entries for ` <task> `
30
- - TODO ` clock list ` show sums for all tasks
26
+ - ` clock list ` show sums for all tasks
31
27
32
28
## Task
33
29
If no task is specified, the current working directory
34
- will be used as task specifier
30
+ will be used as task identifier
31
+
32
+
35
33
36
34
## Options
37
35
- ` -m|--message ` record additional message when clocking in/out
38
- - ` -f|--file ` where to save the clocks, defaults to $HOME/.clocks
36
+ - ` -f|--file ` where to save the clocks, defaults to ` $HOME/.clocks `
37
+ - ` --by-task ` sort log entries by task for ` clock log `
38
+ - ` --gt=DATE ` with ` clock log ` , show only entries after ` DATE ` , with ` clock list ` sum up only entries after ` DATE ` .
39
+ ` DATE ` can be any string that unix' ` date ` understands
40
+ - ` --lt=DATE ` with ` clock log ` , show only entries before ` DATE ` , with ` clock list ` sum up only entries before ` DATE ` .
41
+ ` DATE ` can be any string that unix' ` date ` understands
42
+
43
+ # Examples
44
+
45
+ ``` sh
46
+ $ mkdir -p tasks/{work,sleep}
47
+ $ clock in tasks/work
48
+ > clocked in /home/lordvlad/tasks/work
49
+ $ clock in tasks/sleep
50
+ > clocked out /home/lordvlad/tasks/work
51
+ > clocked in /home/lordvlad/tasks/sleep
52
+ $ clock out
53
+ > clocked out /home/lordvlad/tasks/sleep
54
+ $ clock log
55
+ > Tue 21 Apr 2015 06:31:24 PM UTC 00:01:23 /home/lordvlad/tasks/work
56
+ > Tue 21 Apr 2015 06:32:47 PM UTC 00:00:04 /home/lordvlad/tasks/sleep
57
+ $ clock list
58
+ > 00:00:04 /home/lordvlad/tasks/sleep
59
+ > 00:01:23 /home/lordvlad/tasks/work
60
+ ```
61
+
39
62
40
63
# Links
41
- * [ Source Code] ( https://github.com/lordvlad/clock )
42
- * [ Author] ( https://github.com/lordvlad )
64
+ * [ Source Code (Github) ] ( https://github.com/lordvlad/clock )
65
+ * [ Author (lordvlad) ] ( https://github.com/lordvlad )
0 commit comments