From b741b83b14561aa341aa3d12056411a79c092eda Mon Sep 17 00:00:00 2001 From: Hoffelhas Date: Fri, 13 Jan 2023 21:32:06 +0100 Subject: [PATCH] Added possibility to ignore section labelling by providing a * either at the start or end of the section name. Useful for additional flexibility with e.g. kanban board. --- autodoist.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autodoist.py b/autodoist.py index 941574f..db88eb4 100644 --- a/autodoist.py +++ b/autodoist.py @@ -964,9 +964,18 @@ def autodoist_magic(args, api, connection): # Reset first_found[0] = False + disable_section_labelling = 0 for section in sections: + # Check if section labelling is disabled (useful for e.g. Kanban) + if next_action_label is not None: + try: + if section.name.startswith('*') or section.name.endswith('*'): + disable_section_labelling = 1 + except: + pass + # Check db existance db_check_existance(connection, section) @@ -1057,7 +1066,7 @@ def autodoist_magic(args, api, connection): continue # Remove clean all task and subtask data - if task.content.startswith('*'): + if task.content.startswith('*') or disable_section_labelling: remove_label(task, next_action_label, overview_task_ids, overview_task_labels) db_update_value(connection, task, 'task_type', None)