GameSentenceMiner 2.10.16__py3-none-any.whl → 2.11.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.
@@ -10,8 +10,10 @@ from dataclasses import dataclass
10
10
  import flask
11
11
  import websockets
12
12
 
13
+ from GameSentenceMiner.ai.ai_prompting import get_ai_prompt_result
14
+ from GameSentenceMiner.obs import get_current_game
13
15
  from GameSentenceMiner.util.gsm_utils import TEXT_REPLACEMENTS_FILE
14
- from GameSentenceMiner.util.text_log import GameLine, get_line_by_id, initial_time
16
+ from GameSentenceMiner.util.text_log import GameLine, get_line_by_id, initial_time, get_all_lines
15
17
  from flask import request, jsonify, send_from_directory
16
18
  import webbrowser
17
19
  from GameSentenceMiner import obs
@@ -307,6 +309,18 @@ def play_audio():
307
309
  obs.save_replay_buffer()
308
310
  return jsonify({}), 200
309
311
 
312
+ @app.route("/translate-line", methods=['POST'])
313
+ def translate_line():
314
+ data = request.get_json()
315
+ event_id = data.get('id')
316
+ if event_id is None:
317
+ return jsonify({'error': 'Missing id'}), 400
318
+ line_to_translate = get_line_by_id(event_id)
319
+ translation = get_ai_prompt_result(get_all_lines(), line_to_translate.text,
320
+ line_to_translate, get_current_game())
321
+ line_to_translate.set_TL(translation)
322
+ return jsonify({'TL': translation}), 200
323
+
310
324
 
311
325
  @app.route('/get_status', methods=['GET'])
312
326
  def get_status():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.10.16
3
+ Version: 2.11.0
4
4
  Summary: A tool for mining sentences from games. Update: Full UI Re-design
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -32,13 +32,13 @@ Requires-Dist: win10toast; sys_platform == "win32"
32
32
  Requires-Dist: numpy
33
33
  Requires-Dist: pystray
34
34
  Requires-Dist: pywin32; sys_platform == "win32"
35
- Requires-Dist: google-generativeai
36
35
  Requires-Dist: pygetwindow; sys_platform == "win32"
37
36
  Requires-Dist: flask
38
37
  Requires-Dist: groq
39
38
  Requires-Dist: obsws-python~=1.7.2
40
39
  Requires-Dist: matplotlib
41
40
  Requires-Dist: sounddevice
41
+ Requires-Dist: google-genai
42
42
  Dynamic: license-file
43
43
 
44
44
  # GameSentenceMiner (GSM)
@@ -1,12 +1,12 @@
1
1
  GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- GameSentenceMiner/anki.py,sha256=qi7yr9MI-sdgHPh9ZOnbCviwO2yl4gPB_z7hqxecSzI,16656
3
- GameSentenceMiner/config_gui.py,sha256=RfxLGrVsDrZiZDseCX8OtK8s66zS4MJjxxwIZnq9zx0,97838
2
+ GameSentenceMiner/anki.py,sha256=3BVFXAM7tpJAxHMbsMpnMHUoDfyqHQ1JSYJThW18QWA,16846
3
+ GameSentenceMiner/config_gui.py,sha256=B0VjddeKcnc8w9nJMLK0I0XlGVOo-6KQRtISZ5K6j08,98511
4
4
  GameSentenceMiner/gametext.py,sha256=6VkjmBeiuZfPk8T6PHFdIAElBH2Y_oLVYvmcafqN7RM,6747
5
- GameSentenceMiner/gsm.py,sha256=SGB60IC5VPCnvr_cMh4krkR4khW1x7xZhEYVNl8TiHc,24879
5
+ GameSentenceMiner/gsm.py,sha256=wTERcvG37SeDel51TCFusoQqk5B_b11YY4QZMTF0a6s,24954
6
6
  GameSentenceMiner/obs.py,sha256=o_I6213VZvXqYkZDdUBgUg2KWi9SbnNZZjjUnKnQkK4,15190
