aboutsummaryrefslogtreecommitdiff
path: root/src/bin/watcher
diff options
context:
space:
mode:
authorLibravatar Waishnav <waishnavdeore@gmail.com>2022-07-09 00:11:48 +0530
committerLibravatar Waishnav <waishnavdeore@gmail.com>2022-07-09 00:11:48 +0530
commitf0e484878af5b86b723de6af5f506f8b18e66ddc (patch)
tree0e688955119acf9598a85fdcba77ce21c104b327 /src/bin/watcher
parent255487a34700d6790a2771a177c16991caaca72f (diff)
parentac79bbea7b113613bf160512064b8e2478181db9 (diff)
downloadshopno-os-log-sync-f0e484878af5b86b723de6af5f506f8b18e66ddc.tar.gz
shopno-os-log-sync-f0e484878af5b86b723de6af5f506f8b18e66ddc.zip
Update 1.2 | AFK feature | New algorithm to update log file at each second
Diffstat (limited to 'src/bin/watcher')
-rw-r--r--[-rwxr-xr-x]src/bin/watcher12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/watcher b/src/bin/watcher
index 2835a7f..4bea832 100755..100644
--- a/src/bin/watcher
+++ b/src/bin/watcher
@@ -1,11 +1,11 @@
-#!/usr/bin/python3
-
+#!/usr/bin/python
import os
import sys
sys.path.insert(0, "/usr/share/Watcher/")
import watch_log as x
-from colored_text import Color
+from commands import Color
import commands as cmd
+from analysis import weeklly_logs
def help_option():
print(Color.BLUE("Watcher") + " - Minimal open source screen-time tracker\n")
@@ -23,15 +23,15 @@ try:
if arg == "-ds" or arg == "--day-summary":
cmd.daily_summary()
elif arg == "-ws" or arg == "--week-summary":
- os.popen("python3 /usr/share/Watcher/week_analysis.py")
+ weeklly_logs()
cmd.week_summary()
elif arg == "-h" or arg == "--help":
help_option()
elif arg == "--start":
- print("Log creations started... \nif you wanna stop it, use keyboard-shortcut (Ctrl+Shift+C)")
+ print("Log creations started... \nif you wanna stop it, use keyboard-shortcut (Ctrl+Shift+C or Ctrl+C)")
x.log_creation()
elif arg == "--version":
- print("Version: 1.0")
+ print("Version: 1.2")
else:
print(Color.RED("Wrong")+" [OPTION] choosen. Have a look at the Options!!\n")
print(Color.YELLOW("OPTIONS"))