GameSentenceMiner 2.5.4__py3-none-any.whl → 2.5.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.
- GameSentenceMiner/anki.py +1 -1
- GameSentenceMiner/gsm.py +3 -0
- GameSentenceMiner/notification.py +32 -14
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/METADATA +2 -1
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/RECORD +9 -9
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.5.4.dist-info → gamesentenceminer-2.5.5.dist-info}/top_level.txt +0 -0
GameSentenceMiner/anki.py
CHANGED
@@ -78,7 +78,7 @@ def update_anki_card(last_note: AnkiCard, note=None, audio_path='', video_path='
|
|
78
78
|
invoke("addTags", tags=tag_string, notes=[last_note.noteId])
|
79
79
|
logger.info(f"UPDATED ANKI CARD FOR {last_note.noteId}")
|
80
80
|
if get_config().features.notify_on_update:
|
81
|
-
notification.
|
81
|
+
notification.send_note_updated(tango)
|
82
82
|
if get_config().features.open_anki_edit:
|
83
83
|
notification.open_anki_card(last_note.noteId)
|
84
84
|
|
GameSentenceMiner/gsm.py
CHANGED
@@ -1,8 +1,19 @@
|
|
1
|
+
import platform
|
2
|
+
|
1
3
|
import requests
|
2
4
|
from plyer import notification
|
5
|
+
from win10toast import ToastNotifier
|
3
6
|
|
4
7
|
from GameSentenceMiner.configuration import logger
|
5
8
|
|
9
|
+
system = platform.system()
|
10
|
+
if system == "Windows":
|
11
|
+
notifier = ToastNotifier()
|
12
|
+
else:
|
13
|
+
notifier = notification
|
14
|
+
|
15
|
+
windows = system == "Windows"
|
16
|
+
|
6
17
|
|
7
18
|
def open_anki_card(note_id):
|
8
19
|
url = "http://localhost:8765"
|
@@ -26,55 +37,62 @@ def open_anki_card(note_id):
|
|
26
37
|
logger.info(f"Error connecting to AnkiConnect: {e}")
|
27
38
|
|
28
39
|
|
29
|
-
|
30
|
-
|
40
|
+
|
41
|
+
def send_notification(title, message, timeout):
|
42
|
+
if windows:
|
43
|
+
notifier.show_toast(title, message, duration=timeout)
|
44
|
+
else:
|
45
|
+
notification.notify(
|
46
|
+
title=title,
|
47
|
+
message=message,
|
48
|
+
app_name="GameSentenceMiner",
|
49
|
+
timeout=timeout # Notification disappears after 5 seconds
|
50
|
+
)
|
51
|
+
|
52
|
+
def send_note_updated(tango):
|
53
|
+
send_notification(
|
31
54
|
title="Anki Card Updated",
|
32
55
|
message=f"Audio and/or Screenshot added to note: {tango}",
|
33
|
-
app_name="GameSentenceMiner",
|
34
56
|
timeout=5 # Notification disappears after 5 seconds
|
35
57
|
)
|
36
58
|
|
37
|
-
|
38
59
|
def send_screenshot_updated(tango):
|
39
|
-
|
60
|
+
send_notification(
|
40
61
|
title="Anki Card Updated",
|
41
62
|
message=f"Screenshot updated on note: {tango}",
|
42
|
-
app_name="GameSentenceMiner",
|
43
63
|
timeout=5 # Notification disappears after 5 seconds
|
44
64
|
)
|
45
65
|
|
46
66
|
|
47
67
|
def send_screenshot_saved(path):
|
48
|
-
|
68
|
+
send_notification(
|
49
69
|
title="Screenshot Saved",
|
50
70
|
message=f"Screenshot saved to : {path}",
|
51
|
-
app_name="GameSentenceMiner",
|
52
71
|
timeout=5 # Notification disappears after 5 seconds
|
53
72
|
)
|
54
73
|
|
55
74
|
|
56
75
|
def send_audio_generated_notification(audio_path):
|
57
|
-
|
76
|
+
send_notification(
|
58
77
|
title="Audio Trimmed",
|
59
78
|
message=f"Audio Trimmed and placed at {audio_path}",
|
60
|
-
app_name="VideoGameMiner",
|
61
79
|
timeout=5 # Notification disappears after 5 seconds
|
62
80
|
)
|
63
81
|
|
64
82
|
|
65
83
|
def send_check_obs_notification(reason):
|
66
|
-
|
84
|
+
send_notification(
|
67
85
|
title="OBS Replay Invalid",
|
68
86
|
message=f"Check OBS Settings! Reason: {reason}",
|
69
|
-
app_name="GameSentenceMiner",
|
70
87
|
timeout=5 # Notification disappears after 5 seconds
|
71
88
|
)
|
72
89
|
|
73
90
|
|
74
91
|
def send_error_no_anki_update():
|
75
|
-
|
92
|
+
send_notification(
|
76
93
|
title="Error",
|
77
94
|
message=f"Anki Card not updated, Check Console for Reason!",
|
78
|
-
app_name="GameSentenceMiner",
|
79
95
|
timeout=5 # Notification disappears after 5 seconds
|
80
96
|
)
|
97
|
+
|
98
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: GameSentenceMiner
|
3
|
-
Version: 2.5.
|
3
|
+
Version: 2.5.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
|
@@ -29,6 +29,7 @@ Requires-Dist: stable-ts~=2.17.5
|
|
29
29
|
Requires-Dist: silero-vad~=5.1.2
|
30
30
|
Requires-Dist: ttkbootstrap~=1.10.1
|
31
31
|
Requires-Dist: dataclasses_json~=0.6.7
|
32
|
+
Requires-Dist: win10toast
|
32
33
|
Requires-Dist: numpy
|
33
34
|
Requires-Dist: pystray
|
34
35
|
Requires-Dist: pywin32; sys_platform == "win32"
|
@@ -1,13 +1,13 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
GameSentenceMiner/anki.py,sha256=
|
2
|
+
GameSentenceMiner/anki.py,sha256=zjZ3oE0iTMk1BQFuEhLWk8qgqJMYihO6-jTkKaC3eUk,12229
|
3
3
|
GameSentenceMiner/config_gui.py,sha256=PzzLX-OwK71U5JSFaxup0ec0oWBWaF6AeCXs0m13HK0,56762
|
4
4
|
GameSentenceMiner/configuration.py,sha256=kyvNCkZSZcqXbGjak8lb_GyhhjN8tIfb7eEfusz_M8A,16038
|
5
5
|
GameSentenceMiner/electron_messaging.py,sha256=fBk9Ipo0jg2OZwYaKe1Qsm05P2ftrdTRGgFYob7ZA-k,139
|
6
6
|
GameSentenceMiner/ffmpeg.py,sha256=2dwKbKxw_9sUXud67pPAx_6dGd1j-D99CdqLFVtbhSk,11479
|
7
7
|
GameSentenceMiner/gametext.py,sha256=LORVdE2WEo1CDI8gonc7qxrhbS4KFKXFQVKjhlkpLbc,7368
|
8
|
-
GameSentenceMiner/gsm.py,sha256=
|
8
|
+
GameSentenceMiner/gsm.py,sha256=MkRaty1ATLLJKZs9rv9Rdlitx3C9fwz66iD2AJS5LQQ,20343
|
9
9
|
GameSentenceMiner/model.py,sha256=bZm-2vkIw4gQCGLB02eDoTtO1Ymb_dnHk0VDJDFO3y8,5228
|
10
|
-
GameSentenceMiner/notification.py,sha256=
|
10
|
+
GameSentenceMiner/notification.py,sha256=p24TPw1iF8vDVL56NRgRi3oZ-5oQa9DkqqVjr1gZRJk,2577
|
11
11
|
GameSentenceMiner/obs.py,sha256=8ImXAVUWa4JdzwcBOEFShlZRZzh1dCvdpD1aEGhQfbU,6566
|
12
12
|
GameSentenceMiner/package.py,sha256=YlS6QRMuVlm6mdXx0rlXv9_3erTGS21jaP3PNNWfAH0,1250
|
13
13
|
GameSentenceMiner/util.py,sha256=lAFwAQNeHpVZs_Aeb2K2ShVdcmfrQzEwxUnbf7e6fOc,5699
|
@@ -19,9 +19,9 @@ GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
19
19
|
GameSentenceMiner/vad/silero_trim.py,sha256=-thDIZLuTLra3YBj7WR16Z6JeDgSpge2YuahprBvD8I,1585
|
20
20
|
GameSentenceMiner/vad/vosk_helper.py,sha256=BI_mg_qyrjNbuEJjXSUDoV0FWEtQtEOAPmrrNixnZ_8,5974
|
21
21
|
GameSentenceMiner/vad/whisper_helper.py,sha256=OF4J8TPPoKPJR1uFwrWAZ2Q7v0HJkVvNGmF8l1tACX0,3447
|
22
|
-
gamesentenceminer-2.5.
|
23
|
-
gamesentenceminer-2.5.
|
24
|
-
gamesentenceminer-2.5.
|
25
|
-
gamesentenceminer-2.5.
|
26
|
-
gamesentenceminer-2.5.
|
27
|
-
gamesentenceminer-2.5.
|
22
|
+
gamesentenceminer-2.5.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
23
|
+
gamesentenceminer-2.5.5.dist-info/METADATA,sha256=sHUHiKel1xt8b3oAys3w0In5FNvH0KGxlxsyxEMJWgs,5435
|
24
|
+
gamesentenceminer-2.5.5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
25
|
+
gamesentenceminer-2.5.5.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
26
|
+
gamesentenceminer-2.5.5.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
27
|
+
gamesentenceminer-2.5.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|