-
Notifications
You must be signed in to change notification settings - Fork 0
/
hamster.1m.py
executable file
·197 lines (167 loc) · 15.8 KB
/
hamster.1m.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
import os
import sys
import csv
import itertools
import functools
from subprocess import Popen, PIPE
from datetime import date, timedelta, datetime
from dataclasses import dataclass
from collections import Counter
from xdg.BaseDirectory import xdg_data_home
from shutil import which
from enum import Enum, auto
class Version(Enum):
ONE = auto()
TWO = auto()
##### Customization
# Shall we use an icon instead of the current activity in the
USE_ICON=False
# Choose your hamster version
# ⚠ hamster 1.04 doesn't leave when the window to add new activity
# is closed and as such it will leave many backround processes.
HAMSTER_VERSION = Version.TWO
# HAMSTER_VERSION : Version.ONE
# How many days to look back in the past in order to get past activities
DAYS = 14
# Whether to rank recent activities by age and frequency
AGE_FREQUENCY_RANKING = False
# Whether to include the description for recent activities
USE_DESCRIPTION = True
MENU_COLOR = "#919191"
MENU_SIZE = 10
# scale factor for your DPI
SCALE = '1'
###### End of customization
scale = float(SCALE)
iconHeight = str(int(24 * scale))
iconWidth = str(int(30 * scale))
MENU_WIDTH = 18 # monospace chars
if which("inotifywait"):
# command to wait for change to hamster.db then touch this script
dbpath = os.path.join(xdg_data_home, 'hamster-applet', 'hamster.db')
script = '~/.config/argos/' + os.path.basename(sys.argv[0])
touchScript = f'; inotifywait "{dbpath}" -e modify ; touch {script}'
else:
touchScript = ""
if HAMSTER_VERSION is Version.TWO:
ADD_ACTIVITY_CMD = f"hamster add {touchScript}" # For hamster 2+
else:
ADD_ACTIVITY_CMD = f"hamster {touchScript}" # For hamster 1.04
def hamster(cmd, strip=True):
proc = Popen(f"LC_ALL=C hamster {cmd}", stdout=PIPE, shell=True)
res, _ = proc.communicate()
proc.wait()
res = res.decode('utf8')
if strip:
return res.strip()
else:
return res
def dec2sex(hd:int) -> str:
m, s = divmod(hd*3600, 60)
h, m = divmod(m, 60)
h = int(h)
m = int(m)
if m:
return f"{h}h{m}m"
else:
return f"{h}h"
def recent_activities():
""" Return a sequence of (activity, category, description, tags)
corresponding to the last uniques activities seen DAYS before"""
today = date.today()
now = today.isoformat()
before = (date.today() - timedelta(days=DAYS)).isoformat()
act = hamster(f"export tsv {before} {now}", strip=False).split("\n")[1:-2]
rank = Counter()
for activity, start, end, duration, category, description, tags \
in csv.reader(act, delimiter="\t"):
desctxt = ", " + description if description and USE_DESCRIPTION else ""
fact = f"{activity}@{category}{desctxt} "
tagtxt = " #%s" % " #".join(tags.split(', ')) if tags else ""
# Build fact txt without spurious comma
fact = f"{fact}{tagtxt}" if desctxt else ','.join(filter(None,(fact, tagtxt)))
if AGE_FREQUENCY_RANKING:
# same rough age-frequency ranking used in hamster
start = datetime.strptime(start[:10], "%Y-%m-%d").date()
rank[fact] += DAYS - int((today - start).days)
else:
rank[fact] = 1
if AGE_FREQUENCY_RANKING:
return [k for (v, k) in reversed(sorted(((v, k) for (k, v) in rank.items())))]
else:
return list(sorted(rank))
@dataclass
class Hamster():
current_full: str = ''
current_activity: str = ''
active: bool = False
def task_bar(self):
self.current_full = hamster("current")
self.current_activity = self.current_full
if self.current_activity != "No activity":
a = " ".join(self.current_full.split('@')[0].split()[2:]) # activity
self.current_activity = a + " " + self.current_full[-5:] # time
self.active = True
if USE_ICON:
print(f" |image={ICON} imageHeight={iconHeight} imageWidth={iconWidth}")
else:
print(self.current_activity)
print("---")
def header(self):
thisfile = os.path.abspath(__file__)
print(f"Current activity | size={MENU_SIZE} | color={MENU_COLOR}")
begin = "<span font_family='monospace'>"
end = f"<b>+</b></span> | terminal=false refresh=true " \
f"bash='{ADD_ACTIVITY_CMD}'"
if self.active:
txt = " ".join(self.current_full.split(',')[0].split()[2:])
else:
txt = self.current_activity
spaces = " " * (max(1, MENU_WIDTH-len(txt)))
print(f"{begin}{txt}{spaces}{end}")
if self.active:
print("Stop Tracking | terminal=false refresh=true bash='hamster stop'")
def recent(self):
print(f"Recent activities | size={MENU_SIZE} | color={MENU_COLOR}")
for fact in recent_activities():
print(f"-- {fact} | terminal=false refresh=true "
f"bash=\'hamster start \"{fact}\"\'")
def footer(self ):
print("---")
print("Show Overview | terminal=false"
" refresh=true bash='hamster overview {touchScript}'")
if HAMSTER_VERSION == Version.ONE:
fulltotal = hamster("list").split("\n")[-1]
total = sum(map(
lambda x: float(x.split(':')[1][:-1]),
fulltotal.split(',')))
total = dec2sex(total)
else:
actlist = hamster("list").split("\n")[2:]
total = actlist[-1].split(':')[1][:-2]\
.replace(" 0m","").replace(' ','') or "0h"
# find end of array
for i,l in enumerate(actlist):
if l.startswith("------"):
break
# Remove "in" de "min", remove empty hours and minutes, and spaces
fulltotal = ",".join(map(lambda x: x[:-2]
.replace(" 0h 0m","0h")\
.replace(" 0m","")\
.replace(" 0h","")\
.replace(" ",""),
actlist[i+1:-1]))
print(f"<b>total</b>: {total} "
+ (f"<small>({fulltotal})</small>" if fulltotal else "")
+ f" | color={MENU_COLOR}")
def generate(self):
self.task_bar()
self.header()
self.recent()
self.footer()
# Hamster SVG icon
ICON="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLSBDcmVhdGVkIHdpdGggSW5rc2NhcGUgKGh0dHA6Ly93d3cuaW5rc2NhcGUub3JnLykgLS0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