diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index f29ea82..102a9b1 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -165,6 +165,10 @@ for preferred, alternatives in compound_project_tasks.items(): timelog['subproject'] = (np.where(timelog['project'].str.contains(' — '), timelog['project'].str.split(' — ', n=1).str[1], None)) timelog['project'] = (np.where(timelog['project'].str.contains(' — '), timelog['project'].str.split(' — ', n=1).str[0], timelog['project'])) +# Trim any surrounding whitespace from final project and sub-project/task. +timelog['subproject'] = timelog['subproject'].str.strip() +timelog['project'] = timelog['project'].str.strip() + # Replace irregular-but-known project names with ones timetracking tools use. harvest_project_names = { "Everyday AI Project": ["EverydayAI", "MIT Scheller Teacher Education Program (STEP) Lab", "Education Arcade", "Everyday AI", "Everday AI", "EA"],