GameSentenceMiner 2.8.3__py3-none-any.whl → 2.8.5__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 = []
@@ -66,9 +66,7 @@
66
66
 
67
67
  async function saveData() {
68
68
  try {
69
- console.log(data)
70
69
  data.args.replacements = textData;
71
- console.log(data)
72
70
  const response = await fetch('/save-data', {
73
71
  method: 'POST',
74
72
  headers: { 'Content-Type': 'application/json' },
@@ -165,33 +163,35 @@
165
163
  const key = keyInput.value.trim();
166
164
  const value = valueInput.value.trim() || "";
167
165
  const originalKey = originalKeyInput.value;
168
- let keyEdited = false;
169
166
 
170
167
  if (!key) {
171
- alert('Key cannot be empty.');
168
+ // Basic validation
169
+ alert('Key and Value cannot be empty.');
172
170
  return;
173
171
  }
174
172
 
173
+ let keyEdited = false;
175
174
  if (originalKey && originalKey !== key) {
176
175
  delete textData[originalKey];
177
176
  keyEdited = true;
178
177
  }
179
178
 
180
179
  if (originalKey) {
181
- textData = { ...textData, [key]: value };
182
180
  if (keyEdited) {
183
- // No need to re-add, it was just updated
181
+ textData = { [key]: value, ...textData };
182
+ } else {
183
+ textData[key] = value;
184
184
  }
185
185
  } else {
186
186
  if (textData.hasOwnProperty(key)) {
187
187
  alert(`Key "${key}" already exists. Please use the Edit function to modify it.`);
188
188
  return;
189
189
  }
190
- textData = { ...textData, [key]: value };
190
+ textData = { [key]: value, ...textData };
191
191
  }
192
192
 
193
193
  await saveData();
194
- await loadData();
194
+ renderTable();
195
195
  modal.style.display = 'none';
196
196
  });
197
197
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.8.3
3
+ Version: 2.8.5
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,13 +25,13 @@ 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
@@ -46,13 +46,13 @@ GameSentenceMiner/web/static/favicon.ico,sha256=7d25r_FBqRSNsAoEHpSzNoT7zyVt2DJR
46
46
  GameSentenceMiner/web/static/favicon.svg,sha256=x305AP6WlXGtrXIZlaQspdLmwteoFYUoe5FyJ9MYlJ8,11517
47
47
  GameSentenceMiner/web/static/site.webmanifest,sha256=kaeNT-FjFt-T7JGzOhXH7YSqsrDeiplZ2kDxCN_CFU4,436
48
48
  GameSentenceMiner/web/static/style.css,sha256=bPZK0NVMuyRl5NNDuT7ZTzVLKlvSsdmeVHmAW4y5FM0,7001
49
- GameSentenceMiner/web/static/text_replacements.html,sha256=LJ2qBEZvyMaBJLLJzDIw0baiTeusplbn4jkpyHM6ZBI,8613
49
+ GameSentenceMiner/web/static/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
50
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.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
- gamesentenceminer-2.8.3.dist-info/METADATA,sha256=T1TY8jUlCkVraJ4K9J77yf5WAQKwZ2XNztPkYEsjHrk,5912
55
- gamesentenceminer-2.8.3.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
- gamesentenceminer-2.8.3.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
- gamesentenceminer-2.8.3.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
- gamesentenceminer-2.8.3.dist-info/RECORD,,
53
+ gamesentenceminer-2.8.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
+ gamesentenceminer-2.8.5.dist-info/METADATA,sha256=WbjF3XasYQRGfELVCzDOP3NyjG2dLlTawjrdnzRdc98,5912
55
+ gamesentenceminer-2.8.5.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
+ gamesentenceminer-2.8.5.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
+ gamesentenceminer-2.8.5.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
+ gamesentenceminer-2.8.5.dist-info/RECORD,,