aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLibravatar Waishnav <waishnavdeore@gmail.com>2022-09-17 06:42:59 +0530
committerLibravatar Waishnav <waishnavdeore@gmail.com>2022-09-17 06:42:59 +0530
commite03da70c3406b4e0ad9646b55922aec3c49f8c66 (patch)
tree696e31a94c4961e21bf361e717c790a121400556 /src
parentf0636d1ac0201686b22f252f3b7eaba7879553b6 (diff)
downloadshopno-os-log-sync-e03da70c3406b4e0ad9646b55922aec3c49f8c66.tar.gz
shopno-os-log-sync-e03da70c3406b4e0ad9646b55922aec3c49f8c66.zip
changed function according to 2.0 analysis function
Diffstat (limited to 'src')
-rwxr-xr-xsrc/Watcher/commands.py5
-rwxr-xr-xsrc/bin/watcher2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/Watcher/commands.py b/src/Watcher/commands.py
index 7d1fe97..8805dac 100755
--- a/src/Watcher/commands.py
+++ b/src/Watcher/commands.py
@@ -35,9 +35,8 @@ class Color:
return '\033[4m' + text + '\033[0m'
def daily_summary(date = get_date()):
- window_opened, time_spent = anls.extract_data(date)
Total_screen_time = "00:00:00"
- for x,y in anls.final_report(window_opened, time_spent).items():
+ for x,y in anls.final_report(date).items():
Total_screen_time = to.time_addition(y, Total_screen_time)
if date == get_date():
@@ -66,7 +65,7 @@ def daily_summary(date = get_date()):
print(Color.RED(f'{" App Usages":>29}'))
print(" ────────────────────────────────────────────────")
- for x,y in anls.final_report(window_opened, time_spent).items():
+ for x,y in anls.sort_data(anls.final_report(date)).items():
if x == "":
x = "Home-Screen"
print(" " + Color.GREEN(f'{x:<22}') + '\t ',f'{to.format_time(y):>12}')
diff --git a/src/bin/watcher b/src/bin/watcher
index 2644fd1..e02e9a3 100755
--- a/src/bin/watcher
+++ b/src/bin/watcher
@@ -46,7 +46,7 @@ if len(arg) == 2:
print("Log creations started... \nif you wanna stop it, use keyboard-shortcut (Ctrl+Shift+C or Ctrl+C)")
x.log_creation()
elif arg[1] == "--version" or arg[1] == "-v":
- print("Version: 1.3.1")
+ print("Version: 2.0.0")
else:
wrong_option()