#!/usr/bin/perl

use Text::Todo::Simple;

use warnings;
use strict;

=head1 NAME

t - Help people finish those damn tasks

=head1 VERSION

version 0.16

=head1 SYNOPSIS

 t [OPTIONS] [ACTION] [ARGS]

 Actions:
   add, a       TEXT
   do           ID
   remove, rm   ID
   list, ls     [STRING]
   move, mv     ID NEW
   edit, ed     ID TEXT/REGEX

 Options:
   --todo, -t   FILE
   --done, -d   FILE

=cut

Text::Todo::Simple -> run;

=head1 ACTION

=head2 add, a, --add, -a

Add a task to the listv

=head2 do, --do, -d

Finish a task

=head2 remove, rm, --remove, -r

Remove a task

=head2 list, ls, --list, -l

List your tasks

=head2 move, mv, --move, -m

Move a task to a new position

=head2 edit, ed, --edit, -e

Edit a task

=head1 OPTIONS

=head2 --todo, -t

set the todo file (takes precedence on configuration)

=head2 --done, -d

set the done file (takes precedence on configuration)

=head1 CONFIGURATION

The following environment variables will affect t.pl behaviour:

=head2 TODO_FILE

Specifies the path of the todo file. Default ~/.todo

=head2 DONE_FILE

Specifies the path of the done file. Default ~/.done

=head1 EXAMPLES

Get help

    $ t commands
    ...
    $ t help add
    ...

Add some tasks

    $ t add Do something boring
    Added task '1'
    $ t add Do something else
    Added task '2'

List tasks

    $ t ls
    1: Do something boring
    2: Do something else

Edit a task

    $ t ed 1 Do something funny
    Replaced task '1'

or

    $ t ed 1 s/boring/funny/
    Replaced task '1'

Mark a task as done

    $ t do 1
    Done task '1'

Delete a task

    $ t rm 2
    Removed task '2'

Count tasks

    $ t ls | wc -l
    0

=head1 AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

=head1 SEE ALSO

L<Text::Todo::Simple>

=head1 LICENSE AND COPYRIGHT

Copyright 2011 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

=cut