diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 75dace2..dbd8309 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -20,6 +20,8 @@ timelog['description'] = (np.where(timelog['description'].str.contains(': '), ti # 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. +# Note that contains is regex by default, so we actually have to specify pattern +# and regex false to check if it contains an asterisk! 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']))