GameSentenceMiner 2.4.2__py3-none-any.whl → 2.4.3__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.
@@ -4,9 +4,9 @@ from tkinter import filedialog, messagebox, simpledialog
4
4
  import pyperclip
5
5
  import ttkbootstrap as ttk
6
6
 
7
- from GameSentenceMiner.package_updater import check_for_updates, get_latest_version, get_current_version
8
7
  from GameSentenceMiner import obs, configuration
9
8
  from GameSentenceMiner.configuration import *
9
+ from GameSentenceMiner.package import get_current_version, get_latest_version
10
10
 
11
11
  settings_saved = False
12
12
  on_save = []
@@ -95,25 +95,6 @@ class ConfigApp:
95
95
  if self.window is not None:
96
96
  self.window.withdraw()
97
97
 
98
- def update_now(self):
99
- update_available, version = check_for_updates()
100
- if update_available:
101
- messagebox.showinfo("Update", "GSM Will Copy the Update Command to your clipboard, please run it in a terminal.")
102
- pyperclip.copy("pip install --upgrade GameSentenceMiner")
103
- self.on_exit(None, None)
104
- else:
105
- messagebox.showinfo("No Update Found", "No update found.")
106
-
107
- def check_update(self, show_no_update=False):
108
- update_available, version = check_for_updates()
109
- if update_available:
110
- self.latest_version.config(text=version)
111
- should_update = messagebox.askyesno("Update Found", "Update Found, would you like to update now?")
112
- if should_update:
113
- self.update_now()
114
- elif show_no_update:
115
- messagebox.showinfo("No Update Found", "No update found.")
116
-
117
98
  def save_settings(self, profile_change=False):
118
99
  global settings_saved
119
100
 
@@ -123,7 +104,6 @@ class ConfigApp:
123
104
  use_websocket=self.websocket_enabled.get(),
124
105
  websocket_uri=self.websocket_uri.get(),
125
106
  open_config_on_startup=self.open_config_on_startup.get(),
126
- check_for_update_on_startup=self.check_for_update_on_startup.get(),
127
107
  texthook_replacement_regex=self.texthook_replacement_regex.get()
128
108
  ),
