install

(these instructions are also included in the downloadable tarball)
These couple of shell commands completely download and install project-timer on
unix-like systems:

System wide installation example:

  cd /tmp
  wget http://hofmeyr.de/code/project-timer/latest-project-timer.tar.gz
  tar xzf latest-project-timer.tar.gz
  sudo cp -R project-timer/ /var/local/
  sudo ln -s /var/local/project-timer/ptimer /usr/local/bin/
  sudo ln -s /var/local/project-timer/systray-ptimer /usr/local/bin/
  # remove downloaded files
  rm -rf /tmp/project-timer /tmp/latest-project-timer.tar.gz


Home dir installation example:
  
  cd /tmp
  wget http://hofmeyr.de/code/project-timer/latest-project-timer.tar.gz
  mkdir -p ~/bin
  cd ~/bin
  tar xzf /tmp/latest-project-timer.tar.gz
  ln -s project-timer/ptimer .
  ln -s project-timer/systray-ptimer .
  # make sure ~/bin is in your $PATH
  echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc

Then, run
  systray-ptimer
to launch the panel icon. Consider adding systray-ptimer as a Session Startup
entry (see your 'Settings' menu, if you have one), so that it is launched each
time you log in to your box.

To use the commandline interface, run
  ptimer help
to get the complete help.
 

To get timer information on your shell prompt, use something like this in your
~/.bashrc (or similar) file:

  export PS1="\`cat ~/.project-timer/human-readable-state\` $PS1"

Before you do so, call ptimer once to create the file used here, i.e.
~/.project-timer/human-readable-state.
This will result in a shell prompt like this:

  foo=1:23 (45:17) jdoe@box ~/project_foo/$ _
   |   |      |
   |   |      overall grand total (here 45 hours 17 minutes)
   |   current timer of running project (here 1 hour 23 minutes)
   running project (if any)

If this display is out of date (only happens when the daemon died
unexpectedly), just invoke `ptimer' once without any arguments.
  

Presumably, you don't need to install any dependencies, because your box
most probably already has these installed:

  * python 2.4 or newer
  * To use systray-ptimer, the icon on your desktop panel, you also need
    python-gtk2 and python-glade2.
  * a unix-like operating system
    (I have no idea whether this will run on other OSes than debian linux, but
    chances are pretty good. Feel free to try and tell me about it.)

login 2010-07-15 22:38