NAME
App::TimelogTxt - Core code for timelog utility.
VERSION
This document describes App::TimelogTxt version 0.03_3
SYNOPSIS
use App::TimelogTxt;
App::TimelogTxt::run();
DESCRIPTION
This module encapsulates all of the functionality of the timelog application. This module delegates much of the heavy lifting to other modules. It does handle the UI work and the configuration file.
INTERFACE
At the moment, the only real interface to this file is the run
command. In case this becomes more generally useful somehow, I'll go ahead and document the other public methods.
In the methods below, the $app
parameter is an object of the class Timelog::CmdDispatch
. This is a subclass of App::CmdDispatch that adds support needed for some of our configuration.
run()
log_event( $app, @event );
Add the specified event to the end of timelog.txt
edit_logfile( $app )
Implementation of the 'edit' command.
list_events( $app, $day )
Implementation of the 'ls' command.
list_projects( $app )
Implementation of the 'lsproj' command.
daily_report( $app, $day, $end_day )
Implementation of the 'report' command.
daily_summary( $app, $day, $end_day )
Implementation of the 'summary' command.
report_hours( $app, $day, $end_day )
Implementation of the 'hours' command.
extract_day_tasks( $app, $day, $end_day )
Read the timelog.txt file and create an array of App::TimelogTxt::Day objects that contain the information for the days from $day
to $end_day
.
start_event( $app, @event )
Implementation of the 'start' command.
push_event( $app, @event )
Implementation of the 'push' command.
pop_event( $app )
Implementation of the 'pop' command.
drop_event( $app, $arg )
Implementation of the 'drop' command.
list_stack( $app )
Implementation of the 'lstk' command.
CONFIGURATION AND ENVIRONMENT
App::TimelogTxt requires no environment variables. App::TimelogTxt will use the file ~/.timelogrc if it exists.
The configuration file is expected to contain data in two major parts:
General Configuration
The first section defined general configuration information in a key=value format. The recognized keys are:
- editor
-
The editor to use when opening the timelog file with the
edit
command. If not specified, it will use the value of either the VISUAL or EDITOR environment variables. If non are found, it will default tovim
. - dir
-
The directory in which to find the timelog data files. Defaults to the
timelog
directory in the user's home directory. - defcmd
-
The default command to by used if none is supplied to timelog. By default, this is the 'stop' command.
Command Aliases
The config file may also contain an '[alias]' section that defines command aliases. Each alias is defined as a shortname=expanded string
For example, if you regularly need to make entries for reading email and triaging bug reports you might want the following in your configuration.
[alias]
email = start +Misc @Email
triage = start +BugTracker @Triage
DEPENDENCIES
App::CmdDispatch, Getopt::Long, autodie.
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to bug-app-timelogtxt@rt.cpan.org
, or through the web interface at http://rt.cpan.org.
AUTHOR
G. Wade Johnson <gwadej@cpan.org>
LICENCE AND COPYRIGHT
Copyright (c) 2013, G. Wade Johnson <gwadej@cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.