#!/bin/bash
if [ -z "$1" ] ; then
todo.pl --tag project-name list
else
todo.pl --tag project-name "$@"
fi
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
function todo () {
if [ -e 'bin/todo' ]; then
bin/todo "$@";
else
todo.pl "$@";
fi
}
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 todo.pl 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:
#!/bin/bash
if [ -e '.todo-tags' ] ; then
taglist=$(cat.todo-tags | sed 's/^/--tag /')
fi
echo todo.pl $taglist "$@"
todo.pl $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.
cool... (Score:2)
And your added hack is also nifty.
I guess this beats stuffing various todo.txts in various repos.
Re: (Score:2)
Re: (Score:2)
#!/bin/sh
todo.pl --tag action download ; vim tasks.txt ; todo.pl upload tasks.txt
exec $0
Re: (Score:2)
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.
Re: (Score:1)