7
- GameSentenceMiner/vad.py,sha256=G0NkaWFJaIfKQAV7LOFxyKoih7pPNYHDuy4SzeFVCkI,16389
7
+ GameSentenceMiner/vad.py,sha256=A3CvBQ67w3c7L8s7mTMxo6U_9ZQXlCToIpGUbePotfA,18321
8
8
  GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- GameSentenceMiner/ai/ai_prompting.py,sha256=0jBAnngNwmc3dqJiVWe_QRy4Syr-muV-ML2rq0FiUtU,10215
9
+ GameSentenceMiner/ai/ai_prompting.py,sha256=l8JKyL_4zO5x3QKExN4c3HUPF2mQfB4B-VKclO5ofmM,25348
10
10
  GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  GameSentenceMiner/assets/icon.png,sha256=9GRL8uXUAgkUSlvbm9Pv9o2poFVRGdW6s2ub_DeUD9M,937624
12
12
  GameSentenceMiner/assets/icon128.png,sha256=l90j7biwdz5ahwOd5wZ-406ryEV9Pan93dquJQ3e1CI,18395
@@ -19,18 +19,18 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
19
19
  GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=jtTzAWtMAx8GuA1XIJ_BmyNn3aYaO3u_c5Q7m5D4gS8,4056
20
20
  GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
21
21
  GameSentenceMiner/ocr/owocr_area_selector.py,sha256=lHMVZuEE_-_wICfDr6jDJNSJIyZd2PnF7dIajknaHCU,20255
22
- GameSentenceMiner/ocr/owocr_helper.py,sha256=Iidu2T6z-eewFC40t3jUlLukankVsQB_HUEhr1L7HCU,22097
22
+ GameSentenceMiner/ocr/owocr_helper.py,sha256=OV31PCPGwLUYq3HBFdS6UoFB2hAyJE8yHm1UoDYoY38,22431
23
23
  GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
24
24
  GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
25
25
  GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
26
26
  GameSentenceMiner/owocr/owocr/config.py,sha256=qM7kISHdUhuygGXOxmgU6Ef2nwBShrZtdqu4InDCViE,8103
27
27
  GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
28
- GameSentenceMiner/owocr/owocr/ocr.py,sha256=siEqZLXhvFX-l311a19nCs-a0PxY9iwpaOoSV5lzVj4,56562
29
- GameSentenceMiner/owocr/owocr/run.py,sha256=goOZSO3a7z8GxjYAcWjHsPxdzM60Nt3vxjcUzy1fnZg,56242
28
+ GameSentenceMiner/owocr/owocr/ocr.py,sha256=iooUMZ5Z7ub2PMxuK9314U3DyuafZ6ASt-acrRe7rsk,59446
29
+ GameSentenceMiner/owocr/owocr/run.py,sha256=lwZOj5nmQWgXlQOA_b2FYrMjhGWCPA7ZZCBg-cj57-k,56518
30
30
  GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
31
31
  GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  GameSentenceMiner/util/audio_offset_selector.py,sha256=8Stk3BP-XVIuzRv9nl9Eqd2D-1yD3JrgU-CamBywJmY,8542
33
- GameSentenceMiner/util/configuration.py,sha256=ys7DsbVjgVxJ2c3HqiBF3_nZOTX1QYu3k2Rv99XuZig,28897
33
+ GameSentenceMiner/util/configuration.py,sha256=VXed6OKZPjwo1sK9CbpCerEsB3Dro82sEpFiQrWh97w,28961
34
34
  GameSentenceMiner/util/electron_config.py,sha256=3VmIrcXhC-wIMMc4uqV85NrNenRl4ZUbnQfSjWEwuig,9852
35
35
  GameSentenceMiner/util/ffmpeg.py,sha256=t0tflxq170n8PZKkdw8fTZIUQfXD0p_qARa9JTdhBTc,21530
36
36
  GameSentenceMiner/util/gsm_utils.py,sha256=iRyLVcodMptRhkCzLf3hyqc6_RCktXnwApi6mLju6oQ,11565
@@ -38,7 +38,7 @@ GameSentenceMiner/util/model.py,sha256=AaOzgqSbaN7yks_rr1dQpLQR45FpBYdoLebMbrIYm
38
38
  GameSentenceMiner/util/notification.py,sha256=0OnEYjn3DUEZ6c6OtPjdVZe-DG-QSoMAl9fetjjCvNU,3874
