]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Detect data location and do not nest recurrence generation
authorTomas Babej <tomasbabej@gmail.com>
Sun, 29 Mar 2015 10:58:22 +0000 (12:58 +0200)
committerTomas Babej <tomasbabej@gmail.com>
Sun, 29 Mar 2015 10:58:22 +0000 (12:58 +0200)
on-add-shift-all-recurrence

index 0a0f065283f412b45f128d7092940b99fbfdd89c..87817f826247684f286fc37ce2dce0efbf3416f8 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys
+import os
 from tasklib.task import Task, TaskWarrior
 
 time_attributes = ('wait', 'until', 'scheduled')
@@ -17,7 +18,8 @@ def is_new_local_recurrence_child_task(task):
         return True
 
 task = Task.from_input()
-tw = TaskWarrior()
+tw = TaskWarrior(data_location=os.path.dirname(os.path.dirname(sys.argv[0])))
+tw.config.update(dict(recurrence="no"))
 
 if is_new_local_recurrence_child_task(task):
     parent = tw.tasks.get(uuid=task['parent'])