#!/usr/bin/perl

use strict;
use warnings;

use Text::Todo::Simple;

=head1 NAME

t - Help people finish those damn tasks

=head1 VERSION

version 0.21

=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 todo list.

=head2 do, --do, -d

Move a task to the done list.

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

Remove a task from the todo list.

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

List your todo 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

Specifies the todo file (takes precedence on configuration).

=head2 --done, -d

Specifies the done file (takes precedence on configuration).

=head1 CONFIGURATION

The following environment variables will affect L<t> 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

=head2 Get help

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

=head2 Add some tasks

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

=head2 List tasks

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

=head2 Edit a task

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

or

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

=head2 Mark a task as done

    $ t do 1
    Done task '1'

=head2 Delete a task

    $ t rm 2
    Removed task '2'

=head2 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
