clock
Track your working hours on the command line
Install
Available as a bpkg
bpkg install [-g] lordvlad/clock
Usage
clock <command> [<task>] [<options>]
Commands
clock helpshow the helpclock inclock in, will clock out any running taskclock outclock outclock logshow all log entries, or log entries for<task>clock listshow sums for all tasks
Task
If no task is specified, the current working directory will be used as task identifier
Options
-m|--messagerecord additional message when clocking in/out-f|--filewhere to save the clocks, defaults to$HOME/.clocks--by-tasksort log entries by task forclock log--gt=DATEwithclock log, show only entries afterDATE, withclock listsum up only entries afterDATE.DATEcan be any string that unix’dateunderstands--lt=DATEwithclock log, show only entries beforeDATE, withclock listsum up only entries beforeDATE.DATEcan be any string that unix’dateunderstands
Examples
$ mkdir -p tasks/{work,sleep}
$ clock in tasks/work
> clocked in /home/lordvlad/tasks/work
$ clock in tasks/sleep
> clocked out /home/lordvlad/tasks/work
> clocked in /home/lordvlad/tasks/sleep
$ clock out
> clocked out /home/lordvlad/tasks/sleep
$ clock log
> Tue 21 Apr 2015 06:31:24 PM UTC 00:01:23 /home/lordvlad/tasks/work
> Tue 21 Apr 2015 06:32:47 PM UTC 00:00:04 /home/lordvlad/tasks/sleep
$ clock list
> 00:00:04 /home/lordvlad/tasks/sleep
> 00:01:23 /home/lordvlad/tasks/work
Links
- Source Code (Github)
- Author: lordvlad
blog comments powered by Disqus