Include date in filename for less chance of mistakes and easier archiving
This commit is contained in:
parent
fab23d3090
commit
7bfb46dff3
1 changed files with 4 additions and 3 deletions
|
@ -199,6 +199,7 @@ tl = timelog.groupby(["date", timelog.project.fillna(""), timelog.subproject.fil
|
||||||
# want to factor out all of the above non-Harvest-specific logic.
|
# want to factor out all of the above non-Harvest-specific logic.
|
||||||
|
|
||||||
latest = tl.recorded.max()
|
latest = tl.recorded.max()
|
||||||
|
datest = str(tl.date.max())
|
||||||
|
|
||||||
# Separate Harvest from non-Harvest projects, and also filter out any blank
|
# Separate Harvest from non-Harvest projects, and also filter out any blank
|
||||||
# projects, but save those too for a CSV of the excluded items.
|
# projects, but save those too for a CSV of the excluded items.
|
||||||
|
@ -215,9 +216,9 @@ harvest["Client"] = harvest["Project"].map(project_client_mapping)
|
||||||
harvest.drop(columns = ['started', 'recorded', 'time'], inplace=True)
|
harvest.drop(columns = ['started', 'recorded', 'time'], inplace=True)
|
||||||
|
|
||||||
if not debug:
|
if not debug:
|
||||||
harvest.to_csv('harvest-timesheets.csv', index=False)
|
harvest.to_csv('harvest-timesheets-' + datest + '.csv', index=False)
|
||||||
other.to_csv('personal-other.csv', index=False)
|
other.to_csv('personal-other-' + datest + '.csv', index=False)
|
||||||
unknown.to_csv('unknown.csv', index=False)
|
unknown.to_csv('unknown-' + datest + '.csv', index=False)
|
||||||
settings.pomodoro_latest_recorded(latest)
|
settings.pomodoro_latest_recorded(latest)
|
||||||
else:
|
else:
|
||||||
hrvst_grouped = hrvst.groupby("project").agg({"time": "sum"})["time"]/60
|
hrvst_grouped = hrvst.groupby("project").agg({"time": "sum"})["time"]/60
|
||||||
|
|
Loading…
Reference in a new issue