aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher/week_analysis.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/Watcher/week_analysis.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Watcher/week_analysis.py b/src/Watcher/week_analysis.py
index 1f064b2..a82b5f3 100755
--- a/src/Watcher/week_analysis.py
+++ b/src/Watcher/week_analysis.py
@@ -10,7 +10,7 @@ def get_dates():
# The start of the week
start = theday - datetime.timedelta(days=weekday)
# build a simple range
- dates = [start + datetime.timedelta(days=d) for d in range(weekday+1)]
+ dates = [start + datetime.timedelta(days=d) for d in range(weekday + 1)]
dates = [str(d) for d in dates]
return dates
@@ -19,7 +19,7 @@ def weekday_from_date(date):
day = os.popen('''date -d "'''+ date + '''" +%a''').read()
return day[0:-1]
-W_Y = os.popen('''date +"W%U-%Y"''').read()[0:-1]
+W_Y = os.popen('''date +"W%V-%Y"''').read()[0:-1]
user = os.getlogin()
filename = "/home/"+user+"/.cache/Watcher/Analysis/"+W_Y+".csv"
with open(filename, "w") as csvfile:
@@ -39,7 +39,7 @@ with open(filename, "w") as csvfile:
for i in dates:
x, y = rc.extract_data(str(i))
- window_opened += x # smth is wrong here
+ window_opened += x
time_spent += y
for x, y in rc.final_report(window_opened, time_spent).items():
csvwriter.writerow([y, x])