Start to prepare for Harvest timelogs precise format export

This commit is contained in:
benjamin melançon 2021-06-01 11:23:45 -04:00
parent 91643f088d
commit eb3560bb3e

View file

@ -146,8 +146,14 @@ for preferred, alternatives in replacement_project_names.items():
# The fillna is essential or we drop entries with blank ('None') projects.
tl = timelog.groupby(["date", timelog.project.fillna(""), "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index()
# We're doing the final conversion to Harvest as a separate step because we
# want to factor out all of the above non-Harvest-specific logic.
latest = tl.recorded.max()
if not debug:
tl.to_csv('harvest-ready.csv', index=False)
settings.pomodoro_latest_recorded(tl.recorded.max())
hvts.to_csv('harvest-timesheets.csv', index=False)
noth.to_csv('not-harvest.csv'
settings.pomodoro_latest_recorded(latest)
else:
print("We do not write to the harvest-ready.csv nor update the latest recorded setting when run interactively in the python shell.")