From 0b61f165e312c33d6ed075742197e4c73905b965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Wed, 2 Jun 2021 05:58:42 -0400 Subject: [PATCH] Start conversion to Harvest column titles --- pomodoro_to_harvest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 62e72d5..9c9763c 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -166,13 +166,15 @@ 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"] +# Separate Harvest from non-Harvest projects, and also filter out any blank +# projects, but save those too for a CSV of the excluded items. harvest = tl[tl.project.isin(harvest_project_names.keys())] other = tl[tl.project.isin(other_project_names.keys())] unknown = tl[~tl.project.isin(replacement_project_names.keys())] +harvest.rename(columns = {'date': 'Date', 'project': 'Project', 'description': 'Note'}, inplace = True) +harvest["First name"] = "Benjamin" +harvest["Last name"] = "Melançon" if not debug: harvest.to_csv('harvest-timesheets.csv', index=False)