GameSentenceMiner 2.18.20__py3-none-any.whl → 2.19.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.
Potentially problematic release.
This version of GameSentenceMiner might be problematic. Click here for more details.
- GameSentenceMiner/gametext.py +73 -15
- GameSentenceMiner/gsm.py +7 -49
- GameSentenceMiner/obs.py +25 -2
- GameSentenceMiner/ui/config_gui.py +29 -17
- GameSentenceMiner/util/communication/send.py +13 -1
- GameSentenceMiner/util/communication/websocket.py +2 -2
- GameSentenceMiner/util/configuration.py +3 -15
- GameSentenceMiner/util/db.py +1 -1
- GameSentenceMiner/util/downloader/download_tools.py +53 -27
- GameSentenceMiner/util/get_overlay_coords.py +24 -4
- GameSentenceMiner/web/events.py +31 -107
- GameSentenceMiner/web/templates/anki_stats.html +1 -0
- GameSentenceMiner/web/templates/index.html +12 -12
- GameSentenceMiner/web/texthooking_page.py +15 -2
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/METADATA +15 -5
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/RECORD +20 -20
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.18.20.dist-info → gamesentenceminer-2.19.0.dist-info}/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@ from GameSentenceMiner.web.service import handle_texthooker_button
|
|
|
18
18
|
|
|
19
19
|
# Import from new modules
|
|
20
20
|
from GameSentenceMiner.web.events import (
|
|
21
|
-
|
|
21
|
+
EventManager, event_manager
|
|
22
22
|
)
|
|
23
23
|
from GameSentenceMiner.web.stats import (
|
|
24
24
|
is_kanji, interpolate_color, get_gradient_color, calculate_kanji_frequency,
|
|
@@ -137,7 +137,11 @@ def get_data():
|
|
|
137
137
|
|
|
138
138
|
@app.route('/get_ids', methods=['GET'])
|
|
139
139
|
def get_ids():
|
|
140
|
-
|
|
140
|
+
asyncio.run(check_for_lines_outside_replay_buffer())
|
|
141
|
+
return jsonify({
|
|
142
|
+
"ids": list(event_manager.get_ids()),
|
|
143
|
+
"timed_out_ids": list(event_manager.timed_out_ids)
|
|
144
|
+
})
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
@app.route('/clear_history', methods=['POST'])
|
|
@@ -148,6 +152,14 @@ def clear_history():
|
|
|
148
152
|
return jsonify({'message': 'History cleared successfully'}), 200
|
|
149
153
|
|
|
150
154
|
|
|
155
|
+
async def check_for_lines_outside_replay_buffer():
|
|
156
|
+
time_window = datetime.datetime.now() - datetime.timedelta(seconds=gsm_state.replay_buffer_length) - datetime.timedelta(seconds=5)
|
|
157
|
+
# logger.info(f"Checking for lines outside replay buffer time window: {time_window}")
|
|
158
|
+
lines_outside_buffer = [line.id for line in event_manager.get_events() if line.time < time_window]
|
|
159
|
+
# logger.info(f"Lines outside replay buffer: {lines_outside_buffer}")
|
|
160
|
+
event_manager.remove_lines_by_ids(lines_outside_buffer, timed_out=True)
|
|
161
|
+
|
|
162
|
+
|
|
151
163
|
async def add_event_to_texthooker(line):
|
|
152
164
|
new_event = event_manager.add_gameline(line)
|
|
153
165
|
await websocket_server_thread.send_text({
|
|
@@ -157,6 +169,7 @@ async def add_event_to_texthooker(line):
|
|
|
157
169
|
})
|
|
158
170
|
if get_config().advanced.plaintext_websocket_port:
|
|
159
171
|
await plaintext_websocket_server_thread.send_text(line.text)
|
|
172
|
+
await check_for_lines_outside_replay_buffer()
|
|
160
173
|
|
|
161
174
|
|
|
162
175
|
async def send_word_coordinates_to_overlay(boxes):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GameSentenceMiner
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.19.0
|
|
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
|
|
@@ -47,7 +47,7 @@ Requires-Dist: pywin32>=311; sys_platform == "win32"
|
|
|
47
47
|
Requires-Dist: win10toast>=0.9; sys_platform == "win32"
|
|
48
48
|
Requires-Dist: stable-ts>=2.19.1
|
|
49
49
|
Requires-Dist: torchcodec>=0.7.0
|
|
50
|
-
Requires-Dist: torchaudio
|
|
50
|
+
Requires-Dist: torchaudio==2.8.0
|
|
51
51
|
Dynamic: license-file
|
|
52
52
|
|
|
53
53
|
# GSM - An Immersion toolkit for Games.
|
|
@@ -62,7 +62,7 @@ Installation: https://www.youtube.com/watch?v=sVL9omRbGc4
|
|
|
62
62
|
|
|
63
63
|
Discord: https://discord.gg/yP8Qse6bb8
|
|
64
64
|
|
|
65
|
-
## Features
|
|
65
|
+
## Features - [Anki Card Enhancement](#anki-card-enhancement) | [OCR](#ocr) | [Overlay](#overlay)
|
|
66
66
|
|
|
67
67
|
### Anki Card Enhancement
|
|
68
68
|
|
|
@@ -90,6 +90,8 @@ https://github.com/user-attachments/assets/df6bc38e-d74d-423e-b270-8a82eec2394c
|
|
|
90
90
|
|
|
91
91
|
https://github.com/user-attachments/assets/ee670fda-1a8b-4dec-b9e6-072264155c6e
|
|
92
92
|
|
|
93
|
+
---
|
|
94
|
+
|
|
93
95
|
### OCR
|
|
94
96
|
|
|
95
97
|
GSM runs a fork of [OwOCR](https://github.com/AuroraWright/owocr/) to provide accurate text capture from games that do not have a hook. Here are some improvements GSM makes on stock OwOCR:
|
|
@@ -107,9 +109,17 @@ GSM runs a fork of [OwOCR](https://github.com/AuroraWright/owocr/) to provide ac
|
|
|
107
109
|
|
|
108
110
|
https://github.com/user-attachments/assets/07240472-831a-40e6-be22-c64b880b0d66
|
|
109
111
|
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### Overlay
|
|
115
|
+
|
|
116
|
+
GSM also features an overlay that allows for on-screen yomitan lookups. Whenever the overlay is on it will scan the screen ONCE whenever a text event from any source comes into GSM. It then allows for hovering over the actual characters in-game for yomitan lookups, and mining.
|
|
117
|
+
|
|
118
|
+
https://youtu.be/m1MweBsHbwI
|
|
110
119
|
|
|
120
|
+

|
|
111
121
|
|
|
112
|
-
|
|
122
|
+
<!--### Game Launcher Capabilities (WIP)
|
|
113
123
|
|
|
114
124
|
This is probably the feature I care least about, but if you are lazy like me, you may find this helpful.
|
|
115
125
|
|
|
@@ -119,7 +129,7 @@ This is probably the feature I care least about, but if you are lazy like me, yo
|
|
|
119
129
|
|
|
120
130
|
This feature simplifies the process of launching games and (potentially) hooking them, making the entire workflow more efficient.
|
|
121
131
|
|
|
122
|
-
<img width="2560" height="1392" alt="GameSentenceMiner_1zuov0R9xK" src="https://github.com/user-attachments/assets/205769bb-3dd2-493b-9383-2d6e2ca05c2d"
|
|
132
|
+
<img width="2560" height="1392" alt="GameSentenceMiner_1zuov0R9xK" src="https://github.com/user-attachments/assets/205769bb-3dd2-493b-9383-2d6e2ca05c2d" />-->
|
|
123
133
|
|
|
124
134
|
## Basic Requirements
|
|
125
135
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
GameSentenceMiner/anki.py,sha256=9pjjJrQS7IbA6iTtOaJ0Hs2nBddYXTCZBF5lZ5I4dOs,29593
|
|
3
|
-
GameSentenceMiner/gametext.py,sha256=
|
|
4
|
-
GameSentenceMiner/gsm.py,sha256=
|
|
5
|
-
GameSentenceMiner/obs.py,sha256=
|
|
3
|
+
GameSentenceMiner/gametext.py,sha256=U2uBXF6B8rYdXqYWaAfFxlZN-HXFcB-uryc2OMWau4I,13305
|
|
4
|
+
GameSentenceMiner/gsm.py,sha256=Fqpy210vJIscxEaaX5bI4n-HEyp4EtkGSLkIreEs-Gw,34564
|
|
5
|
+
GameSentenceMiner/obs.py,sha256=vhTFqGxHWEz9g-081gain6iI2poJM_D7v5vI8Kl7rqk,37918
|
|
6
6
|
GameSentenceMiner/vad.py,sha256=iMSsoUZ7-aNoWKzDKfOHdB3Zk5U2hV7x5hqTny6rj08,21501
|
|
7
7
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
GameSentenceMiner/ai/ai_prompting.py,sha256=mq9Odv_FpohXagU-OoSZbLWttdrEl1M1NiqnodeUpD8,29126
|
|
@@ -37,38 +37,38 @@ GameSentenceMiner/tools/ss_selector.py,sha256=ob2oJdiYreDMMau7CvsglpnhZ1CDnJqop3
|
|
|
37
37
|
GameSentenceMiner/tools/window_transparency.py,sha256=GtbxbmZg0-UYPXhfHff-7IKZyY2DKe4B9GdyovfmpeM,8166
|
|
38
38
|
GameSentenceMiner/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
GameSentenceMiner/ui/anki_confirmation.py,sha256=krrT3q3anTtXNTPHz5ahXSd4genEnEvS07v1JYftBFg,15174
|
|
40
|
-
GameSentenceMiner/ui/config_gui.py,sha256=
|
|
40
|
+
GameSentenceMiner/ui/config_gui.py,sha256=OvwmTpg5zpTgX6TTgHwHQh2vGEgoses3H4a9BsQOxKk,155364
|
|
41
41
|
GameSentenceMiner/ui/furigana_filter_preview.py,sha256=DAT2-j6vSDHr9ufk6PiaLikEsbIp56B_OHIEeYLMwlk,17135
|
|
42
42
|
GameSentenceMiner/ui/screenshot_selector.py,sha256=7QvDhOMpA0ej8x_lYtu6fhmrWbM1GCg-dps3XVWwk1Q,8234
|
|
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=
|
|
46
|
-
GameSentenceMiner/util/db.py,sha256=
|
|
45
|
+
GameSentenceMiner/util/configuration.py,sha256=5Ix2nrlTANpMS2AK7BBAJtA8UnFZgp8J8Rerll00GJo,47502
|
|
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=cAzztfY36Xf2WvsJDjavoiMOvA9ac2GVdCrSB4LzHk4,29007
|
|
49
49
|
GameSentenceMiner/util/games_table.py,sha256=VM68MAsdyE6tpdwM4bDSk67qioBOvsEO8-TpnRmUnSo,12003
|
|
50
|
-
GameSentenceMiner/util/get_overlay_coords.py,sha256=
|
|
50
|
+
GameSentenceMiner/util/get_overlay_coords.py,sha256=SfzSlrm0SjPe5BtkWZ0K3Z--7HNY_4sERTyrzSOaCls,25788
|
|
51
51
|
GameSentenceMiner/util/gsm_utils.py,sha256=mASECTmN10c2yPL4NEfLg0Y0YWwFso1i6r_hhJPR3MY,10974
|
|
52
52
|
GameSentenceMiner/util/model.py,sha256=R-_RYTYLSDNgBoVTPuPBcIHeOznIqi_vBzQ7VQ20WYk,6727
|
|
53
53
|
GameSentenceMiner/util/notification.py,sha256=YBhf_mSo_i3cjBz-pmeTPx3wchKiG9BK2VBdZSa2prQ,4597
|
|
54
54
|
GameSentenceMiner/util/text_log.py,sha256=nb4N6bId1hwVWSnKjbxl0kvTqBhJW2UL-xmwtyKmKrk,6835
|
|
55
55
|
GameSentenceMiner/util/communication/__init__.py,sha256=xh__yn2MhzXi9eLi89PeZWlJPn-cbBSjskhi1BRraXg,643
|
|
56
|
-
GameSentenceMiner/util/communication/send.py,sha256=
|
|
57
|
-
GameSentenceMiner/util/communication/websocket.py,sha256=
|
|
56
|
+
GameSentenceMiner/util/communication/send.py,sha256=9tEpbodt1nqsA-XqyXZGMHK_80EJPnhMJJxvDF-w3Ug,578
|
|
57
|
+
GameSentenceMiner/util/communication/websocket.py,sha256=RWPN9V6Gddqw1PmR_Ql8z0yjVihGvwSLSPQHXSxRlqM,3357
|
|
58
58
|
GameSentenceMiner/util/downloader/Untitled_json.py,sha256=RUUl2bbbCpUDUUS0fP0tdvf5FngZ7ILdA_J5TFYAXUQ,15272
|
|
59
59
|
GameSentenceMiner/util/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
-
GameSentenceMiner/util/downloader/download_tools.py,sha256=
|
|
60
|
+
GameSentenceMiner/util/downloader/download_tools.py,sha256=GAqhZz0LoMsG5YRFWmOeTX3NIzw2TrtM2K52QvQd7C0,12698
|
|
61
61
|
GameSentenceMiner/util/downloader/oneocr_dl.py,sha256=l3s9Z-x1b57GX048o5h-MVv0UTZo4H-Q-zb-JREkMLI,10439
|
|
62
62
|
GameSentenceMiner/util/win10toast/__init__.py,sha256=6TL2w6rzNmpJEp6_v2cAJP_7ExA3UsKzwdM08pNcVfE,5341
|
|
63
63
|
GameSentenceMiner/util/win10toast/__main__.py,sha256=5MYnBcFj8y_6Dyc1kiPd0_FsUuh4yl1cv5wsleU6V4w,668
|
|
64
64
|
GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
65
|
GameSentenceMiner/web/anki_api_endpoints.py,sha256=r30OTT3YVfgbF6aJ-EGWZLF-j2D9L63jLkRXMycU0p8,23681
|
|
66
66
|
GameSentenceMiner/web/database_api.py,sha256=wJGFwrPbB7qQMIqwg0w6hn_henFhjAUCIpwjhdUNMGU,89903
|
|
67
|
-
GameSentenceMiner/web/events.py,sha256=
|
|
67
|
+
GameSentenceMiner/web/events.py,sha256=RJ8tIK8WUn7Fbgny23UJWrZ1SlhYzzT5p55E1uXRwDs,2747
|
|
68
68
|
GameSentenceMiner/web/gsm_websocket.py,sha256=B0VKpxmsRu0WRh5nFWlpDPBQ6-K2ed7TEIa0O6YWeoo,4166
|
|
69
69
|
GameSentenceMiner/web/service.py,sha256=6cgUmDgtp3ZKzuPFszowjPoq-BDtC1bS3ux6sykeaqo,6662
|
|
70
70
|
GameSentenceMiner/web/stats.py,sha256=LYMhekifcQo-cbfy2--b6vycKcu8RAoTnQA4TefcS6U,29037
|
|
71
|
-
GameSentenceMiner/web/texthooking_page.py,sha256=
|
|
71
|
+
GameSentenceMiner/web/texthooking_page.py,sha256=xX2ZZpvTmXyBOKOkYZxKA3yNZQMbE930EEvUeY-xJpo,14332
|
|
72
72
|
GameSentenceMiner/web/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
73
|
GameSentenceMiner/web/static/apple-touch-icon.png,sha256=OcMI8af_68DA_tweOsQ5LytTyMwm7-hPW07IfrOVgEs,46132
|
|
74
74
|
GameSentenceMiner/web/static/favicon-96x96.png,sha256=lOePzjiKl1JY2J1kT_PMdyEnrlJmi5GWbmXJunM12B4,16502
|
|
@@ -95,10 +95,10 @@ GameSentenceMiner/web/static/js/overview.js,sha256=9aqIozJ_s8MQxTmdYii7y50LXm3N_
|
|
|
95
95
|
GameSentenceMiner/web/static/js/search.js,sha256=QYbIpmBhFNaQ2O7mPN8k9ChSCikIGJvEo-3jOEU2WPM,16158
|
|
96
96
|
GameSentenceMiner/web/static/js/shared.js,sha256=ZNibQkJxdypg93uMhmr_NEgoT5hJfxikzF6RKGz5Wy0,20416
|
|
97
97
|
GameSentenceMiner/web/static/js/stats.js,sha256=zPhkdY3RXiQrhPmZyFyh6xwOn3DxQI8Jm6fqbJbjeDk,51322
|
|
98
|
-
GameSentenceMiner/web/templates/anki_stats.html,sha256=
|
|
98
|
+
GameSentenceMiner/web/templates/anki_stats.html,sha256=nq0vcDbJzWNggybatYECs16OsqcBvb5viyJzSOBECwQ,18238
|
|
99
99
|
GameSentenceMiner/web/templates/database.html,sha256=5SE7cSYa-ZDVLm0ykb1T11Yd4Bm_E600EWaQi2UWip8,18577
|
|
100
100
|
GameSentenceMiner/web/templates/goals.html,sha256=X5ViEeUT3YnCVM_kofCJ6A0_Wn2TVQQdmBiblZN5Gpo,20909
|
|
101
|
-
GameSentenceMiner/web/templates/index.html,sha256=
|
|
101
|
+
GameSentenceMiner/web/templates/index.html,sha256=qwEAiKDos0SUuN5sG_c31-A80vawq7zOKoJWGGL4BTc,230539
|
|
102
102
|
GameSentenceMiner/web/templates/overview.html,sha256=7hX1rrFhwCWHo9mH-Ia_39FSD3ACCoWTXtVUl7gc1kM,13248
|
|
103
103
|
GameSentenceMiner/web/templates/search.html,sha256=34mv69GQXBGq-TdagyZ82QpXH9JYWGOXMDbCfoGUoGI,6150
|
|
104
104
|
GameSentenceMiner/web/templates/stats.html,sha256=RJhWQ1lyOGkYWrqxJNutnJs703IVdCQhBG9Cud0CMPs,5605
|
|
@@ -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.
|
|
139
|
-
gamesentenceminer-2.
|
|
140
|
-
gamesentenceminer-2.
|
|
141
|
-
gamesentenceminer-2.
|
|
142
|
-
gamesentenceminer-2.
|
|
143
|
-
gamesentenceminer-2.
|
|
138
|
+
gamesentenceminer-2.19.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
139
|
+
gamesentenceminer-2.19.0.dist-info/METADATA,sha256=fWjC4Xu9LJVjJtSEmq1Q4u1j4S4IG80e6mZaD2NGI9o,8121
|
|
140
|
+
gamesentenceminer-2.19.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
gamesentenceminer-2.19.0.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
|
142
|
+
gamesentenceminer-2.19.0.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
|
143
|
+
gamesentenceminer-2.19.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|