Powered by Perl

Usage

tracker is the front end script to App::TimeTracker. tracker allows you to easily track and report the time you spend on various jobs, projects, tasks etc from the commandline.

Custom commands or adaptions to your workflow can be implemented via an "interesting" set of Moose-powered plug-ins. You can configure different sets of plug-ins for different jobs or projects.

Tip: Use tracker plugins to list all installed plugins. Read more about each plug-in in App::TimeTracker::Command::PLUGIN-NAME.

Initial Setup

Call tracker init to set up a directory for time-tracking. tracker init will create a config file called .tracker.json in your current directory. Use this file to load plugins for this projects and/or override and amend the configuration inherited from parent projects.

See Configuration for more information on how to configure tracker for your project(s).

Basic Usage

Call tracker start when you start working on some project, and tracker stop when you're done:

~/work/some_project$ tracker start
Started working on some_project at 13:06:20

~/work/some_project$ hack .. hack .. hack

~/work/some_project$ tracker stop
Worked 01:43:07 on some_project

To see how long you worked, use tracker report:

~/work/some_project$ tracker report --this day
work 02:15:49
some_project 01:43:07
another_project 00:32:42
perl 02:23:58
App-TimeTracker 02:23:58
total 04:39:47

Advanced Usage with git, RT and IRC

By using some Plugins we can make tracker a much more powerful tool. Let's use the git, RT and Post2IRC plugins for maximum lazyness.

The first step is to add some setting to the tracker config file to your project directory. Or add those settings to a config file in a parent directory, see Configuration for more information on that.

~/revdev/Some-Project$ cat .tracker.json
{
"plugins" : [
"Git",
"RT",
"Post2IRC",
],
"post2irc" : {
"secret" : "bai0uKiw",
"host" : "http://devbox.vpn.somewhere.com/"
},
"rt" : {
"set_owner_to" : "domm",
"timeout" : "5",
"update_time_worked" : "1",
"server" : "https://somewhere.com/rt",
"username" : "revbot"
"password" : "12345",
}
}

After setting everything up, we can do a simple (but sligtly amended) tracker start:

~/revdev/Some-Project$ tracker start --rt 1234
Started working on SomeProject (RT1234) flux capacitor needs more jigawatts at 15:32
Switched to a new branch 'RT1234_flux_capacitor_needs_more_jigawatts'

While this output might not seem very impressive, a lot of things have happend:

As soon as you're done, you do the ususal tracker stop

~/revdev/Some-Project$ tracker stop
Worked 00:15:42 on some_project

Which does the following:

Even if those steps only shave off a few minutes per ticket, those are still a few minutes you don't have to spend on doing boring, repetative task (which one tends to forget / repress).

Tracking Files

Each time you start a new task, a so-called tracking file will be created. This file contains all information regarding the task you're currently working on (provided by App::TimeTracker::Data::Task, serialized to JSON via MooseX::Storage). If you call stop, the current time is stored into the tracking file and the time spend working on this task is calculated (and also stored).

All tracking files are plain text files containing JSON. It is very easy to synchronize them on different machines, using anything from rsync to version control systems. Or you just can use the SyncViaGit plug-in!

tracking files are stored in ~/.TimeTracker in a directory hierarchy consisting of the current year and the current month. This makes it easy (easier..) to find a specific tracking file in case you need to make some manual corrections (an interface for easier editing of tracking files is planned).

The filename of a tracking file looks like 'YYYYMMDD-HHMMSS_$project.trc', for example: 20110811-090437_App_TimeTracker.trc.

So what do you think?