mbucc / punch-time-tracking

Automatically exported from code.google.com/p/punch-time-tracking
GNU General Public License v3.0
1 stars 0 forks source link

Simple patch that makes it possible to run Punch.py from any directory #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout trunk
2. Run "python /foo/bar/todo/todo.actions.d/Punch.py"
3. Receive an error stating that "todo.cfg" could not be found.

What is the expected output? What do you see instead?

It would be nice if I could run Punch.py from any directory, not just my todo 
or $HOME dirs. 

What version of the product are you using? On what operating system?

Trunk on Ubuntu 11.10.

Please provide any additional information below.

Here's the patch. In Punch.py, change line 106 from this:

    paths = [ getenv("HOME"), "."]

...to this:

    paths = [ getenv("HOME"), ".", getenv("TODOTXT_HOME")]

Then, if a user chooses to set a TODOTXT_HOME variable, she can then run punch 
from any directory.

Original issue reported on code.google.com by t...@tompurl.com on 2 Feb 2012 at 3:07