App-TimeTracker
view release on metacpan or search on metacpan
bin/tracker view on Meta::CPAN
happened:
=over
=item * A new local git branch (based on the name of the RT ticket 1234) has
been set up and checked out.
=item * You have been assigned the owner of this ticket in RT.
=item * A message has been posted in the internal IRC channel, informing
your colleagues that you're now working on this ticket.
=item * And of course we now keep track of the time!
=back
As soon as you're done, you do the usual C<tracker stop>
~/revdev/Some-Project$ tracker stop
Worked 00:15:42 on some_project
Which does the following:
=over
=item * Calculate the time you worked and store it locally in the tracking file.
=item * Post the time worked to RT.
=item * Post a message to IRC.
=item * C<git checkout master; git merge $branch> is not performed, but you
could enable this by using the command line flag C<--merge>.
=back
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, repetitive tasks
(which one tends to forget / repress).
=head2 Tracking Files
Each time you C<start> a new task, a so-called C<tracking file> will be
created. This file contains all information regarding the task you're
currently working on (provided by L<App::TimeTracker::Data::Task>,
serialized to JSON via L<MooseX::Storage>). If you call C<stop>, the current
time is stored into the C<tracking file> and the time spent working on this
task is calculated (and also stored).
All C<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 can just use the
C<SyncViaGit> plugin!
C<Tracking files> are stored in F<~/.TimeTracker> in a directory
hierarchy consisting of the current year and the current month. This
makes it easy (easier..) to find a specific C<tracking file> in case
you need to make some manual corrections (an interface for easier
editing of C<tracking files> is planned).
The filename of a C<tracking file> looks like
'YYYYMMDD-HHMMSS_$project.trc', for example:
F<20110811-090437_App_TimeTracker.trc>.
=head1 CONFIGURATION
L<App::TimeTracker> uses a bunch of config files in JSON format. The config
files valid for a specific instance of C<tracker> are collected by walking
the directory tree up from the current working directory, and merging all
F<.tracker.json> files that are found, plus the main config file
F<~/.TimeTracker/tracker.json>.
You can use this tree of config files to define general settings, per job
settings and per project settings, while always reusing the configuration
defined in the parent. i.e. the config settings sort of override the values
defined further up in the tree.
Any time you call C<tracker>, we look up from your current directory until we
find the first C<.tracker.json> file. This file marks the current project.
See L<App::TimeTracker::Command::Core> and the various plugins for valid config
parameters.
=head2 The different config files
=head3 Main config file: ~/.TimeTracker/tracker.json
The main config file lives in a directory named F<.TimeTracker>
located in your home directory (as defined by L<File::HomeDir>). All
other config files inherit from this file. You can, for example, use
this file to define plugins you always want to use.
=head3 List of projects: ~/.TimeTracker/projects.json
This file lists all the projects L<App::TimeTracker> knows of on this
machine. The content is autogenerated, so please do not edit it by
hand. We use this file to locate all your working directories for the
various reporting commands.
=head3 Per project config file: your-project/.tracker.json
Besides being the last node in the tree of the currently valid
configuration, this file also defines the containing directory as a
project.
=head2 Example
Given this directory structure:
~/.TimeTracker/tracker.json
~/job/.tracker.json
~/job/project/.tracker.json
If you hit C<start> in F<~/job/project/>, all three of those config
files will be merged and the resulting hash will be used as the
current configuration.
If you hit C<start> in F<~/job/>, only F<~/job/.tracker.json> and
C<~/.TimeTracker/tracker.json> will be used.
This allows you to have global default settings, different default
( run in 2.005 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )