t- : A less-than-minimal task list "manager"

"t-" is a task list manager in the style of "t". It's even more minimal, with even fewer features. You can add items to your task list, remove items from it, list them, and that's about it. The documentation for "t" says:

`t` is a command-line todo list manager for people
that want to *finish* tasks, not organize them.

I've made no attempt to make this run on anything other than my system. It runs on Python 2.2.1 on SuSE linux 8.1. I've not (yet) tried it on anything else.

Usage

t-   --help or -h  -  Print this help
t-   --task-dir dir  -  Directory for the tasks file
t-   --list file  -  The tasks file
t-   --recover  -  Restore previous task list
(Only works once)
t-   -f hash  -  Finished task
t-   -f x  -  Remove remembered finished tasks
t-   task to add  -  Add a task

With no arguments, t- will print the list of tasks in random order, putting the deleted tasks last.

Tasks are listed in a random order, and preceeded by a random, 4 character string. Finish a task with the -f parameter, and it gets listed with "x" at the start. Delete the finished tasks by "finishing" the hash "x".

Examples

    $ t- Buy some milk

    5274 : Buy some milk

    $ t- Buy some bread

    5274 : Buy some milk
    f014 : Buy some bread

    $ t- -f 5274

    f014 : Buy some bread
    x : 5274 : Buy some milk

    $ t- -f x

    f014 : Buy some bread
  

Tasks are stored in plain text in the given file, and you can edit that file simply by using a text editor. The hash, once the file is written, has no meaning, and could be chosen at random.

Sort the tasks alphabetically : $ t- | sort -k 3
Sorted by hash : $ t- | sort
Count remaining tasks : $ t- | wc
Excluding completed tasks : $ t- | grep -v ^x
Count unfinished tasks : $ t- | grep -v ^x | wc

If you screw up, you can recover the immediate previous version of the task file:

    $ t- --recover
Finally, as with the original "t", you can have several task lists by specifying them on the command line, or setting up multiple aliases.

Installation

To install "t-":
  • Create a directory for the executable
  • Put the Python executable in this and call it t-.py
  • Create a directory for the task list (this need not be different)
  • Put this line (suitably modified) in your ~/.bashrc file:
    alias t-='python ~/path/to/t-.py --task-dir ~/tasks --list tasks'
  • Execute that line, or logout and login, and you're ready to go.

Credits

As should be obvious, this draws heavily on "t" for inspiration and details. I have a very old version of Python on a very old machine, and "t" won't run on it because of dependencies. I wrote this as a minimal version to see if it would be worth the time to install the full version.

So far it isn't. Your experience may differ from mine.

You can find "t" here

Licence

Copyright (c) 2011 Colin Wright

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The code

Here's the code itself. I'm not proud of it, but take it as you find it. It's just an hour of work.