Fix capture of pomodoro counts above 9, oops
This commit is contained in:
parent
00735f3764
commit
34eb40a092
1 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ timelog['description'] = timelog['description'].str.strip()
|
|||
# task), then multiply the time by it and remove it from the description.
|
||||
# Ensure we're splitting on the same asterisk we found: Use the end of string
|
||||
# signifier in the regular expression ($), and split from the right.
|
||||
p = re.compile(r'\*\s*\d$')
|
||||
p = re.compile(r'\*\s*\d+$')
|
||||
# On some systems, using np.where worked but others failed. Why it worked is
|
||||
# unknown but why it failed is because numpy where evaluates all parts, even
|
||||
# the parts that will never get used because the where clause does not apply!
|
||||
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue