GameSentenceMiner 2.14.6__py3-none-any.whl → 2.14.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.
- GameSentenceMiner/obs.py +1 -1
- GameSentenceMiner/ocr/owocr_helper.py +12 -4
- GameSentenceMiner/owocr/owocr/ocr.py +4 -5
- GameSentenceMiner/util/configuration.py +1 -1
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/RECORD +10 -10
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.14.6.dist-info → gamesentenceminer-2.14.8.dist-info}/top_level.txt +0 -0
GameSentenceMiner/obs.py
CHANGED
@@ -476,8 +476,6 @@ def add_ss_hotkey(ss_hotkey="ctrl+shift+g"):
|
|
476
476
|
img = run.apply_ocr_config_to_image(img, ocr_config, is_secondary=True)
|
477
477
|
do_second_ocr("", datetime.now(), img, TextFiltering(lang=get_ocr_language()), ignore_furigana_filter=True, ignore_previous_result=True)
|
478
478
|
|
479
|
-
if not manual:
|
480
|
-
keyboard.add_hotkey(get_ocr_manual_ocr_hotkey().lower(), ocr_secondary_rectangles)
|
481
479
|
secret_ss_hotkey = "F14"
|
482
480
|
filtering = TextFiltering(lang=get_ocr_language())
|
483
481
|
cropper = ScreenCropper()
|
@@ -495,19 +493,29 @@ def add_ss_hotkey(ss_hotkey="ctrl+shift+g"):
|
|
495
493
|
hotkey_reg = None
|
496
494
|
try:
|
497
495
|
hotkey_reg = keyboard.add_hotkey(ss_hotkey, capture)
|
496
|
+
if not manual:
|
497
|
+
secondary_hotkey_reg = keyboard.add_hotkey(get_ocr_manual_ocr_hotkey().lower(), ocr_secondary_rectangles)
|
498
498
|
if "f13" in ss_hotkey.lower():
|
499
|
-
keyboard.add_hotkey(secret_ss_hotkey, capture_main_monitor)
|
499
|
+
secret_hotkey_reg = keyboard.add_hotkey(secret_ss_hotkey, capture_main_monitor)
|
500
500
|
print(f"Press {ss_hotkey} to take a screenshot.")
|
501
501
|
except Exception as e:
|
502
502
|
if hotkey_reg:
|
503
503
|
keyboard.remove_hotkey(hotkey_reg)
|
504
|
+
if secondary_hotkey_reg:
|
505
|
+
keyboard.remove_hotkey(secondary_hotkey_reg)
|
506
|
+
if secret_hotkey_reg:
|
507
|
+
keyboard.remove_hotkey(secret_hotkey_reg)
|
504
508
|
logger.error(f"Error setting up screenshot hotkey with keyboard, Attempting Backup: {e}")
|
505
509
|
logger.debug(e)
|
506
510
|
pynput_hotkey = ss_hotkey.replace("ctrl", "<ctrl>").replace("shift", "<shift>").replace("alt", "<alt>")
|
511
|
+
secret_ss_hotkey = secret_hotkey_reg.replace("ctrl", "<ctrl>").replace("shift", "<shift>").replace("alt", "<alt>")
|
512
|
+
secondary_ss_hotkey = secondary_hotkey_reg.replace("ctrl", "<ctrl>").replace("shift", "<shift>").replace("alt", "<alt>")
|
507
513
|
try:
|
508
514
|
from pynput import keyboard as pynput_keyboard
|
509
515
|
listener = pynput_keyboard.GlobalHotKeys({
|
510
|
-
pynput_hotkey: capture
|
516
|
+
pynput_hotkey: capture,
|
517
|
+
secondary_ss_hotkey: ocr_secondary_rectangles,
|
518
|
+
secret_ss_hotkey: capture_main_monitor
|
511
519
|
})
|
512
520
|
listener.start()
|
513
521
|
print(f"Press {pynput_hotkey} to take a screenshot.")
|
@@ -1424,10 +1424,10 @@ class localLLMOCR:
|
|
1424
1424
|
self.keep_warm = config.get('keep_warm', True)
|
1425
1425
|
self.custom_prompt = config.get('prompt', None)
|
1426
1426
|
self.available = True
|
1427
|
-
if any(x in self.api_url for x in ['localhost', '127.0.0.1']):
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1427
|
+
# if any(x in self.api_url for x in ['localhost', '127.0.0.1']):
|
1428
|
+
# if not self.check_connection(self.api_url):
|
1429
|
+
# logger.warning('Local LLM OCR API is not reachable')
|
1430
|
+
# return
|
1431
1431
|
self.client = openai.OpenAI(
|
1432
1432
|
base_url=self.api_url.replace('/v1/chat/completions', '/v1'),
|
1433
1433
|
api_key=self.api_key
|
@@ -1442,7 +1442,6 @@ class localLLMOCR:
|
|
1442
1442
|
logger.warning(f'Error initializing Local LLM OCR, Local LLM OCR will not work!')
|
1443
1443
|
|
1444
1444
|
def check_connection(self, url, port=None):
|
1445
|
-
# simple connectivity check with mega low timeout
|
1446
1445
|
import http.client
|
1447
1446
|
conn = http.client.HTTPConnection(url, port or 1234, timeout=0.1)
|
1448
1447
|
try:
|
@@ -17,7 +17,6 @@ from dataclasses_json import dataclass_json
|
|
17
17
|
|
18
18
|
from importlib import metadata
|
19
19
|
|
20
|
-
import requests
|
21
20
|
|
22
21
|
|
23
22
|
OFF = 'OFF'
|
@@ -361,6 +360,7 @@ def get_current_version():
|
|
361
360
|
|
362
361
|
def get_latest_version():
|
363
362
|
try:
|
363
|
+
import requests
|
364
364
|
response = requests.get(f"https://pypi.org/pypi/{PACKAGE_NAME}/json")
|
365
365
|
latest_version = response.json()["info"]["version"]
|
366
366
|
return latest_version
|
@@ -3,7 +3,7 @@ GameSentenceMiner/anki.py,sha256=xTXCACDM_u9natCFnbqdxEX24F9bTsdoI7PoskWbdkk,230
|
|
3
3
|
GameSentenceMiner/config_gui.py,sha256=dTYBe3ZI9tsOiOtT2WEMnodj3q5-U4Kj5l1l1qutlsw,137549
|
4
4
|
GameSentenceMiner/gametext.py,sha256=fgBgLchezpauWELE9Y5G3kVCLfAneD0X4lJFoI3FYbs,10351
|
5
5
|
GameSentenceMiner/gsm.py,sha256=GdqegZnKrTMVRvp43bK7oNlWj5OxLx2PNdVWyHL9Gc4,28282
|
6
|
-
GameSentenceMiner/obs.py,sha256=
|
6
|
+
GameSentenceMiner/obs.py,sha256=JmtO7Ojcm14Q8P_bz8TdS24rwDdwQasg2gnO2J0KcuQ,20598
|
7
7
|
GameSentenceMiner/vad.py,sha256=zFReBMvNEEaQ_YEozCTCaMdV-o40FwtlxYRb17cYZio,19125
|
8
8
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
GameSentenceMiner/ai/ai_prompting.py,sha256=D1KyHER_sj4jYvOKGRbp8FkKZSKWzAaXHbpmZLLFctg,23998
|
@@ -22,13 +22,13 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
22
22
|
GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=QyBarjb6Wjt-oyor1sIT9hG-KrGdi6wODLyCrHXun6E,6008
|
23
23
|
GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
|
24
24
|
GameSentenceMiner/ocr/owocr_area_selector.py,sha256=Rm1_nuZotJhfOfoJ_3mesh9udtOBjYqKhnAvSief6fo,29181
|
25
|
-
GameSentenceMiner/ocr/owocr_helper.py,sha256=
|
25
|
+
GameSentenceMiner/ocr/owocr_helper.py,sha256=6R6IbdwpjWmIrXnUvyQ_0kXRYhJe2tphqyapoxc_PsQ,28857
|
26
26
|
GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
|
27
27
|
GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
|
28
28
|
GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
|
29
29
|
GameSentenceMiner/owocr/owocr/config.py,sha256=qM7kISHdUhuygGXOxmgU6Ef2nwBShrZtdqu4InDCViE,8103
|
30
30
|
GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
|
31
|
-
GameSentenceMiner/owocr/owocr/ocr.py,sha256=
|
31
|
+
GameSentenceMiner/owocr/owocr/ocr.py,sha256=xU1PkkDkOZ36phzmaXdOrfw08zy0YkSNbKTgIDAqBYs,70556
|
32
32
|
GameSentenceMiner/owocr/owocr/run.py,sha256=-aRSIcwc-qIn2s-JVaAMGvzJHjvqw4LsLQKLtswEfcE,75570
|
33
33
|
GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
|
34
34
|
GameSentenceMiner/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -36,7 +36,7 @@ GameSentenceMiner/tools/audio_offset_selector.py,sha256=8Stk3BP-XVIuzRv9nl9Eqd2D
|
|
36
36
|
GameSentenceMiner/tools/ss_selector.py,sha256=cbjMxiKOCuOfbRvLR_PCRlykBrGtm1LXd6u5czPqkmc,4793
|
37
37
|
GameSentenceMiner/tools/window_transparency.py,sha256=GtbxbmZg0-UYPXhfHff-7IKZyY2DKe4B9GdyovfmpeM,8166
|
38
38
|
GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
|
-
GameSentenceMiner/util/configuration.py,sha256=
|
39
|
+
GameSentenceMiner/util/configuration.py,sha256=NnKcMyFV4y6gB6AwFUP-B-tdfk0_Awh5bJ6FHtXr6Vk,40017
|
40
40
|
GameSentenceMiner/util/db.py,sha256=2bO0rD4i8A1hhsRBER-wgZy9IK17ibRbI8DHxdKvYsI,16598
|
41
41
|
GameSentenceMiner/util/electron_config.py,sha256=KfeJToeFFVw0IR5MKa-gBzpzaGrU-lyJbR9z-sDEHYU,8767
|
42
42
|
GameSentenceMiner/util/ffmpeg.py,sha256=iqsdp3TbBv6KMACJxkUF3e5VWak3jHPZdIEMrUdKFtE,23073
|
@@ -69,9 +69,9 @@ GameSentenceMiner/web/templates/index.html,sha256=VrhrkQKcOAPuoWRcilFLDXjvNf6WTO
|
|
69
69
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
70
70
|
GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
|
71
71
|
GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
|
-
gamesentenceminer-2.14.
|
73
|
-
gamesentenceminer-2.14.
|
74
|
-
gamesentenceminer-2.14.
|
75
|
-
gamesentenceminer-2.14.
|
76
|
-
gamesentenceminer-2.14.
|
77
|
-
gamesentenceminer-2.14.
|
72
|
+
gamesentenceminer-2.14.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
73
|
+
gamesentenceminer-2.14.8.dist-info/METADATA,sha256=vvvPFxb_AjD9_1NkCTKCj5E9feTflY5TgINHIyEOd-0,7330
|
74
|
+
gamesentenceminer-2.14.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
75
|
+
gamesentenceminer-2.14.8.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
76
|
+
gamesentenceminer-2.14.8.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
77
|
+
gamesentenceminer-2.14.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|