GameSentenceMiner 2.19.14__py3-none-any.whl → 2.19.16__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/gsm.py +4 -1
- GameSentenceMiner/ocr/owocr_helper.py +3 -3
- GameSentenceMiner/util/configuration.py +17 -2
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/RECORD +9 -9
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/top_level.txt +0 -0
GameSentenceMiner/gsm.py
CHANGED
|
@@ -18,7 +18,7 @@ try:
|
|
|
18
18
|
import GameSentenceMiner.util.configuration
|
|
19
19
|
from GameSentenceMiner.util.configuration import logger, gsm_state, get_config, anki_results, AnkiUpdateResult, \
|
|
20
20
|
get_temporary_directory, get_log_path, get_master_config, switch_profile_and_save, get_app_directory, gsm_status, \
|
|
21
|
-
is_windows, is_linux, get_ffmpeg_path
|
|
21
|
+
is_windows, is_linux, get_ffmpeg_path, is_mac
|
|
22
22
|
|
|
23
23
|
import asyncio
|
|
24
24
|
import os
|
|
@@ -701,6 +701,9 @@ def initialize(reloading=False):
|
|
|
701
701
|
if shutil.which("ffmpeg") is None:
|
|
702
702
|
os.environ["PATH"] += os.pathsep + \
|
|
703
703
|
os.path.dirname(get_ffmpeg_path())
|
|
704
|
+
if is_mac():
|
|
705
|
+
if shutil.which("ffmpeg") is None:
|
|
706
|
+
os.environ["PATH"] += os.pathsep + "/opt/homebrew/bin"
|
|
704
707
|
if get_config().obs.open_obs:
|
|
705
708
|
obs_process = obs.start_obs()
|
|
706
709
|
# obs.connect_to_obs(start_replay=True)
|
|
@@ -21,7 +21,7 @@ from rapidfuzz import fuzz
|
|
|
21
21
|
from GameSentenceMiner import obs
|
|
22
22
|
from GameSentenceMiner.ocr.ss_picker import ScreenCropper
|
|
23
23
|
from GameSentenceMiner.owocr.owocr.run import TextFiltering
|
|
24
|
-
from GameSentenceMiner.util.configuration import get_config, get_app_directory, get_temporary_directory
|
|
24
|
+
from GameSentenceMiner.util.configuration import get_config, get_app_directory, get_temporary_directory, is_windows
|
|
25
25
|
from GameSentenceMiner.ocr.gsm_ocr_config import OCRConfig, has_config_changed, set_dpi_awareness, get_window, get_ocr_config_path
|
|
26
26
|
from GameSentenceMiner.owocr.owocr import run
|
|
27
27
|
from GameSentenceMiner.util.electron_config import get_ocr_ocr2, get_ocr_send_to_clipboard, get_ocr_scan_rate, \
|
|
@@ -619,7 +619,6 @@ def process_task_queue():
|
|
|
619
619
|
|
|
620
620
|
def run_oneocr(ocr_config: OCRConfig, rectangles, config_check_thread):
|
|
621
621
|
global done
|
|
622
|
-
print("Running OneOCR")
|
|
623
622
|
screen_area = None
|
|
624
623
|
screen_areas = [",".join(str(c) for c in rect_config.coordinates) for rect_config in rectangles if not rect_config.is_excluded]
|
|
625
624
|
exclusions = list(rect.coordinates for rect in list(filter(lambda x: x.is_excluded, rectangles)))
|
|
@@ -808,7 +807,8 @@ if __name__ == "__main__":
|
|
|
808
807
|
worker_thread.start()
|
|
809
808
|
websocket_server_thread = WebsocketServerThread(read=True)
|
|
810
809
|
websocket_server_thread.start()
|
|
811
|
-
|
|
810
|
+
if is_windows():
|
|
811
|
+
add_ss_hotkey(ss_hotkey)
|
|
812
812
|
try:
|
|
813
813
|
while not done:
|
|
814
814
|
time.sleep(1)
|
|
@@ -89,6 +89,9 @@ def is_linux():
|
|
|
89
89
|
def is_windows():
|
|
90
90
|
return platform == 'win32'
|
|
91
91
|
|
|
92
|
+
def is_mac():
|
|
93
|
+
return platform == 'darwin'
|
|
94
|
+
|
|
92
95
|
|
|
93
96
|
class Locale(Enum):
|
|
94
97
|
English = 'en_us'
|
|
@@ -1394,10 +1397,22 @@ is_beangate = os.path.exists("C:/Users/Beangate")
|
|
|
1394
1397
|
|
|
1395
1398
|
|
|
1396
1399
|
def get_ffmpeg_path():
|
|
1397
|
-
|
|
1400
|
+
path = os.path.join(get_app_directory(), "ffmpeg", "ffmpeg.exe") if is_windows() else "ffmpeg"
|
|
1401
|
+
if shutil.which(path) is not None:
|
|
1402
|
+
return path
|
|
1403
|
+
elif is_mac():
|
|
1404
|
+
if shutil.which("/opt/homebrew/bin/ffmpeg") is not None:
|
|
1405
|
+
return "/opt/homebrew/bin/ffmpeg"
|
|
1406
|
+
return path
|
|
1398
1407
|
|
|
1399
1408
|
def get_ffprobe_path():
|
|
1400
|
-
|
|
1409
|
+
path = os.path.join(get_app_directory(), "ffmpeg", "ffprobe.exe") if is_windows() else "ffprobe"
|
|
1410
|
+
if shutil.which(path) is not None:
|
|
1411
|
+
return path
|
|
1412
|
+
elif is_mac():
|
|
1413
|
+
if shutil.which("/opt/homebrew/bin/ffprobe") is not None:
|
|
1414
|
+
return "/opt/homebrew/bin/ffprobe"
|
|
1415
|
+
return path
|
|
1401
1416
|
|
|
1402
1417
|
ffmpeg_base_command_list = [get_ffmpeg_path(), "-hide_banner", "-loglevel", "error", '-nostdin']
|
|
1403
1418
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GameSentenceMiner
|
|
3
|
-
Version: 2.19.
|
|
3
|
+
Version: 2.19.16
|
|
4
4
|
Summary: A tool for mining sentences from games. Update: Dependencies, replay buffer based line searching, and bug fixes.
|
|
5
5
|
Author-email: Beangate <bpwhelan95@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
GameSentenceMiner/anki.py,sha256=SvmkL-7AqMKtCWfgwyxALvEHBOoxmQabi_uSYahf5nU,29982
|
|
3
3
|
GameSentenceMiner/gametext.py,sha256=4PPm7QSWDmvsyooVjFANkd1Vnoy5ixbGRMHfYfhwGs0,13320
|
|
4
|
-
GameSentenceMiner/gsm.py,sha256=
|
|
4
|
+
GameSentenceMiner/gsm.py,sha256=3jmcW5NZ8VDsGgwr_RaWEcTtd_HdBSA-smdtAeGbZlo,36938
|
|
5
5
|
GameSentenceMiner/obs.py,sha256=UB4_OJ-vZQbHyuupB8JmwhSFdYyQX_5f5TpRXU1D7Kk,43300
|
|
6
6
|
GameSentenceMiner/vad.py,sha256=iMSsoUZ7-aNoWKzDKfOHdB3Zk5U2hV7x5hqTny6rj08,21501
|
|
7
7
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -21,7 +21,7 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
21
21
|
GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=Ov04c-nKzh3sADxO-5JyZWVe4DlrHM9edM9tc7-97Jo,5970
|
|
22
22
|
GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
|
|
23
23
|
GameSentenceMiner/ocr/owocr_area_selector.py,sha256=1-PlCOpam8-D4tGQVuhxeVVQc9sy5Mfyvcyqgj2Vqyw,29587
|
|
24
|
-
GameSentenceMiner/ocr/owocr_helper.py,sha256=
|
|
24
|
+
GameSentenceMiner/ocr/owocr_helper.py,sha256=gqQ8e-hy0fjdrXgDE9P11CAQOGtmsSl4Ce_gOxQEqkc,36896
|
|
25
25
|
GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
|
|
26
26
|
GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
|
|
27
27
|
GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
|
|
@@ -42,7 +42,7 @@ GameSentenceMiner/ui/furigana_filter_preview.py,sha256=DAT2-j6vSDHr9ufk6PiaLikEs
|
|
|
42
42
|
GameSentenceMiner/ui/screenshot_selector.py,sha256=MnR1MZWRUeHXCFTHc5ACK3WS08f9MUK5fJ6IQEGdCEY,9127
|
|
43
43
|
GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
GameSentenceMiner/util/audio_player.py,sha256=-yFsf0qoTSS1ga5rCmEJZJGUSJzXCvfZHY3t0NxycDk,7896
|
|
45
|
-
GameSentenceMiner/util/configuration.py,sha256=
|
|
45
|
+
GameSentenceMiner/util/configuration.py,sha256=lmk0CEGbu-wFU40O-1X8MvLZNNpNT3g1apghgOjidCM,49265
|
|
46
46
|
GameSentenceMiner/util/db.py,sha256=iCHUzlgOJgNjQ5-oDa7gnDWmzdlEryOzbXfn9ToQPfY,33034
|
|
47
47
|
GameSentenceMiner/util/electron_config.py,sha256=KfeJToeFFVw0IR5MKa-gBzpzaGrU-lyJbR9z-sDEHYU,8767
|
|
48
48
|
GameSentenceMiner/util/ffmpeg.py,sha256=KZhoVVCGnlPIoVJ83XVQmjHDnzO4WefZRoLyceS6pEE,40100
|
|
@@ -135,9 +135,9 @@ GameSentenceMiner/web/templates/components/kanji_grid/thousand_character_classic
|
|
|
135
135
|
GameSentenceMiner/web/templates/components/kanji_grid/wanikani_levels.json,sha256=8wjnnaYQqmho6t5tMxrIAc03512A2tYhQh5dfsQnfAM,11372
|
|
136
136
|
GameSentenceMiner/web/templates/components/kanji_grid/words_hk_frequency_list.json,sha256=wRkqZNPzz6DT9OTPHpXwfqW96Qb96stCQNNgOL-ZdKk,17535
|
|
137
137
|
GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
138
|
-
gamesentenceminer-2.19.
|
|
139
|
-
gamesentenceminer-2.19.
|
|
140
|
-
gamesentenceminer-2.19.
|
|
141
|
-
gamesentenceminer-2.19.
|
|
142
|
-
gamesentenceminer-2.19.
|
|
143
|
-
gamesentenceminer-2.19.
|
|
138
|
+
gamesentenceminer-2.19.16.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
139
|
+
gamesentenceminer-2.19.16.dist-info/METADATA,sha256=MM_hRX6w_NZIzWWtjo1bk0RmG66SkAx0EkMoYC6K15E,8187
|
|
140
|
+
gamesentenceminer-2.19.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
gamesentenceminer-2.19.16.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
|
142
|
+
gamesentenceminer-2.19.16.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
|
143
|
+
gamesentenceminer-2.19.16.dist-info/RECORD,,
|
|
File without changes
|
{gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{gamesentenceminer-2.19.14.dist-info → gamesentenceminer-2.19.16.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|