Allow attempted emdash (three dashes where i missed the compose key)

This commit is contained in:
benjamin melançon 2025-07-01 12:29:40 -04:00
parent 46af4d7d41
commit 3563f92eee

View file

@ -166,6 +166,10 @@ for preferred, alternatives in compound_project_tasks.items():
alternatives = [item.lower() for item in alternatives]
timelog.loc[timelog.project.str.lower().isin(alternatives), "project"] = preferred
# Replace single dashes, en-dashes, and attempts at em-dashes with emdashes
# because apparently i really only accepted emdashes for all this time and
# never noticed because i use them so consistently.
timelog['project'] = timelog['project'].str.replace('---', '', regex=False);
# 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('', n=1).str[1], None))