aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher/commands.py
diff options
context:
space:
mode:
authorLibravatar Waishnav <waishnavdeore@gmail.com>2022-07-19 22:25:50 +0530
committerLibravatar Waishnav <waishnavdeore@gmail.com>2022-07-19 22:25:50 +0530
commit9a9c5b176997c1aec0c1c05a9fbe3d3cc26eff99 (patch)
treecfcd11cdc158d9f3fc34fa1688d124928e23c6aa /src/Watcher/commands.py
parente30c4bdfcae8b0e826c7a8a100526fe95845a933 (diff)
downloadshopno-os-log-sync-9a9c5b176997c1aec0c1c05a9fbe3d3cc26eff99.tar.gz
shopno-os-log-sync-9a9c5b176997c1aec0c1c05a9fbe3d3cc26eff99.zip
added two commands -ds -y and -ws -pw
Diffstat (limited to 'src/Watcher/commands.py')
-rwxr-xr-xsrc/Watcher/commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Watcher/commands.py b/src/Watcher/commands.py
index 5e6826e..7d1fe97 100755
--- a/src/Watcher/commands.py
+++ b/src/Watcher/commands.py
@@ -90,6 +90,9 @@ def week_summary(week = os.popen('''date +"W%V-%Y"''').read()[:-1]):
if week == os.popen('''date +"W%V-%Y"''').read()[:-1]:
print(Color.PURPLE("\n Week's screen-time\t\t ") + Color.BLUE(to.format_time(week_screen_time)))
+ elif week == os.popen("""date -d 'last week' '+W%W-%Y'""").read()[:-1]:
+ print(Color.PURPLE("\n Previous Week's \t\t ") + Color.BLUE(to.format_time(week_screen_time)))
+ print(Color.PURPLE(" Screen-Time"))
else:
print(Color.PURPLE("\n "+week[1:3]+ "th week of\t ") + Color.BLUE(to.format_time(week_screen_time)))
print(Color.PURPLE(" "+week[4:] +" screen-time\t "))