GameSentenceMiner 2.8.2__py3-none-any.whl → 2.8.4__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.
@@ -314,7 +314,8 @@ def run_oneocr(ocr_config: OCRConfig, i, area=False):
314
314
  screen_capture_delay_secs=get_ocr_scan_rate(), engine=ocr1,
315
315
  text_callback=text_callback,
316
316
  screen_capture_exclusions=exclusions,
317
- rectangle=i)
317
+ rectangle=i,
318
+ ignore_window_visible=not get_requires_open_window())
318
319
  done = True
319
320
 
320
321
 
@@ -222,6 +222,9 @@ class WindowsWindowTracker(threading.Thread):
222
222
  if self.window_active != is_active:
223
223
  on_window_activated(is_active)
224
224
  self.window_active = is_active
225
+ elif ignore_window_visiblity:
226
+ on_window_minimized(False)
227
+ self.window_minimized = False
225
228
  else:
226
229
  is_minimized = win32gui.IsIconic(self.window_handle)
227
230
  if self.window_minimized != is_minimized:
@@ -617,6 +620,7 @@ def run(read_from=None,
617
620
  screen_capture_event_bus=None,
618
621
  rectangle=None,
619
622
  text_callback=None,
623
+ ignore_window_visible=False,
620
624
  ):
621
625
  """
622
626
  Japanese OCR client
@@ -665,6 +669,8 @@ def run(read_from=None,
665
669
 
666
670
  global engine_instances
667
671
  global engine_keys
672
+ global ignore_window_visiblity
673
+ ignore_window_visiblity = ignore_window_visible
668
674
  engine_instances = []
669
675
  config_engines = []
670
676
  engine_keys = []
@@ -131,6 +131,7 @@
131
131
  let newCheckboxState = false;
132
132
  let hoveredCheckboxes = new Set();
133
133
  let checkboxes = []; // Will hold all checkbox elements
134
+ let checkboxes_being_updated = new Set();
134
135
 
135
136
  // Shift click selection variable
136
137
  let lastChecked = null;
@@ -152,8 +153,8 @@
152
153
  addNewEvent(ev)
153
154
  }
154
155
  const checkbox = document.querySelector(`[data-event-id="${ev.id}"]`);
155
- if (checkbox) {
156
- checkbox.checked = ev.checked; // Update the checkbox state
156
+ if (checkbox && !checkboxes_being_updated.has(ev.id)) {
157
+ checkbox.checked = ev.checked;
157
158
  }
158
159
  });
159
160
  checkboxes = Array.from(document.querySelectorAll('#session-events input[type="checkbox"]')); // Update checkboxes array after new events
@@ -215,11 +216,13 @@
215
216
 
216
217
  async function toggleCheckbox(id, checked) {
217
218
  try {
219
+ checkboxes_being_updated.add(id);
218
220
  const res = await fetch('/update', {
219
221
  method: 'POST',
220
222
  headers: { 'Content-Type': 'application/json' },
221
223
  body: JSON.stringify({ id, checked })
222
224
  });
225
+ checkboxes_being_updated.delete(id);
223
226
  if (!res.ok) {
224
227
  throw new Error(`HTTP error! Status: ${res.status}`);
225
228
  }
@@ -148,14 +148,9 @@ def update_event():
148
148
  event_id = data.get('id')
149
149
  checked = data.get('checked')
150
150
 
151
- logger.info(event_id)
152
- logger.info(checked)
153
-
154
151
  if event_id is None or checked is None:
155
152
  return jsonify({'error': 'Missing id or checked status'}), 400
156
153
 
157
- logger.info(event_manager.get(event_id))
158
-
159
154
  event_manager.get(event_id).checked = checked
160
155
 
161
156
  return jsonify({'error': 'Event not found'}), 404
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.8.2
3
+ Version: 2.8.4
4
4
  Summary: A tool for mining sentences from games. Update: Multi-Line Mining! Fixed!
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -25,20 +25,20 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
25
25
  GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=zagsB4UD9mmZX_r6dFBCXZqdDa0XGk-RvIqbKoPB9lQ,1932
26
26
  GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
27
27
  GameSentenceMiner/ocr/owocr_area_selector.py,sha256=a2i4kW9g9_DJKt6OJ5dlSiqJGiXkKyqAQaAiXBdrq8U,46680
28
- GameSentenceMiner/ocr/owocr_helper.py,sha256=wZsWV0e8OfI752lezrJccci05MmXkxMN10QYLMY34uk,16010
28
+ GameSentenceMiner/ocr/owocr_helper.py,sha256=J6FrcxikTbfoHnnvQfp5uvGIragASrB4I3oepBCcziE,16076
29
29
  GameSentenceMiner/owocr/owocr/__init__.py,sha256=opjBOyGGyEqZCE6YdZPnyt7nVfiwyELHsXA0jAsjm14,25
30
30
  GameSentenceMiner/owocr/owocr/__main__.py,sha256=r8MI6RAmbkTWqOJ59uvXoDS7CSw5jX5war9ULGWELrA,128
31
31
  GameSentenceMiner/owocr/owocr/config.py,sha256=738QCJHEWpFhMh966plOcXYWwcshSiRsxjjIwldeTtI,7461
32
32
  GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
33
33
  GameSentenceMiner/owocr/owocr/ocr.py,sha256=n24Xg8Z8dbcgLpq1u4d22z3tLV1evmf0dK3-Xocv3vs,39878
34
- GameSentenceMiner/owocr/owocr/run.py,sha256=_1zAbJooOR051tsFh0iCyjtlVP5BVE0KFEl7i95mUd0,47805
34
+ GameSentenceMiner/owocr/owocr/run.py,sha256=rYITJJXKEaR7tW_M7KQ29Zh5zOFH4GcIy-p9PEqbRRE,48066
35
35
  GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=fjJ3CSXLti3WboGPpmsa7MWOwIXsfpHC8N4zKahGGY0,3346
36
36
  GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  GameSentenceMiner/vad/silero_trim.py,sha256=ULf3zwS-JMsY82cKF7gZxREHw8L6lgpWF2U1YqgE9Oc,1681
38
38
  GameSentenceMiner/vad/vosk_helper.py,sha256=125X8C9NxFPlWWpoNsbOnEqKx8RCjXN109zNx_QXhyg,6070
39
39
  GameSentenceMiner/vad/whisper_helper.py,sha256=JJ-iltCh813XdjyEw0Wn5DaErf6PDqfH0Efu1Md8cIY,3543
40
40
  GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- GameSentenceMiner/web/texthooking_page.py,sha256=rcxCw81jjgyWPslVTFhQ5gaGs3FVN1X2CF-nmcCjo78,7325
41
+ GameSentenceMiner/web/texthooking_page.py,sha256=INCBzEUk0I_452OpDnfDMeGMaMCAJWSmq14S4V1ToHA,7227
42
42
  GameSentenceMiner/web/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  GameSentenceMiner/web/static/apple-touch-icon.png,sha256=OcMI8af_68DA_tweOsQ5LytTyMwm7-hPW07IfrOVgEs,46132
44
44
  GameSentenceMiner/web/static/favicon-96x96.png,sha256=lOePzjiKl1JY2J1kT_PMdyEnrlJmi5GWbmXJunM12B4,16502
@@ -47,12 +47,12 @@ GameSentenceMiner/web/static/favicon.svg,sha256=x305AP6WlXGtrXIZlaQspdLmwteoFYUo
47
47
  GameSentenceMiner/web/static/site.webmanifest,sha256=kaeNT-FjFt-T7JGzOhXH7YSqsrDeiplZ2kDxCN_CFU4,436
48
48
  GameSentenceMiner/web/static/style.css,sha256=bPZK0NVMuyRl5NNDuT7ZTzVLKlvSsdmeVHmAW4y5FM0,7001
49
49
  GameSentenceMiner/web/static/text_replacements.html,sha256=LJ2qBEZvyMaBJLLJzDIw0baiTeusplbn4jkpyHM6ZBI,8613
50
- GameSentenceMiner/web/static/utility.html,sha256=DlXaglC2ZkBfEKK1sxuS8Dc5Xj09Yqi27qQuEF0c59w,9812
50
+ GameSentenceMiner/web/static/utility.html,sha256=58br1whazdfrevWCHEzYNa1_VdBvebDDX2tWlX2QrFs,9964
51
51
  GameSentenceMiner/web/static/web-app-manifest-192x192.png,sha256=EfSNnBmsSaLfESbkGfYwbKzcjKOdzuWo18ABADfN974,51117
52
52
  GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRXmaA3iJEESd-vM-ZmlTtZFBY4V8Pk,230819
53
- gamesentenceminer-2.8.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
- gamesentenceminer-2.8.2.dist-info/METADATA,sha256=PM3A_vs6cv_TyyCrzBBKckWY5jFu5HaJSeMOiokRiHA,5912
55
- gamesentenceminer-2.8.2.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
- gamesentenceminer-2.8.2.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
- gamesentenceminer-2.8.2.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
- gamesentenceminer-2.8.2.dist-info/RECORD,,
53
+ gamesentenceminer-2.8.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
+ gamesentenceminer-2.8.4.dist-info/METADATA,sha256=S3MxkE5od51DTveOhaPwiBa5tGA3UV1jqTGjpUnGXJs,5912
55
+ gamesentenceminer-2.8.4.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
+ gamesentenceminer-2.8.4.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
+ gamesentenceminer-2.8.4.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
+ gamesentenceminer-2.8.4.dist-info/RECORD,,