[nycbug-talk] time you spend in your tasks

George Georgalis george at galis.org
Fri Apr 14 14:23:59 EDT 2006


On Thu, Apr 13, 2006 at 06:29:36PM -0700, David Rio Deiros wrote:
>Adding this to bash not only would be useful to interact with the time 
>tracking system but with other type of applications. The patch would also
>allow bash to extend the object-iteration list over new applications via
>the .bashrc. Does this maybe already exist?
>
>What do you guys think?

Well I don't only use bash, zsh and ksh are pretty regular too.
I do it like this

$ . ~/projectname/time start reply to nycbug, check mail, checkout repo

which contains, at the top

invocation="$1"
timesheet_file="~/projectname/time"
shift
message="$*"

then the "time" file does a case function, expecting start, stop
or something else for usage. on start, it sets my env (like reply
address which muttrc eats up) and maybe "ssh-add some.id_rsa",
then

     date "+%D %r START $message" >>$timesheet_file
     cd `dirname $timesheet_file`
     muttrcmodify.sh work

(muttrcmodify.sh is a script to do various stuff like change the
mailboxes I watch on the .muttrc)

. ~/projectname/time stop

works in a similar way. The whole process has been working great
for command line time keeping. Only PITA is cutting and pasting
start, stop and descriptions into an invoice template.

Don't forget to "return" after the code or your shell will process
your time stamps! You want to source the file to inherit the env
in your existing shell, "exit" would exit you shell, don't do
that.

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at galis.org



More information about the talk mailing list