[nycbug-talk] time you spend in your tasks

David Rio Deiros driodeiros at gmail.com
Fri Apr 14 15:59:07 EDT 2006


On Fri, Apr 14, 2006 at 02:23:59PM -0400, George Georgalis wrote:
> 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,

This is pretty cool.
Flexible and fast. I made add some extra code to insert the stuff
in a database.

Thanks,
David

--
"If money is your hope for independence you will never have it. 
The only real security that a man will have in this world is a 
reserve of knowledge, experience, and ability."



More information about the talk mailing list