39
39
  GameSentenceMiner/util/package.py,sha256=u1ym5z869lw5EHvIviC9h9uH97bzUXSXXA8KIn8rUvk,1157
40
40
  GameSentenceMiner/util/ss_selector.py,sha256=cbjMxiKOCuOfbRvLR_PCRlykBrGtm1LXd6u5czPqkmc,4793
41
- GameSentenceMiner/util/text_log.py,sha256=eVtSXUaiQvPkQ2Zjzk8yITUk8g92k3M72-ZkJxessmk,5837
41
+ GameSentenceMiner/util/text_log.py,sha256=_zGqpbsUIdBVYZofK0XuBbU_tZnz0xmw_xfkJAZbctA,5907
42
42
  GameSentenceMiner/util/communication/__init__.py,sha256=xh__yn2MhzXi9eLi89PeZWlJPn-cbBSjskhi1BRraXg,643
43
43
  GameSentenceMiner/util/communication/send.py,sha256=Wki9qIY2CgYnuHbmnyKVIYkcKAN_oYS4up93XMikBaI,222
44
44
  GameSentenceMiner/util/communication/websocket.py,sha256=TbphRGmxVrgEupS7tNdifsmQfWDfIp0Hio2cSiUKgsk,3317
@@ -48,7 +48,7 @@ GameSentenceMiner/util/downloader/download_tools.py,sha256=zR-aEHiFVkyo-9oPoSx6n
48
48
  GameSentenceMiner/util/downloader/oneocr_dl.py,sha256=EJbKISaZ9p2x9P4x0rpMM5nAInTTc9b7arraGBcd-SA,10381
49
49
  GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  GameSentenceMiner/web/service.py,sha256=S7bYf2kSk08u-8R9Qpv7piM-pxfFjYZUvU825xupmuI,5279
51
- GameSentenceMiner/web/texthooking_page.py,sha256=EmcIBEPGWNgI2LGL3kKUsm0rs2Vn0CPq9PVKKnuIt2g,16183
51
+ GameSentenceMiner/web/texthooking_page.py,sha256=8wuhYs2LC0JwCavg0wHcCEMyeYyVKtQrRzFUMYL4H2o,16819
52
52
  GameSentenceMiner/web/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  GameSentenceMiner/web/static/apple-touch-icon.png,sha256=OcMI8af_68DA_tweOsQ5LytTyMwm7-hPW07IfrOVgEs,46132
54
54
  GameSentenceMiner/web/static/favicon-96x96.png,sha256=lOePzjiKl1JY2J1kT_PMdyEnrlJmi5GWbmXJunM12B4,16502
@@ -59,12 +59,12 @@ GameSentenceMiner/web/static/style.css,sha256=bPZK0NVMuyRl5NNDuT7ZTzVLKlvSsdmeVH
59
59
  GameSentenceMiner/web/static/web-app-manifest-192x192.png,sha256=EfSNnBmsSaLfESbkGfYwbKzcjKOdzuWo18ABADfN974,51117
60
60
  GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRXmaA3iJEESd-vM-ZmlTtZFBY4V8Pk,230819
61
61
  GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- GameSentenceMiner/web/templates/index.html,sha256=n0J-dV8eksj8JXUuaCTIh0fIxIjfgm2EvxGBdQ6gWoM,214113
62
+ GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1vKCu9k6WdHSXuA,215343
63
63
  GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
64
64
  GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
65
- gamesentenceminer-2.10.16.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
66
- gamesentenceminer-2.10.16.dist-info/METADATA,sha256=ZO5dqi5iFcZ0AgknR8Pg2csSPhA8_8bnM7uHLRYpBWM,7355
67
- gamesentenceminer-2.10.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
- gamesentenceminer-2.10.16.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
69
- gamesentenceminer-2.10.16.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
70
- gamesentenceminer-2.10.16.dist-info/RECORD,,
65
+ gamesentenceminer-2.11.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
66
+ gamesentenceminer-2.11.0.dist-info/METADATA,sha256=seST1470YoAwPQ6PAyizVoUWviEWbOCqCro6JaSrsfc,7347
67
+ gamesentenceminer-2.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
+ gamesentenceminer-2.11.0.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
69
+ gamesentenceminer-2.11.0.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
70
+ gamesentenceminer-2.11.0.dist-info/RECORD,,