sticker-convert 2.13.3.0__py3-none-any.whl → 2.17.0.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.
- sticker_convert/__main__.py +24 -27
- sticker_convert/auth/__init__.py +0 -0
- sticker_convert/auth/auth_base.py +19 -0
- sticker_convert/{utils/auth/get_discord_auth.py → auth/auth_discord.py} +149 -118
- sticker_convert/{utils/auth/get_kakao_auth.py → auth/auth_kakao_android_login.py} +331 -330
- sticker_convert/auth/auth_kakao_desktop_login.py +327 -0
- sticker_convert/{utils/auth/get_kakao_desktop_auth.py → auth/auth_kakao_desktop_memdump.py} +281 -263
- sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +98 -80
- sticker_convert/{utils/auth/get_signal_auth.py → auth/auth_signal.py} +139 -135
- sticker_convert/auth/auth_telethon.py +161 -0
- sticker_convert/{utils/auth/get_viber_auth.py → auth/auth_viber.py} +250 -235
- sticker_convert/{utils/auth → auth}/telegram_api.py +736 -675
- sticker_convert/cli.py +623 -608
- sticker_convert/converter.py +1093 -1084
- sticker_convert/definitions.py +4 -0
- sticker_convert/downloaders/download_band.py +111 -110
- sticker_convert/downloaders/download_base.py +171 -166
- sticker_convert/downloaders/download_discord.py +92 -91
- sticker_convert/downloaders/download_kakao.py +417 -404
- sticker_convert/downloaders/download_line.py +484 -475
- sticker_convert/downloaders/download_ogq.py +80 -79
- sticker_convert/downloaders/download_signal.py +108 -105
- sticker_convert/downloaders/download_telegram.py +56 -55
- sticker_convert/downloaders/download_viber.py +121 -120
- sticker_convert/gui.py +788 -873
- sticker_convert/gui_components/frames/comp_frame.py +180 -166
- sticker_convert/gui_components/frames/config_frame.py +156 -113
- sticker_convert/gui_components/frames/control_frame.py +32 -30
- sticker_convert/gui_components/frames/cred_frame.py +232 -233
- sticker_convert/gui_components/frames/input_frame.py +139 -137
- sticker_convert/gui_components/frames/output_frame.py +112 -110
- sticker_convert/gui_components/frames/right_clicker.py +25 -23
- sticker_convert/gui_components/windows/advanced_compression_window.py +757 -757
- sticker_convert/gui_components/windows/base_window.py +7 -2
- sticker_convert/gui_components/windows/discord_get_auth_window.py +79 -82
- sticker_convert/gui_components/windows/kakao_get_auth_window.py +511 -321
- sticker_convert/gui_components/windows/line_get_auth_window.py +94 -102
- sticker_convert/gui_components/windows/signal_get_auth_window.py +84 -89
- sticker_convert/gui_components/windows/viber_get_auth_window.py +168 -168
- sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +3 -3
- sticker_convert/ios-message-stickers-template/README.md +10 -10
- sticker_convert/ios-message-stickers-template/stickers/Info.plist +43 -43
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +31 -31
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +6 -6
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +20 -20
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +91 -91
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +364 -364
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- sticker_convert/job.py +166 -130
- sticker_convert/job_option.py +1 -0
- sticker_convert/locales/en_US/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/ja_JP/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/zh_CN/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/zh_TW/LC_MESSAGES/base.mo +0 -0
- sticker_convert/py.typed +0 -0
- sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- sticker_convert/resources/help.ja_JP.json +88 -0
- sticker_convert/resources/help.json +10 -7
- sticker_convert/resources/help.zh_CN.json +88 -0
- sticker_convert/resources/help.zh_TW.json +88 -0
- sticker_convert/resources/input.ja_JP.json +74 -0
- sticker_convert/resources/input.json +121 -121
- sticker_convert/resources/input.zh_CN.json +74 -0
- sticker_convert/resources/input.zh_TW.json +74 -0
- sticker_convert/resources/output.ja_JP.json +38 -0
- sticker_convert/resources/output.zh_CN.json +38 -0
- sticker_convert/resources/output.zh_TW.json +38 -0
- sticker_convert/uploaders/compress_wastickers.py +186 -177
- sticker_convert/uploaders/upload_base.py +44 -35
- sticker_convert/uploaders/upload_signal.py +218 -203
- sticker_convert/uploaders/upload_telegram.py +353 -338
- sticker_convert/uploaders/upload_viber.py +178 -169
- sticker_convert/uploaders/xcode_imessage.py +295 -286
- sticker_convert/utils/callback.py +238 -6
- sticker_convert/utils/emoji.py +16 -4
- sticker_convert/utils/files/json_resources_loader.py +24 -19
- sticker_convert/utils/files/metadata_handler.py +3 -3
- sticker_convert/utils/translate.py +108 -0
- sticker_convert/utils/url_detect.py +40 -37
- sticker_convert/version.py +1 -1
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/METADATA +89 -74
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/RECORD +91 -74
- sticker_convert/utils/auth/telethon_setup.py +0 -97
- sticker_convert/utils/singletons.py +0 -18
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/WHEEL +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/licenses/LICENSE +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
from typing import TYPE_CHECKING, Any
|
|
3
|
-
|
|
4
|
-
from ttkbootstrap import Button, Frame # type: ignore
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from typing import TYPE_CHECKING, Any
|
|
3
|
+
|
|
4
|
+
from ttkbootstrap import Button, Frame # type: ignore
|
|
5
|
+
|
|
6
|
+
from sticker_convert.utils.translate import I
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from sticker_convert.gui import GUI
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ControlFrame(Frame):
|
|
13
|
+
def __init__(self, gui: "GUI", *args: Any, **kwargs: Any) -> None:
|
|
14
|
+
self.gui = gui
|
|
15
|
+
super().__init__(*args, **kwargs)
|
|
16
|
+
|
|
17
|
+
self.start_btn = Button(
|
|
18
|
+
self,
|
|
19
|
+
text=I("Start"),
|
|
20
|
+
command=self.cb_start_btn,
|
|
21
|
+
bootstyle="default", # type: ignore
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
self.start_btn.pack(expand=True, fill="x")
|
|
25
|
+
|
|
26
|
+
def cb_start_btn(self, *args: Any, **kwargs: Any) -> None:
|
|
27
|
+
if self.gui.job:
|
|
28
|
+
response = self.gui.cb.ask_bool(I("Cancel job?"))
|
|
29
|
+
if response is True:
|
|
30
|
+
self.gui.cancel_job()
|
|
31
|
+
else:
|
|
32
|
+
self.gui.start_job()
|
|
@@ -1,233 +1,232 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import webbrowser
|
|
3
|
-
from typing import TYPE_CHECKING, Any
|
|
4
|
-
|
|
5
|
-
from ttkbootstrap import Button, Entry, Label, LabelFrame # type: ignore
|
|
6
|
-
|
|
7
|
-
from sticker_convert.
|
|
8
|
-
from sticker_convert.gui_components.
|
|
9
|
-
from sticker_convert.gui_components.windows.
|
|
10
|
-
from sticker_convert.gui_components.windows.
|
|
11
|
-
from sticker_convert.gui_components.windows.
|
|
12
|
-
from sticker_convert.gui_components.windows.
|
|
13
|
-
from sticker_convert.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
self.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
self.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
self.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
self.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
self.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
self.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
self.
|
|
164
|
-
self.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
self.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
self.
|
|
173
|
-
self.
|
|
174
|
-
self.
|
|
175
|
-
self.
|
|
176
|
-
self.
|
|
177
|
-
self.
|
|
178
|
-
self.
|
|
179
|
-
self.
|
|
180
|
-
self.
|
|
181
|
-
self.
|
|
182
|
-
self.
|
|
183
|
-
self.
|
|
184
|
-
self.
|
|
185
|
-
self.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
self.gui.
|
|
200
|
-
self.gui.
|
|
201
|
-
self.gui.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
self.
|
|
222
|
-
self.
|
|
223
|
-
self.
|
|
224
|
-
self.
|
|
225
|
-
self.
|
|
226
|
-
self.
|
|
227
|
-
self.
|
|
228
|
-
self.
|
|
229
|
-
self.
|
|
230
|
-
self.
|
|
231
|
-
self.
|
|
232
|
-
self.
|
|
233
|
-
self.discord_get_auth_btn.config(state=state)
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import webbrowser
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from ttkbootstrap import Button, Entry, Label, LabelFrame # type: ignore
|
|
6
|
+
|
|
7
|
+
from sticker_convert.auth.auth_telethon import AuthTelethon
|
|
8
|
+
from sticker_convert.gui_components.frames.right_clicker import RightClicker
|
|
9
|
+
from sticker_convert.gui_components.windows.discord_get_auth_window import DiscordGetAuthWindow
|
|
10
|
+
from sticker_convert.gui_components.windows.kakao_get_auth_window import KakaoGetAuthWindow
|
|
11
|
+
from sticker_convert.gui_components.windows.line_get_auth_window import LineGetAuthWindow
|
|
12
|
+
from sticker_convert.gui_components.windows.signal_get_auth_window import SignalGetAuthWindow
|
|
13
|
+
from sticker_convert.gui_components.windows.viber_get_auth_window import ViberGetAuthWindow
|
|
14
|
+
from sticker_convert.utils.translate import I
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from sticker_convert.gui import GUI # type: ignore
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CredFrame(LabelFrame):
|
|
21
|
+
def __init__(self, gui: "GUI", *args: Any, **kwargs: Any) -> None:
|
|
22
|
+
self.gui = gui
|
|
23
|
+
super().__init__(*args, **kwargs)
|
|
24
|
+
|
|
25
|
+
self.grid_columnconfigure(1, weight=1)
|
|
26
|
+
|
|
27
|
+
self.signal_uuid_lbl = Label(
|
|
28
|
+
self, text=I("Signal uuid"), width=18, justify="left", anchor="w"
|
|
29
|
+
)
|
|
30
|
+
self.signal_uuid_entry = Entry(
|
|
31
|
+
self,
|
|
32
|
+
textvariable=self.gui.signal_uuid_var,
|
|
33
|
+
width=50,
|
|
34
|
+
validate="focusout",
|
|
35
|
+
validatecommand=self.gui.highlight_fields,
|
|
36
|
+
)
|
|
37
|
+
self.signal_uuid_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
38
|
+
|
|
39
|
+
self.signal_password_lbl = Label(
|
|
40
|
+
self, text=I("Signal password"), justify="left", anchor="w"
|
|
41
|
+
)
|
|
42
|
+
self.signal_password_entry = Entry(
|
|
43
|
+
self,
|
|
44
|
+
textvariable=self.gui.signal_password_var,
|
|
45
|
+
width=50,
|
|
46
|
+
validate="focusout",
|
|
47
|
+
validatecommand=self.gui.highlight_fields,
|
|
48
|
+
)
|
|
49
|
+
self.signal_password_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
50
|
+
|
|
51
|
+
self.signal_get_auth_btn = Button(
|
|
52
|
+
self,
|
|
53
|
+
text=I("Generate"),
|
|
54
|
+
command=self.cb_signal_get_auth,
|
|
55
|
+
bootstyle="secondary", # type: ignore
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
self.telegram_token_lbl = Label(
|
|
59
|
+
self, text=I("Telegram token"), justify="left", anchor="w"
|
|
60
|
+
)
|
|
61
|
+
self.telegram_token_entry = Entry(
|
|
62
|
+
self,
|
|
63
|
+
textvariable=self.gui.telegram_token_var,
|
|
64
|
+
width=50,
|
|
65
|
+
validate="focusout",
|
|
66
|
+
validatecommand=self.gui.highlight_fields,
|
|
67
|
+
)
|
|
68
|
+
self.telegram_token_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
69
|
+
|
|
70
|
+
self.telegram_userid_lbl = Label(
|
|
71
|
+
self, text=I("Telegram user_id"), justify="left", anchor="w"
|
|
72
|
+
)
|
|
73
|
+
self.telegram_userid_entry = Entry(
|
|
74
|
+
self,
|
|
75
|
+
textvariable=self.gui.telegram_userid_var,
|
|
76
|
+
width=50,
|
|
77
|
+
validate="focusout",
|
|
78
|
+
validatecommand=self.gui.highlight_fields,
|
|
79
|
+
)
|
|
80
|
+
self.telegram_userid_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
81
|
+
|
|
82
|
+
self.telethon_auth_lbl = Label(
|
|
83
|
+
self, text=I("Telethon authorization"), justify="left", anchor="w"
|
|
84
|
+
)
|
|
85
|
+
self.telethon_auth_btn = Button(
|
|
86
|
+
self,
|
|
87
|
+
text=I("Generate"),
|
|
88
|
+
command=self.cb_telethon_get_auth,
|
|
89
|
+
bootstyle="secondary", # type: ignore
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
self.kakao_auth_token_lbl = Label(
|
|
93
|
+
self, text=I("Kakao auth_token"), justify="left", anchor="w"
|
|
94
|
+
)
|
|
95
|
+
self.kakao_auth_token_entry = Entry(
|
|
96
|
+
self, textvariable=self.gui.kakao_auth_token_var, width=35
|
|
97
|
+
)
|
|
98
|
+
self.kakao_auth_token_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
99
|
+
self.kakao_get_auth_btn = Button(
|
|
100
|
+
self,
|
|
101
|
+
text=I("Generate"),
|
|
102
|
+
command=self.cb_kakao_get_auth,
|
|
103
|
+
bootstyle="secondary", # type: ignore
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
self.line_cookies_lbl = Label(
|
|
107
|
+
self, text=I("Line cookies"), width=18, justify="left", anchor="w"
|
|
108
|
+
)
|
|
109
|
+
self.line_cookies_entry = Entry(
|
|
110
|
+
self, textvariable=self.gui.line_cookies_var, width=35
|
|
111
|
+
)
|
|
112
|
+
self.line_cookies_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
113
|
+
self.line_get_auth_btn = Button(
|
|
114
|
+
self,
|
|
115
|
+
text=I("Generate"),
|
|
116
|
+
command=self.cb_line_get_auth,
|
|
117
|
+
bootstyle="secondary", # type: ignore
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
self.viber_auth_lbl = Label(
|
|
121
|
+
self, text=I("Viber auth"), width=18, justify="left", anchor="w"
|
|
122
|
+
)
|
|
123
|
+
self.viber_auth_entry = Entry(
|
|
124
|
+
self, textvariable=self.gui.viber_auth_var, width=35
|
|
125
|
+
)
|
|
126
|
+
self.viber_auth_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
127
|
+
self.viber_get_auth_btn = Button(
|
|
128
|
+
self,
|
|
129
|
+
text=I("Generate"),
|
|
130
|
+
command=self.cb_viber_get_auth,
|
|
131
|
+
bootstyle="secondary", # type: ignore
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
self.discord_token_lbl = Label(
|
|
135
|
+
self, text=I("Discord token"), width=18, justify="left", anchor="w"
|
|
136
|
+
)
|
|
137
|
+
self.discord_token_entry = Entry(
|
|
138
|
+
self, textvariable=self.gui.discord_token_var, width=35
|
|
139
|
+
)
|
|
140
|
+
self.discord_token_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
141
|
+
self.discord_get_auth_btn = Button(
|
|
142
|
+
self,
|
|
143
|
+
text=I("Generate"),
|
|
144
|
+
command=self.cb_discord_get_auth,
|
|
145
|
+
bootstyle="secondary", # type: ignore
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
self.help_btn = Button(
|
|
149
|
+
self,
|
|
150
|
+
text=I("Get help"),
|
|
151
|
+
command=self.cb_cred_help,
|
|
152
|
+
bootstyle="secondary", # type: ignore
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
self.signal_uuid_lbl.grid(column=0, row=0, sticky="w", padx=3, pady=3)
|
|
156
|
+
self.signal_uuid_entry.grid(
|
|
157
|
+
column=1, row=0, columnspan=2, sticky="w", padx=3, pady=3
|
|
158
|
+
)
|
|
159
|
+
self.signal_password_lbl.grid(column=0, row=1, sticky="w", padx=3, pady=3)
|
|
160
|
+
self.signal_password_entry.grid(
|
|
161
|
+
column=1, row=1, columnspan=2, sticky="w", padx=3, pady=3
|
|
162
|
+
)
|
|
163
|
+
self.signal_get_auth_btn.grid(column=2, row=2, sticky="e", padx=3, pady=3)
|
|
164
|
+
self.telegram_token_lbl.grid(column=0, row=3, sticky="w", padx=3, pady=3)
|
|
165
|
+
self.telegram_token_entry.grid(
|
|
166
|
+
column=1, row=3, columnspan=2, sticky="w", padx=3, pady=3
|
|
167
|
+
)
|
|
168
|
+
self.telegram_userid_lbl.grid(column=0, row=4, sticky="w", padx=3, pady=3)
|
|
169
|
+
self.telegram_userid_entry.grid(
|
|
170
|
+
column=1, row=4, columnspan=2, sticky="w", padx=3, pady=3
|
|
171
|
+
)
|
|
172
|
+
self.telethon_auth_lbl.grid(column=0, row=5, sticky="w", padx=3, pady=3)
|
|
173
|
+
self.telethon_auth_btn.grid(column=2, row=5, sticky="e", padx=3, pady=3)
|
|
174
|
+
self.kakao_auth_token_lbl.grid(column=0, row=6, sticky="w", padx=3, pady=3)
|
|
175
|
+
self.kakao_auth_token_entry.grid(column=1, row=6, sticky="w", padx=3, pady=3)
|
|
176
|
+
self.kakao_get_auth_btn.grid(column=2, row=6, sticky="e", padx=3, pady=3)
|
|
177
|
+
self.line_cookies_lbl.grid(column=0, row=7, sticky="w", padx=3, pady=3)
|
|
178
|
+
self.line_cookies_entry.grid(column=1, row=7, sticky="w", padx=3, pady=3)
|
|
179
|
+
self.line_get_auth_btn.grid(column=2, row=7, sticky="e", padx=3, pady=3)
|
|
180
|
+
self.viber_auth_lbl.grid(column=0, row=8, sticky="w", padx=3, pady=3)
|
|
181
|
+
self.viber_auth_entry.grid(column=1, row=8, sticky="w", padx=3, pady=3)
|
|
182
|
+
self.viber_get_auth_btn.grid(column=2, row=8, sticky="e", padx=3, pady=3)
|
|
183
|
+
self.discord_token_lbl.grid(column=0, row=9, sticky="w", padx=3, pady=3)
|
|
184
|
+
self.discord_token_entry.grid(column=1, row=9, sticky="w", padx=3, pady=3)
|
|
185
|
+
self.discord_get_auth_btn.grid(column=2, row=9, sticky="e", padx=3, pady=3)
|
|
186
|
+
self.help_btn.grid(column=2, row=10, sticky="e", padx=3, pady=3)
|
|
187
|
+
|
|
188
|
+
def cb_cred_help(self, *_: Any) -> None:
|
|
189
|
+
faq_site = "https://github.com/laggykiller/sticker-convert#faq"
|
|
190
|
+
success = webbrowser.open(faq_site)
|
|
191
|
+
if not success:
|
|
192
|
+
self.gui.cb.ask_str(I("You can get help from:"), initialvalue=faq_site)
|
|
193
|
+
|
|
194
|
+
def cb_telethon_get_auth(self, *_: Any) -> None:
|
|
195
|
+
success, _client, api_id, api_hash, msg = AuthTelethon(
|
|
196
|
+
self.gui.get_opt_cred(), self.gui.cb
|
|
197
|
+
).start(check_auth_only=True)
|
|
198
|
+
if success:
|
|
199
|
+
self.gui.telethon_api_id_var.set(api_id)
|
|
200
|
+
self.gui.telethon_api_hash_var.set(api_hash)
|
|
201
|
+
self.gui.save_creds()
|
|
202
|
+
self.gui.cb.put(("msg_block", (msg,), None))
|
|
203
|
+
|
|
204
|
+
def cb_kakao_get_auth(self, *_: Any) -> None:
|
|
205
|
+
KakaoGetAuthWindow(self.gui)
|
|
206
|
+
|
|
207
|
+
def cb_signal_get_auth(self, *_: Any) -> None:
|
|
208
|
+
SignalGetAuthWindow(self.gui)
|
|
209
|
+
|
|
210
|
+
def cb_line_get_auth(self, *_: Any) -> None:
|
|
211
|
+
LineGetAuthWindow(self.gui)
|
|
212
|
+
|
|
213
|
+
def cb_viber_get_auth(self, *_: Any) -> None:
|
|
214
|
+
ViberGetAuthWindow(self.gui)
|
|
215
|
+
|
|
216
|
+
def cb_discord_get_auth(self, *_: Any) -> None:
|
|
217
|
+
DiscordGetAuthWindow(self.gui)
|
|
218
|
+
|
|
219
|
+
def set_states(self, state: str) -> None:
|
|
220
|
+
self.signal_uuid_entry.config(state=state)
|
|
221
|
+
self.signal_password_entry.config(state=state)
|
|
222
|
+
self.signal_get_auth_btn.config(state=state)
|
|
223
|
+
self.telegram_token_entry.config(state=state)
|
|
224
|
+
self.telegram_userid_entry.config(state=state)
|
|
225
|
+
self.kakao_auth_token_entry.config(state=state)
|
|
226
|
+
self.kakao_get_auth_btn.config(state=state)
|
|
227
|
+
self.line_cookies_entry.config(state=state)
|
|
228
|
+
self.line_get_auth_btn.config(state=state)
|
|
229
|
+
self.viber_auth_entry.config(state=state)
|
|
230
|
+
self.viber_get_auth_btn.config(state=state)
|
|
231
|
+
self.discord_token_entry.config(state=state)
|
|
232
|
+
self.discord_get_auth_btn.config(state=state)
|