From 1f6fdd55fe34c9d587424c1884e02e0521d1dd49 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 29 Mar 2015 12:58:22 +0200 Subject: [PATCH 1/1] Detect data location and do not nest recurrence generation --- on-add-shift-all-recurrence | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/on-add-shift-all-recurrence b/on-add-shift-all-recurrence index 0a0f065..87817f8 100755 --- a/on-add-shift-all-recurrence +++ b/on-add-shift-all-recurrence @@ -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']) -- 2.39.5