Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

polettix (7564)

  (email not shown publicly)

Journal of polettix (7564)

Thursday March 29, 2007
08:52 AM

project's todo with hiveminder

[ #32834 ]
Using Hiveminder's command line interface (described here), I put together this simple wrapper shell script:

if [ -z "$1" ] ; then --tag project-name list
else --tag project-name "$@"

that I install in the "bin" directory of my new projects. In this way, I'm able to track to-dos via this simple interface within the project ("project-name" above in the script is "rubrica" in the example below):

# List, by default
pinco@pallo /path/to/rubrica$ bin/todo
1H27 aggiungere le foto nella lista globale [rubrica]
1H35 verificare gli errori nella gestione delle pagine [rubrica]

# Todo set to "done"
pinco@pallo /path/to/rubrica$ bin/todo done 1h27
Finished task

# Task addition
pinco@pallo /path/to/rubrica$ bin/todo add 'verificare ordinamento per cognome'
Created task

# List (updated)
pinco@pallo /path/to/rubrica$ bin/todo
1H35 verificare gli errori nella gestione delle pagine [rubrica]
1KH7 verificare ordinamento per cognome [rubrica]

Update: I also added a little function into my .bashrc to automatically call the bin/todo script if available, or to call if not.

function todo () {
    if [ -e 'bin/todo' ]; then
        bin/todo "$@";
    else "$@";

In this way, when I'm inside the directory of one of my projects that have a bin/todo, this is what gets called. Otherwise, it is a simple proxy for the straight script.

Update: I ended up getting rid of the script and adding a simple .todo-tags file where I need it. I also substitued the shell function with the following script:


if [ -e '.todo-tags' ] ; then
   taglist=$(cat .todo-tags | sed 's/^/--tag /')
echo $taglist "$@" $taglist "$@"

In the .todo-tags all tags are on different lines and cannot have spaces, of course, but this works for me 100% of times.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I wasn't aware of the hiveminder command line interface.

    And your added hack is also nifty.

    I guess this beats stuffing various todo.txts in various repos.
    • My favorite hack is this: #!/bin/sh --tag action download ; vim tasks.txt ; upload tasks.txt exec $0
      • Oops

        #!/bin/sh --tag action download ; vim tasks.txt ; upload tasks.txt
        exec $0
        • Any reason why this nifty tool isn't packed up in a dist and available from CPAN?

          The first time I run it it died because some dependencies weren't installed - if it was a proper CPAN dist, CPAN(PLUS).pm would have resolved them.
        • Probably because I just woke up, but I don't get the

          exec $0
          part. Doesn't it enter in infinite loop? Probably yes, to keep the todo-list always available (locally) and up to date (remotely), but then I wonder how to break the loop in an easy way!