Skip to content

Commit c36441a

Browse files
committed
Merge pull request #18 from lordvlad/clock
update readme
2 parents 32c199b + 0779d4e commit c36441a

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

_posts/2015-04-19-clock.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ category: bash
66
tags: [bash, utility, time]
77
---
88

9-
# clock
10-
11-
Track your working hours on the command line
12-
139
# Install
1410

1511
Available as a [bpkg](http://www.bpkg.io/)
@@ -19,24 +15,51 @@ bpkg install [-g] lordvlad/clock
1915

2016
# Usage
2117
```sh
22-
clock <command> [<task>] [-m <message>] [-f <clockfile>] [-t <dir>]
18+
clock <command> [<task>] [<options>]
2319
```
2420

2521
## Commands
2622
- `clock help` show the help
2723
- `clock in` clock in, will clock out any running task
2824
- `clock out` clock out
2925
- `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
3127

3228
## Task
3329
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+
3533

3634
## Options
3735
- `-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+
3962

4063
# 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

Comments
 (0)