From 00735f37644bb3ab6ee0a288ec9df33d0a62bc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Wed, 12 Oct 2022 13:32:04 -0400 Subject: [PATCH] Try not including spaces when splitting tasks etc off projects, subprojects --- 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 77df0f9..472d7a8 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -160,8 +160,8 @@ for preferred, alternatives in compound_project_tasks.items(): # If a compound project was specified, break that out into a sub-project (in # Harvest, we use Task, which is really task type, for this). -timelog['subproject'] = (np.where(timelog['project'].str.contains(' — '), timelog['project'].str.split(' — ', 1).str[1], None)) -timelog['project'] = (np.where(timelog['project'].str.contains(' — '), timelog['project'].str.split(' — ', 1).str[0], timelog['project'])) +timelog['subproject'] = (np.where(timelog['project'].str.contains('—'), timelog['project'].str.split('—', 1).str[1], None)) +timelog['project'] = (np.where(timelog['project'].str.contains('—'), timelog['project'].str.split('—', 1).str[0], timelog['project'])) # Replace irregular-but-known project names with ones timetracking tools use. harvest_project_names = {