kenenet 1.2.8__py3-none-any.whl → 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kenenet/__init__.py +26 -24
- {kenenet-1.2.8.dist-info → kenenet-1.3.0.dist-info}/METADATA +1 -1
- kenenet-1.3.0.dist-info/RECORD +5 -0
- kenenet-1.2.8.dist-info/RECORD +0 -5
- {kenenet-1.2.8.dist-info → kenenet-1.3.0.dist-info}/WHEEL +0 -0
- {kenenet-1.2.8.dist-info → kenenet-1.3.0.dist-info}/top_level.txt +0 -0
kenenet/__init__.py
CHANGED
@@ -23,35 +23,37 @@ def quick_print(message, l=None):
|
|
23
23
|
if l: sys.stdout.write(f"\033[38;2;0;255;26m{l} || {message}\033[0m\n")
|
24
24
|
else: sys.stdout.write(f"\033[38;2;0;255;26m {message}\033[0m\n")
|
25
25
|
|
26
|
-
|
27
26
|
def get_pos(timer=3.0, key='f7', timed_key='f8', kill=False):
|
28
27
|
coord_rgb = []
|
29
28
|
coords = []
|
29
|
+
def _get_pos(x, y):
|
30
|
+
with mss.mss() as sct:
|
31
|
+
region = {"left": x, "top": y, "width": 1, "height": 1}
|
32
|
+
screenshot = sct.grab(region)
|
33
|
+
rgb = screenshot.pixel(0, 0)
|
34
|
+
color = f"\033[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
|
35
|
+
reset = "\033[38;2;0;255;26m"
|
36
|
+
coord_rgb.append({'coord': (x,y), 'RGB': rgb})
|
37
|
+
coords.append((x,y))
|
38
|
+
pyperclip.copy(f'coords_rgb = {coord_rgb}\ncoords = {coords}')
|
39
|
+
quick_print(f"Added Coordinates: ({str(x).rjust(3)},{str(y).rjust(3)}), RGB: {str(rgb).ljust(15)} {color}████████{reset} to clipboard", lineno)
|
40
|
+
if kill:
|
41
|
+
quick_print('killing process')
|
42
|
+
zhmiscellany.misc.die()
|
43
|
+
|
44
|
+
def _non_timer():
|
45
|
+
x, y = zhmiscellany.misc.get_mouse_xy()
|
46
|
+
_get_pos(x, y)
|
30
47
|
|
31
|
-
def
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
x, y = zhmiscellany.misc.get_mouse_xy()
|
38
|
-
with mss.mss() as sct:
|
39
|
-
region = {"left": x, "top": y, "width": 1, "height": 1}
|
40
|
-
screenshot = sct.grab(region)
|
41
|
-
rgb = screenshot.pixel(0, 0)
|
42
|
-
color = f"\033[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
|
43
|
-
reset = "\033[38;2;0;255;26m"
|
44
|
-
coord_rgb.append({'coord': (x, y), 'RGB': rgb})
|
45
|
-
coords.append((x, y))
|
46
|
-
pyperclip.copy(f'coords_rgb = {coord_rgb}\ncoords = {coords}')
|
47
|
-
quick_print(f"Added Coordinates: ({str(x).rjust(3)},{str(y).rjust(3)}), RGB: {str(rgb).ljust(15)} {color}████████{reset} to clipboard", lineno)
|
48
|
-
if kill:
|
49
|
-
quick_print('killing process')
|
50
|
-
zhmiscellany.misc.die()
|
48
|
+
def _timer():
|
49
|
+
x, y = zhmiscellany.misc.get_mouse_xy()
|
50
|
+
quick_print(f'waiting {timer} seconds')
|
51
|
+
time.sleep(timer)
|
52
|
+
_get_pos(x, y)
|
53
|
+
|
51
54
|
quick_print(f'Press {key} for cursor info (or {timed_key} for a {timer}s wait before), automatically copies coords/rgb to clipboard')
|
52
|
-
|
53
|
-
|
54
|
-
_get_pos(key, timed_key, kill)
|
55
|
+
keyboard.on_press_key('f7', lambda e: _non_timer())
|
56
|
+
keyboard.on_press_key('f8', lambda e: _timer())
|
55
57
|
|
56
58
|
def timer(clock=1):
|
57
59
|
if clock in timings:
|
@@ -0,0 +1,5 @@
|
|
1
|
+
kenenet/__init__.py,sha256=oONsRfwGQL6WQwAANtl6546RVaHBkvGuwdT08_02E6o,23195
|
2
|
+
kenenet-1.3.0.dist-info/METADATA,sha256=rw-wf3MvT8xZOAXX50MxVh0MRhKdAYpNR0U16DOYawk,1693
|
3
|
+
kenenet-1.3.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
+
kenenet-1.3.0.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
+
kenenet-1.3.0.dist-info/RECORD,,
|
kenenet-1.2.8.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
kenenet/__init__.py,sha256=pC2aI-XC9xCejz5w010RveABpYSD552Orx6QKCsK7os,23268
|
2
|
-
kenenet-1.2.8.dist-info/METADATA,sha256=aUVGc29RSna8gfInlXRJdkIOwGg6Oq8gSMBvpGSjUMA,1693
|
3
|
-
kenenet-1.2.8.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
-
kenenet-1.2.8.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
-
kenenet-1.2.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|