diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 15e698c..c92f0fa 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -156,9 +156,16 @@ tl = timelog.groupby(["date", timelog.project.fillna(""), "description"]).agg({" latest = tl.recorded.max() +# Filter out any blank projects and any projects we know are not in Harvest. +# We also do the opposite to get a CSV of the excluded items. +non_harvest_list = ["", "Personal", "Near North camp"] +other = tl[tl.project.isin(non_harvest_list)] +harvest = tl[~tl.project.isin(non_harvest_list)] + + if not debug: - hvts.to_csv('harvest-timesheets.csv', index=False) - noth.to_csv('not-harvest.csv' + harvest.to_csv('harvest-timesheets.csv', index=False) + other.to_csv('not-harvest.csv', index=False) 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.")