The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::TimeTracker - Track time spend on projects from the commandline

SYNOPSIS

App::TimeTracker tracks time spend on various projects in simple flat file.

METHODS

global_opts

Defines the global option definition

global_validate

Global input validation

new

    my $tracker = App::TimeTracker->new;

Initiate a new tracker object.

stop

    $self->stop($datetime);

Find the last active task and sets the current time as the stop time

$datetime is optional and defaults to DateTime->now

Helper Methods

get_printable_interval

    my $string = $self->get_printable_interval($task, [$start, stop]);

Returns a string like "worked 30 minutes, 23 seconds on Task (foo bar)"

init_tracker_db

    $self->init_tracker_db( $path_to_file );

Initiates a new pseudo DB file.

beautify_duration

    my $nice_message = $self->beautify_duration($duration);

Turns an DateTime::Duration object into a nicer representation ("4 minutes, 31 seconds")

beautify_seconds

    my $nice_message = $self->beautify_seconds($seconds);

Turns an amount of seconds into a nicer representation ("4 minutes, 31 seconds")

parse_datetime

    my $dt = $self->parse_datetime("1245");
    my $dt = $self->parse_datetime("0226-1245");

Convert a simple time / datetime into a DateTime object

Input can be a string containing Hour and Minute ("1245"), which will use todays date. Or a string containing Month Day followed by Hour & Minute (seperated by _ or -)

now

    my $now = $self->now;

Wrapper around DateTime->now that also sets the timezone to local

sql_schema

Return the SQLite Schema

schema

Returns the DBIx::Class schema object

AUTHOR

Thomas Klausner, <domm at cpan.org>

BUGS

Please report any bugs or feature requests to bug-timetracker at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App::TimeTracker. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc App::TimeTracker

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Thomas Klausner, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.