diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 14dc50b..22d45e0 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -13,6 +13,8 @@ timelog["time"] = 30 timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name() +# If a project has been specified (task prefixed with a colon), then put the +# project in its own column. timelog['project'] = (np.where(timelog['description'].str.contains(': '), timelog['description'].str.split(': ', 1).str[0], None)) timelog['description'] = (np.where(timelog['description'].str.contains(': '), timelog['description'].str.split(': ', 1).str[1], timelog['description']))