Fix both filtering and an opposite logic error and our newest feature is done
This commit is contained in:
parent
a1c0434015
commit
ca5417ae93
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ timelog["recorded"] = pd.to_datetime(timelog["recorded"]).dt.tz_convert("US/East
|
||||||
|
|
||||||
latest_recorded = settings.pomodoro_latest_recorded()
|
latest_recorded = settings.pomodoro_latest_recorded()
|
||||||
if latest_recorded:
|
if latest_recorded:
|
||||||
timelog = timelog.query("recorded>" + latest_recorded)
|
timelog = timelog[timelog.recorded > pd.to_datetime(latest_recorded)]
|
||||||
|
|
||||||
timelog["time"] = 30
|
timelog["time"] = 30
|
||||||
# A pomodoro started before 3am Eastern time is considered to be a continuation
|
# A pomodoro started before 3am Eastern time is considered to be a continuation
|
||||||
|
@ -96,7 +96,7 @@ for preferred, alternatives in replacement_project_names.items():
|
||||||
# The fillna is essential or we drop entries with blank ('None') projects.
|
# 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()
|
tl = timelog.groupby(["date", timelog.project.fillna(""), "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index()
|
||||||
|
|
||||||
if hasattr(sys, 'ps1'):
|
if not hasattr(sys, 'ps1'):
|
||||||
tl.to_csv('harvest-ready.csv', index=False)
|
tl.to_csv('harvest-ready.csv', index=False)
|
||||||
settings.pomodoro_latest_recorded(tl.recorded.max())
|
settings.pomodoro_latest_recorded(tl.recorded.max())
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue