From fcb213e05828a200a5d6481f8213f46617f5c28a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 26 Nov 2024 09:30:47 -0500 Subject: [PATCH 1/2] Avoid crashing and burning if no prior recorded time --- settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index c51fcd6..4e8a66e 100644 --- a/settings.py +++ b/settings.py @@ -37,7 +37,8 @@ def pomodoro_logpath(): def pomodoro_latest_recorded(timestamp = None): if timestamp: - config.set('pomodoro', 'second_latest_recorded', pomodoro.get('latest_recorded', None)) + if pomodoro.get('latest_recorded', None): + config.set('pomodoro', 'second_latest_recorded', pomodoro.get('latest_recorded')) config.set('pomodoro', 'latest_recorded', str(timestamp)) write() else: From b9de1004df2256b6d80decbd0285bd949f8e806a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 26 Nov 2024 09:38:57 -0500 Subject: [PATCH 2/2] Give camp shortcut keyword to Drupal camps --- pomodoro_to_harvest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index bc7bdf2..40bf796 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -146,7 +146,7 @@ compound_project_tasks = { "Find It Cambridge — Contributing back to the community": ["Find It Contrib"], "Find It Cambridge — Planning": ["Find It project management"], "Internal — Contributing back to the community": ["Contrib", "Agaric: contrib", "Contributing", "Agaric contrib", "Agaric contributions"], - "Internal — Conferences & Meetups": ["Conference", "Cons", "Camps", "Conferences", "meetup", "meetups"], # Note camp is not here because that maps to Near North camp + "Internal — Conferences & Meetups": ["Conference", "Cons", "Camps", "Camp", "Conferences", "meetup", "meetups"], "Internal — Content": ["Agaric site content", "Agaric content", "content", "blog", "blogging", "writing", "content writing"], "Internal — Documentation": ["documentation", "docs", "documenting"], "Internal — Marketing": ["marketing", "Agaric marketing", "promotion", "Agaric promotion"], @@ -229,7 +229,7 @@ harvest_project_names = { "C-Team support": ["ZEIT", "ZEIT ONLINE", "ZEIT Upgrade", "Zeit D9"], } other_project_names = { - "Near North camp": ["Near North Camp", "Near North defense", "Encampment support", "Camp support", "NN camp defense", "NN camp", "NN defense", "Near North camp defense", "Camp", "Near North", "Encampment Defense"], + "Near North camp": ["Near North Camp", "Near North defense", "Encampment support", "Camp support", "NN camp defense", "NN camp", "NN defense", "Near North camp defense", "Near North", "Encampment Defense"], "Personal": ["Personal/external", "Personal / external", "External"], "Tzedakah": ["Community support"], "PWGD": ["People Who Give a Damn", "PWGD Inc"],