sticker-convert 2.8.12__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 -24
- sticker_convert/auth/__init__.py +0 -0
- sticker_convert/auth/auth_base.py +19 -0
- sticker_convert/auth/auth_discord.py +149 -0
- sticker_convert/{utils/auth/get_kakao_auth.py → auth/auth_kakao_android_login.py} +331 -300
- sticker_convert/auth/auth_kakao_desktop_login.py +327 -0
- sticker_convert/auth/auth_kakao_desktop_memdump.py +281 -0
- sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +98 -80
- sticker_convert/auth/auth_signal.py +139 -0
- sticker_convert/auth/auth_telethon.py +161 -0
- sticker_convert/auth/auth_viber.py +250 -0
- sticker_convert/auth/telegram_api.py +736 -0
- sticker_convert/cli.py +623 -509
- sticker_convert/converter.py +1093 -962
- sticker_convert/definitions.py +11 -0
- sticker_convert/downloaders/download_band.py +111 -0
- sticker_convert/downloaders/download_base.py +171 -130
- sticker_convert/downloaders/download_discord.py +92 -0
- sticker_convert/downloaders/download_kakao.py +417 -255
- sticker_convert/downloaders/download_line.py +484 -472
- sticker_convert/downloaders/download_ogq.py +80 -0
- sticker_convert/downloaders/download_signal.py +108 -92
- sticker_convert/downloaders/download_telegram.py +56 -130
- sticker_convert/downloaders/download_viber.py +121 -95
- sticker_convert/gui.py +788 -795
- sticker_convert/gui_components/frames/comp_frame.py +180 -165
- 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 -162
- 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 -715
- sticker_convert/gui_components/windows/base_window.py +7 -2
- sticker_convert/gui_components/windows/discord_get_auth_window.py +79 -0
- sticker_convert/gui_components/windows/kakao_get_auth_window.py +511 -186
- sticker_convert/gui_components/windows/line_get_auth_window.py +94 -102
- sticker_convert/gui_components/windows/signal_get_auth_window.py +84 -135
- sticker_convert/gui_components/windows/viber_get_auth_window.py +168 -0
- sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +3 -3
- sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- 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 1.sticker/Sticker 1.png +0 -0
- 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 2.sticker/Sticker 2.png +0 -0
- 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/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
- 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 StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
- 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/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- sticker_convert/job.py +279 -179
- sticker_convert/job_option.py +15 -2
- 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/compression.json +220 -16
- sticker_convert/resources/emoji.json +527 -77
- sticker_convert/resources/help.ja_JP.json +88 -0
- sticker_convert/resources/help.json +24 -10
- 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 -71
- sticker_convert/resources/input.zh_CN.json +74 -0
- sticker_convert/resources/input.zh_TW.json +74 -0
- sticker_convert/resources/memdump_linux.sh +25 -0
- sticker_convert/resources/memdump_windows.ps1 +8 -0
- sticker_convert/resources/output.ja_JP.json +38 -0
- sticker_convert/resources/output.json +24 -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 -156
- sticker_convert/uploaders/upload_base.py +44 -35
- sticker_convert/uploaders/upload_signal.py +218 -173
- sticker_convert/uploaders/upload_telegram.py +353 -388
- sticker_convert/uploaders/upload_viber.py +178 -0
- sticker_convert/uploaders/xcode_imessage.py +295 -285
- sticker_convert/utils/callback.py +238 -6
- sticker_convert/utils/chrome_remotedebug.py +219 -0
- sticker_convert/utils/chromiums/linux.py +52 -0
- sticker_convert/utils/chromiums/osx.py +68 -0
- sticker_convert/utils/chromiums/windows.py +45 -0
- sticker_convert/utils/emoji.py +28 -0
- sticker_convert/utils/files/json_resources_loader.py +24 -19
- sticker_convert/utils/files/metadata_handler.py +8 -7
- sticker_convert/utils/files/run_bin.py +1 -1
- sticker_convert/utils/media/codec_info.py +99 -67
- sticker_convert/utils/media/format_verify.py +33 -20
- sticker_convert/utils/process.py +231 -0
- sticker_convert/utils/translate.py +108 -0
- sticker_convert/utils/url_detect.py +40 -33
- sticker_convert/version.py +1 -1
- {sticker_convert-2.8.12.dist-info → sticker_convert-2.17.0.0.dist-info}/METADATA +189 -96
- sticker_convert-2.17.0.0.dist-info/RECORD +138 -0
- {sticker_convert-2.8.12.dist-info → sticker_convert-2.17.0.0.dist-info}/WHEEL +1 -1
- sticker_convert/utils/auth/get_signal_auth.py +0 -129
- sticker_convert-2.8.12.dist-info/RECORD +0 -101
- {sticker_convert-2.8.12.dist-info → sticker_convert-2.17.0.0.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.8.12.dist-info → sticker_convert-2.17.0.0.dist-info/licenses}/LICENSE +0 -0
- {sticker_convert-2.8.12.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,162 +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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
self.
|
|
86
|
-
self,
|
|
87
|
-
text="Generate",
|
|
88
|
-
command=self.
|
|
89
|
-
bootstyle="secondary", # type: ignore
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
self.
|
|
93
|
-
self, text="
|
|
94
|
-
)
|
|
95
|
-
self.
|
|
96
|
-
self, textvariable=self.gui.
|
|
97
|
-
)
|
|
98
|
-
self.
|
|
99
|
-
self.
|
|
100
|
-
self,
|
|
101
|
-
text="Generate",
|
|
102
|
-
command=self.
|
|
103
|
-
bootstyle="secondary", # type: ignore
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
self.
|
|
107
|
-
self,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
self.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
self.
|
|
124
|
-
|
|
125
|
-
)
|
|
126
|
-
self.
|
|
127
|
-
self.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
self.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
self
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
self.
|
|
156
|
-
self.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
self.
|
|
160
|
-
self.
|
|
161
|
-
|
|
162
|
-
|
|
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)
|