diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 87617df..a8ea34d 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -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.")