129
109
  paths=Paths(
@@ -295,13 +275,6 @@ class ConfigApp:
295
275
  self.add_label_and_increment_row(general_frame, "Whether to open config when the script starts.",
296
276
  row=self.current_row, column=2)
297
277
 
298
- ttk.Label(general_frame, text="Check for Updates On Startup:").grid(row=self.current_row, column=0, sticky='W')
299
- self.check_for_update_on_startup = tk.BooleanVar(value=self.settings.general.check_for_update_on_startup)
300
- ttk.Checkbutton(general_frame, variable=self.check_for_update_on_startup).grid(row=self.current_row, column=1,
301
- sticky='W')
302
- self.add_label_and_increment_row(general_frame, "Always check for Updates On Startup.",
303
- row=self.current_row, column=2)
304
-
305
278
  ttk.Label(general_frame, text="Current Version:").grid(row=self.current_row, column=0, sticky='W')
306
279
  self.current_version = ttk.Label(general_frame, text=get_current_version())
307
280
  self.current_version.grid(row=self.current_row, column=1)
@@ -314,13 +287,6 @@ class ConfigApp:
314
287
  self.add_label_and_increment_row(general_frame, "The latest available version of the application.",
315
288
  row=self.current_row, column=2)
316
289
 
317
- ttk.Button(general_frame, text="Check Update", command=lambda: self.check_update(True)).grid(row=self.current_row, column=0,
318
- pady=5)
319
- ttk.Button(general_frame, text="Update Now", command=self.update_now).grid(row=self.current_row, column=1,
320
- pady=5)
321
- self.add_label_and_increment_row(general_frame, "Check for updates or update to the latest version.",
322
- row=self.current_row, column=2)
323
-
324
290
  # ttk.Label(general_frame, text="Per Scene Config:").grid(row=self.current_row, column=0, sticky='W')
325
291
  # self.per_scene_config = tk.BooleanVar(value=self.master_config.per_scene_config)
326
292
  # ttk.Checkbutton(general_frame, variable=self.per_scene_config).grid(row=self.current_row, column=1,
@@ -41,7 +41,6 @@ class General:
41
41
  use_websocket: bool = True
42
42
  websocket_uri: str = 'localhost:6677'
43
43
  open_config_on_startup: bool = False
44
- check_for_update_on_startup: bool = False
45
44
  texthook_replacement_regex: str = ""
46
45
 
47
46
 
GameSentenceMiner/gsm.py CHANGED
@@ -463,8 +463,6 @@ def main(reloading=False, do_config_input=True):
463
463
  win32api.SetConsoleCtrlHandler(handle_exit())
464
464
 
465
465
  try:
466
- if get_config().general.check_for_update_on_startup:
467
- root.after(0, settings_window.check_update)
468
466
  if get_config().general.open_config_on_startup:
469
467
  root.after(0, settings_window.show)
470
468
  settings_window.add_save_hook(update_icon)
@@ -1,8 +1,6 @@
1
1
  import os
2
2
  from importlib import metadata
3
- import sys
4
3
 
5
- import pyperclip
6
4
  import requests
7
5
 
8
6
  from GameSentenceMiner.configuration import logger, get_app_directory
@@ -19,12 +19,12 @@ vosk_model = None
19
19
  # Function to download and cache the Vosk model
20
20
  def download_and_cache_vosk_model(model_dir="vosk_model_cache"):
21
21
  # Ensure the cache directory exists
22
- if not os.path.exists(model_dir):
23
- os.makedirs(model_dir)
22
+ if not os.path.exists(os.path.join(get_app_directory(), model_dir)):
23
+ os.makedirs(os.path.join(get_app_directory(), model_dir))
24
24
 
25
25
  # Extract the model name from the URL
26
26
  model_filename = get_config().vad.vosk_url.split("/")[-1]
27
- model_path = os.path.join(model_dir, model_filename)
27
+ model_path = os.path.join(get_app_directory(), model_dir, model_filename)
28
28
 
29
29
  # If the model is already downloaded, skip the download
30
30
  if not os.path.exists(model_path):
@@ -38,7 +38,7 @@ def download_and_cache_vosk_model(model_dir="vosk_model_cache"):
38
38
  logger.info("Download complete.")
39
39
 
40
40
  # Extract the model if it's a zip or tar file
41
- model_extract_path = os.path.join(model_dir, "vosk_model")
41
+ model_extract_path = os.path.join(get_app_directory(), model_dir, "vosk_model")
42
42
  if not os.path.exists(model_extract_path):
43
43
  logger.info("Extracting the Vosk model...")
44
44
  if model_filename.endswith(".zip"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: GameSentenceMiner
3
- Version: 2.4.2
3
+ Version: 2.4.3
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
@@ -1,14 +1,14 @@
1
1
  GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  GameSentenceMiner/anki.py,sha256=QBrA-WVQfK4KjKB2Wm1WDW7BlVy8MF6-1ByTApVzPVA,10576
3
- GameSentenceMiner/config_gui.py,sha256=nk0-aFTrqtygbLOqnQMSUqHQFda4bRhFG18Tz3Ansn4,54215
4
- GameSentenceMiner/configuration.py,sha256=zj3Oi1oRN0oxV_Y1xVbtGdxo0966am13j-cmKS7ezLs,14509
3
+ GameSentenceMiner/config_gui.py,sha256=RCZJwg5FQpx_J-8jS7v54ivKPBkjicHKpmzN2zh9yAA,51975
4
+ GameSentenceMiner/configuration.py,sha256=fQNBQjmJn2ViBSYMFNuyC5CSklBk0xgMDSXC47CwDe0,14463
5
5
  GameSentenceMiner/ffmpeg.py,sha256=4nyl_kdXi_trzDyhhjSmszN0BlFF-McAFyOghvCyl34,11142
6
6
  GameSentenceMiner/gametext.py,sha256=AkK77s_orZrWYEZEDDN9V8vvwiyt_YKAlWS4hhYXUx4,8928
7
- GameSentenceMiner/gsm.py,sha256=nJa1FdPZOBOWvKRAmkoDcoMKsIVqg9DsjAp6N17Fb80,19448
7
+ GameSentenceMiner/gsm.py,sha256=t6hGJZKfMgiwgYUy7zWHlfmwyyLD-_eOEBeiTPpMFxk,19331
8
8
  GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
9
9
  GameSentenceMiner/notification.py,sha256=WBaQWoPNhW4XqdPBUmxPBgjk0ngzH_4v9zMQ-XQAKC8,2010
10
10
  GameSentenceMiner/obs.py,sha256=8ImXAVUWa4JdzwcBOEFShlZRZzh1dCvdpD1aEGhQfbU,6566
11
- GameSentenceMiner/package_updater.py,sha256=0uaLAp0WrWqostNTBWRS0laITjI9aN9Yt_6GXosS4NQ,1278
11
+ GameSentenceMiner/package.py,sha256=YlS6QRMuVlm6mdXx0rlXv9_3erTGS21jaP3PNNWfAH0,1250
12
12
  GameSentenceMiner/util.py,sha256=MITweiFYaefWQF5nR8tZ9yE6vd_b-fLuP0MP1Y1U4K0,4720
13
13
  GameSentenceMiner/utility_gui.py,sha256=EtQUnCgTTdzKJE0iCJiHjjc_c6tc7JtI09LRg4_iy8Y,4555
14
14
  GameSentenceMiner/downloader/Untitled_json.py,sha256=RUUl2bbbCpUDUUS0fP0tdvf5FngZ7ILdA_J5TFYAXUQ,15272
@@ -16,11 +16,11 @@ GameSentenceMiner/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
16
16
  GameSentenceMiner/downloader/download_tools.py,sha256=584QVsv-btpJowMRrqSbWpKDCMhInQM0iGe-Yw0Q2p0,6298
17
17
  GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  GameSentenceMiner/vad/silero_trim.py,sha256=syDJX_KbFmdyFFtnQqYTD0tICsUCJizYhs-atPgXtxA,1549
19
- GameSentenceMiner/vad/vosk_helper.py,sha256=-AAwK0cgOC5rK3_gL0sQgrPJ75E49g_PxZR4d5ckwc4,5826
19
+ GameSentenceMiner/vad/vosk_helper.py,sha256=HifeXKbEMrs81ZuuGxS67yAghu8TMXUP6Oan9i9dTxw,5938
20
20
  GameSentenceMiner/vad/whisper_helper.py,sha256=bpR1HVnJRn9H5u8XaHBqBJ6JwIjzqn-Fajps8QmQ4zc,3411
21
- gamesentenceminer-2.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
22
- gamesentenceminer-2.4.2.dist-info/METADATA,sha256=a82JB-lTRQd-1RgBAfITMu9TEQKhIICXqZxzwmTK7Ls,10395
23
- gamesentenceminer-2.4.2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
24
- gamesentenceminer-2.4.2.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
25
- gamesentenceminer-2.4.2.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
26
- gamesentenceminer-2.4.2.dist-info/RECORD,,
21
+ gamesentenceminer-2.4.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
22
+ gamesentenceminer-2.4.3.dist-info/METADATA,sha256=66Gl-pWPnznGHiLO23WIcsxwj7xdtONTsaQZ_E-Kltc,10395
23
+ gamesentenceminer-2.4.3.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
24
+ gamesentenceminer-2.4.3.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
25
+ gamesentenceminer-2.4.3.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
26
+ gamesentenceminer-2.4.3.dist-info/RECORD,,