kenenet 0.3.3__py3-none-any.whl → 0.3.8__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 CHANGED
@@ -1,7 +1,9 @@
1
- import inspect, sys, zhmiscellany, keyboard, mss, time, linecache, types, os
1
+ import inspect, sys, zhmiscellany, keyboard, mss, time, linecache, types, os, random, pyperclip
2
2
  import numpy as np
3
3
  from PIL import Image
4
4
  global timings, ospid
5
+ from pydub import AudioSegment
6
+ from pydub.playback import play
5
7
  ospid = None
6
8
  timings = {}
7
9
 
@@ -11,6 +13,7 @@ def quick_print(message, l=None):
11
13
 
12
14
 
13
15
  def get_pos(key='f10', kill=False):
16
+ coordinates = []
14
17
  def _get_pos(key, lineno):
15
18
  while True:
16
19
  keyboard.wait(key)
@@ -20,14 +23,18 @@ def get_pos(key='f10', kill=False):
20
23
  screenshot = sct.grab(region)
21
24
  rgb = screenshot.pixel(0, 0)
22
25
  color = f"\033[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
23
- reset = "\033[0m"
24
- quick_print(f"Coordinates: ({x}, {y}), RGB: {rgb} {color}████████{reset}", lineno)
26
+ reset = "\033[38;2;0;255;26m"
27
+ coordinates.append({'coord': (x,y), 'RGB': rgb})
28
+ pyperclip.copy(coordinates)
29
+ quick_print(f"Added Coordinates: ({x}, {y}), RGB: {rgb} {color}████████{reset} to clipboard", lineno)
25
30
  if kill:
26
31
  quick_print('killing process')
27
32
  zhmiscellany.misc.die()
33
+ quick_print(f'Press {key} when ever you want the location')
28
34
  frame = inspect.currentframe().f_back
29
35
  lineno = frame.f_lineno
30
- zhmiscellany.processing.start_daemon(target=_get_pos, args=(key, lineno, ))
36
+ _get_pos(key=key, kill=kill)
37
+ # zhmiscellany.processing.start_daemon(target=_get_pos, args=(key, lineno, ))
31
38
 
32
39
  def timer(clock=1):
33
40
  if clock in timings:
@@ -144,6 +151,14 @@ def save_img(img, name='', reset=True, file='temp_screenshots'):
144
151
  else:
145
152
  quick_print(f"Your img is not a fucking numpy array you twat, couldn't save {name}", lineno)
146
153
 
154
+ def load_audio(mp3_path):
155
+ return AudioSegment.from_mp3(mp3_path)
156
+
157
+ def play_audio(file_sound, range=(0.9, 1.1)):
158
+ sound = file_sound
159
+ sound = sound._spawn(sound.raw_data, overrides={'frame_rate': int(sound.frame_rate * random.uniform(*range))})
160
+ zhmiscellany.processing.multiprocess_threaded(play, (sound,))
161
+
147
162
  class k:
148
163
  pass
149
164
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kenenet
3
- Version: 0.3.3
3
+ Version: 0.3.8
4
4
  Summary: dude what the fuck even is this package
5
5
  Home-page: https://www.youtube.com/@KiddyKene
6
6
  Author: kiddykene
@@ -11,5 +11,10 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: Microsoft :: Windows
12
12
  Requires-Python: >=3.6
13
13
  Description-Content-Type: text/markdown
14
+ Requires-Dist: zhmiscellany
15
+ Requires-Dist: mss
16
+ Requires-Dist: pillow
17
+ Requires-Dist: pydub
18
+ Requires-Dist: pyperclip
14
19
 
15
20
  sucky
@@ -0,0 +1,5 @@
1
+ kenenet/__init__.py,sha256=nkz6CUtP7np7X7wjvee4mYs8Ru2evHOgee5rgZAgaj8,6575
2
+ kenenet-0.3.8.dist-info/METADATA,sha256=OGwx0Hl8cucNNJMCDLjzXdkGaWGAja5KxGG6-TnTArI,633
3
+ kenenet-0.3.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
+ kenenet-0.3.8.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
+ kenenet-0.3.8.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- kenenet/__init__.py,sha256=mh1DTHPUVh0xeqNA5W7-1jp84afONMmtT861ND8vna4,5897
2
- kenenet-0.3.3.dist-info/METADATA,sha256=dQS4Hcqff-vLrAUu7Ql_FMjWETliqn_jH3nEKO-C4xU,513
3
- kenenet-0.3.3.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
- kenenet-0.3.3.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
- kenenet-0.3.3.dist-info/RECORD,,