From 6ac8b5fd6f4bd7f7c8e0f97aaafff8f1b1382da4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 31 Oct 2021 17:34:49 +0100 Subject: [PATCH] Fix task adding and debug option printing --- open-todo-txt.py | 4 ++-- options.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/open-todo-txt.py b/open-todo-txt.py index daee1af..d8df90b 100755 --- a/open-todo-txt.py +++ b/open-todo-txt.py @@ -72,7 +72,7 @@ def log_completed_to_taskwarrior(task_string, date, options): "task", *overrides, "log", - f'"{task_string}"', + task_string, f"entry:{date}", f"end:{date}", get_prio_string(task_string), @@ -100,7 +100,7 @@ def add_incomplete_to_taskwarrior(task_string, date, options): "task", *overrides, "add", - f'"{task_string}"', + task_string, f"entry:{date}", f"scheduled:{date}", get_prio_string(task_string), diff --git a/options.py b/options.py index b194e3e..2e3cd4c 100644 --- a/options.py +++ b/options.py @@ -28,7 +28,8 @@ class Options: def init(): opt = Options() parse_cmdline_args(opt) - dryrun_show_options(opt) + if opt.dryrun: + dryrun_show_options(opt) return opt