diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 22d45e0..75dace2 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -18,6 +18,10 @@ timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name() 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'])) +# If a multiplier has been provided (an asterisk and an integer at the end of a +# task), then multiply the time by it and remove it from the description. +timelog['tmp_multiplier'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[1], None)) +timelog['description'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[0], timelog['description'])) # Condense duplicate entries by date, summing the minutes spent, and listing # the first started and last recorded times for each task.