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,102 +1,94 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import webbrowser
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from sticker_convert.gui_components.gui_utils import GUIUtils
|
|
10
|
-
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
|
11
|
-
from sticker_convert.utils.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class LineGetAuthWindow(BaseWindow):
|
|
15
|
-
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
16
|
-
super().__init__(*args, **kwargs)
|
|
17
|
-
|
|
18
|
-
self.title("Get Line cookie")
|
|
19
|
-
|
|
20
|
-
self.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
self.
|
|
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
|
-
line_cookies
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
self.gui.
|
|
93
|
-
self.gui.
|
|
94
|
-
|
|
95
|
-
self.cb_msg_block_line("Got Line cookies successfully")
|
|
96
|
-
self.gui.save_creds()
|
|
97
|
-
self.gui.highlight_fields()
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
self.cb_msg_block_line(
|
|
101
|
-
"Failed to get Line cookies. Have you logged in the web browser?"
|
|
102
|
-
)
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import webbrowser
|
|
3
|
+
from threading import Thread
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from ttkbootstrap import Button, Frame, Label # type: ignore
|
|
7
|
+
|
|
8
|
+
from sticker_convert.auth.auth_line import AuthLine
|
|
9
|
+
from sticker_convert.gui_components.gui_utils import GUIUtils
|
|
10
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
|
11
|
+
from sticker_convert.utils.translate import I
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LineGetAuthWindow(BaseWindow):
|
|
15
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
16
|
+
super().__init__(*args, **kwargs)
|
|
17
|
+
|
|
18
|
+
self.title(I("Get Line cookie"))
|
|
19
|
+
|
|
20
|
+
self.frame_info = Frame(self.scrollable_frame)
|
|
21
|
+
self.frame_btn = Frame(self.scrollable_frame)
|
|
22
|
+
|
|
23
|
+
self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
|
|
24
|
+
self.frame_btn.grid(column=0, row=1, sticky="news", padx=3, pady=3)
|
|
25
|
+
|
|
26
|
+
# Info frame
|
|
27
|
+
self.explanation1_lbl = Label(
|
|
28
|
+
self.frame_info,
|
|
29
|
+
text=I("Line cookies are required to create custom message stickers"),
|
|
30
|
+
justify="left",
|
|
31
|
+
anchor="w",
|
|
32
|
+
)
|
|
33
|
+
self.explanation2_lbl = Label(
|
|
34
|
+
self.frame_info,
|
|
35
|
+
text=I("Please open web browser and login to Line"),
|
|
36
|
+
justify="left",
|
|
37
|
+
anchor="w",
|
|
38
|
+
)
|
|
39
|
+
self.explanation3_lbl = Label(
|
|
40
|
+
self.frame_info,
|
|
41
|
+
text=I('After that, press "Get cookies"'),
|
|
42
|
+
justify="left",
|
|
43
|
+
anchor="w",
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
self.explanation1_lbl.grid(
|
|
47
|
+
column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
|
|
48
|
+
)
|
|
49
|
+
self.explanation2_lbl.grid(
|
|
50
|
+
column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
|
|
51
|
+
)
|
|
52
|
+
self.explanation3_lbl.grid(
|
|
53
|
+
column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# Buttons frame
|
|
57
|
+
self.open_browser_btn = Button(
|
|
58
|
+
self.frame_btn, text=I("Open browser"), command=self.cb_open_browser
|
|
59
|
+
)
|
|
60
|
+
self.get_cookies_btn = Button(
|
|
61
|
+
self.frame_btn, text=I("Get cookies"), command=self.cb_get_cookies
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
self.open_browser_btn.pack()
|
|
65
|
+
self.get_cookies_btn.pack()
|
|
66
|
+
|
|
67
|
+
GUIUtils.finalize_window(self)
|
|
68
|
+
|
|
69
|
+
def cb_open_browser(self) -> None:
|
|
70
|
+
line_login_site = "https://store.line.me/login"
|
|
71
|
+
success = webbrowser.open(line_login_site)
|
|
72
|
+
if not success:
|
|
73
|
+
self.gui.cb.ask_str(
|
|
74
|
+
I("Cannot open web browser for you. Install web browser and open:"),
|
|
75
|
+
initialvalue=line_login_site,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def cb_get_cookies(self) -> None:
|
|
79
|
+
Thread(target=self.cb_get_cookies_thread, daemon=True).start()
|
|
80
|
+
|
|
81
|
+
def cb_get_cookies_thread(self, *_: Any) -> None:
|
|
82
|
+
m = AuthLine(self.gui.get_opt_cred(), self.gui.cb)
|
|
83
|
+
|
|
84
|
+
line_cookies = None
|
|
85
|
+
line_cookies, msg = m.get_cred()
|
|
86
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
87
|
+
if line_cookies:
|
|
88
|
+
if not self.gui.creds.get("line"):
|
|
89
|
+
self.gui.creds["line"] = {}
|
|
90
|
+
self.gui.creds["line"]["cookies"] = line_cookies
|
|
91
|
+
self.gui.line_cookies_var.set(line_cookies)
|
|
92
|
+
self.gui.save_creds()
|
|
93
|
+
self.gui.highlight_fields()
|
|
94
|
+
return
|
|
@@ -1,135 +1,84 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
from sticker_convert.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
self.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
self.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
self.
|
|
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
|
-
self.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
GUIUtils.finalize_window(self)
|
|
86
|
-
|
|
87
|
-
def cb_get_cred(self) -> None:
|
|
88
|
-
m = GetSignalAuth()
|
|
89
|
-
|
|
90
|
-
signal_bin_path = None
|
|
91
|
-
signal_user_data_dir = None
|
|
92
|
-
if self.gui.signal_data_dir_var.get():
|
|
93
|
-
signal_bin_path = "(User specified)"
|
|
94
|
-
signal_user_data_dir = self.gui.signal_data_dir_var.get()
|
|
95
|
-
|
|
96
|
-
uuid, password, msg = m.get_cred(signal_bin_path, signal_user_data_dir)
|
|
97
|
-
|
|
98
|
-
if uuid and password:
|
|
99
|
-
if not self.gui.creds.get("signal"):
|
|
100
|
-
self.gui.creds["signal"] = {}
|
|
101
|
-
self.gui.creds["signal"]["uuid"] = uuid
|
|
102
|
-
self.gui.creds["signal"]["password"] = password
|
|
103
|
-
self.gui.signal_uuid_var.set(uuid)
|
|
104
|
-
self.gui.signal_password_var.set(password)
|
|
105
|
-
|
|
106
|
-
self.gui.save_creds()
|
|
107
|
-
self.gui.highlight_fields()
|
|
108
|
-
|
|
109
|
-
self.cb_msg_block_signal(msg)
|
|
110
|
-
|
|
111
|
-
def cb_launch_signal(self) -> None:
|
|
112
|
-
m = GetSignalAuth()
|
|
113
|
-
signal_bin_path, signal_user_data_dir = m.get_signal_desktop()
|
|
114
|
-
|
|
115
|
-
if self.gui.signal_data_dir_var.get():
|
|
116
|
-
signal_user_data_dir = self.gui.signal_data_dir_var.get()
|
|
117
|
-
|
|
118
|
-
if signal_bin_path:
|
|
119
|
-
Popen(
|
|
120
|
-
[
|
|
121
|
-
signal_bin_path,
|
|
122
|
-
"--no-sandbox",
|
|
123
|
-
f"--user-data-dir={signal_user_data_dir}",
|
|
124
|
-
]
|
|
125
|
-
)
|
|
126
|
-
else:
|
|
127
|
-
self.cb_msg_block_signal("Error: Signal Desktop not installed.")
|
|
128
|
-
|
|
129
|
-
def cb_setdir(self) -> None:
|
|
130
|
-
orig_input_dir = self.gui.signal_data_dir_var.get()
|
|
131
|
-
if not Path(orig_input_dir).is_dir():
|
|
132
|
-
orig_input_dir = ""
|
|
133
|
-
input_dir = filedialog.askdirectory(initialdir=orig_input_dir)
|
|
134
|
-
if input_dir:
|
|
135
|
-
self.gui.signal_data_dir_var.set(input_dir)
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from threading import Thread
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from ttkbootstrap import Button, Frame, Label # type: ignore
|
|
6
|
+
|
|
7
|
+
from sticker_convert.auth.auth_signal import AuthSignal
|
|
8
|
+
from sticker_convert.gui_components.gui_utils import GUIUtils
|
|
9
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
|
10
|
+
from sticker_convert.utils.translate import I
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SignalGetAuthWindow(BaseWindow):
|
|
14
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
15
|
+
super(SignalGetAuthWindow, self).__init__(*args, **kwargs)
|
|
16
|
+
|
|
17
|
+
self.title("Get Signal uuid and password")
|
|
18
|
+
|
|
19
|
+
self.frame_info = Frame(self.scrollable_frame)
|
|
20
|
+
self.frame_start_btn = Frame(self.scrollable_frame)
|
|
21
|
+
|
|
22
|
+
self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
|
|
23
|
+
self.frame_start_btn.grid(column=0, row=1, sticky="news", padx=3, pady=3)
|
|
24
|
+
|
|
25
|
+
# Info frame
|
|
26
|
+
self.explanation1_lbl = Label(
|
|
27
|
+
self.frame_info,
|
|
28
|
+
text=I("Please install Signal Desktop"),
|
|
29
|
+
justify="left",
|
|
30
|
+
anchor="w",
|
|
31
|
+
)
|
|
32
|
+
self.explanation2_lbl = Label(
|
|
33
|
+
self.frame_info,
|
|
34
|
+
text=I("After installation, you need to login to Signal Desktop"),
|
|
35
|
+
justify="left",
|
|
36
|
+
anchor="w",
|
|
37
|
+
)
|
|
38
|
+
self.explanation3_lbl = Label(
|
|
39
|
+
self.frame_info,
|
|
40
|
+
text=I("uuid and password will be automatically fetched"),
|
|
41
|
+
justify="left",
|
|
42
|
+
anchor="w",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
self.explanation1_lbl.grid(
|
|
46
|
+
column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
|
|
47
|
+
)
|
|
48
|
+
self.explanation2_lbl.grid(
|
|
49
|
+
column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
|
|
50
|
+
)
|
|
51
|
+
self.explanation3_lbl.grid(
|
|
52
|
+
column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Start button frame
|
|
56
|
+
self.login_btn = Button(
|
|
57
|
+
self.frame_start_btn,
|
|
58
|
+
text=I("Get uuid and password"),
|
|
59
|
+
command=self.cb_login,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
self.login_btn.pack()
|
|
63
|
+
|
|
64
|
+
GUIUtils.finalize_window(self)
|
|
65
|
+
|
|
66
|
+
def cb_login(self) -> None:
|
|
67
|
+
Thread(target=self.cb_login_thread, daemon=True).start()
|
|
68
|
+
|
|
69
|
+
def cb_login_thread(self, *args: Any) -> None:
|
|
70
|
+
m = AuthSignal(self.gui.get_opt_cred(), self.gui.cb)
|
|
71
|
+
|
|
72
|
+
uuid, password, msg = m.get_cred()
|
|
73
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
74
|
+
if uuid and password:
|
|
75
|
+
if not self.gui.creds.get("signal"):
|
|
76
|
+
self.gui.creds["signal"] = {}
|
|
77
|
+
self.gui.creds["signal"]["uuid"] = uuid
|
|
78
|
+
self.gui.creds["signal"]["password"] = password
|
|
79
|
+
self.gui.signal_uuid_var.set(uuid)
|
|
80
|
+
self.gui.signal_password_var.set(password)
|
|
81
|
+
|
|
82
|
+
self.gui.save_creds()
|
|
83
|
+
self.gui.highlight_fields()
|
|
84
|
+
return
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import platform
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from subprocess import Popen
|
|
5
|
+
from threading import Thread
|
|
6
|
+
from tkinter import filedialog
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from ttkbootstrap import Button, Entry, Frame, Label # type: ignore
|
|
10
|
+
|
|
11
|
+
from sticker_convert.auth.auth_viber import AuthViber
|
|
12
|
+
from sticker_convert.gui_components.gui_utils import GUIUtils
|
|
13
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
|
14
|
+
from sticker_convert.utils.translate import I
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ViberGetAuthWindow(BaseWindow):
|
|
18
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
19
|
+
super().__init__(*args, **kwargs)
|
|
20
|
+
|
|
21
|
+
self.title(I("Get Viber auth data"))
|
|
22
|
+
|
|
23
|
+
self.frame_info = Frame(self.scrollable_frame)
|
|
24
|
+
self.frame_btns = Frame(self.scrollable_frame)
|
|
25
|
+
self.frame_config = Frame(self.scrollable_frame)
|
|
26
|
+
|
|
27
|
+
self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
|
|
28
|
+
self.frame_btns.grid(column=0, row=1, sticky="news", padx=3, pady=3)
|
|
29
|
+
self.frame_config.grid(column=0, row=2, sticky="news", padx=3, pady=3)
|
|
30
|
+
|
|
31
|
+
# Info frame
|
|
32
|
+
self.explanation_lbl0 = Label(
|
|
33
|
+
self.frame_info,
|
|
34
|
+
text=I("Please install Viber Desktop and login first."),
|
|
35
|
+
justify="left",
|
|
36
|
+
anchor="w",
|
|
37
|
+
)
|
|
38
|
+
self.explanation_lbl1 = Label(
|
|
39
|
+
self.frame_info,
|
|
40
|
+
text=I("It may take a minute to get auth data."),
|
|
41
|
+
justify="left",
|
|
42
|
+
anchor="w",
|
|
43
|
+
)
|
|
44
|
+
self.explanation_lbl2 = None
|
|
45
|
+
if platform.system() == "Darwin":
|
|
46
|
+
self.explanation_lbl2 = Label(
|
|
47
|
+
self.frame_info,
|
|
48
|
+
text=I("You need to disable SIP and may be asked for user password."),
|
|
49
|
+
justify="left",
|
|
50
|
+
anchor="w",
|
|
51
|
+
)
|
|
52
|
+
else:
|
|
53
|
+
self.explanation_lbl2 = Label(
|
|
54
|
+
self.frame_info,
|
|
55
|
+
text=I("You may be asked for admin password."),
|
|
56
|
+
justify="left",
|
|
57
|
+
anchor="w",
|
|
58
|
+
)
|
|
59
|
+
if platform.system() != "Darwin":
|
|
60
|
+
self.explanation_lbl3 = Label(
|
|
61
|
+
self.frame_info,
|
|
62
|
+
text=I(
|
|
63
|
+
"Note: This will download ProcDump and read memory of Viber Desktop"
|
|
64
|
+
),
|
|
65
|
+
justify="left",
|
|
66
|
+
anchor="w",
|
|
67
|
+
)
|
|
68
|
+
else:
|
|
69
|
+
self.explanation_lbl3 = Label(
|
|
70
|
+
self.frame_info,
|
|
71
|
+
text=I("Note: This will read memory of Viber Desktop"),
|
|
72
|
+
justify="left",
|
|
73
|
+
anchor="w",
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
self.explanation_lbl0.grid(column=0, row=0, sticky="w", padx=3, pady=3)
|
|
77
|
+
self.explanation_lbl1.grid(column=0, row=1, sticky="w", padx=3, pady=3)
|
|
78
|
+
self.explanation_lbl2.grid(column=0, row=2, sticky="w", padx=3, pady=3)
|
|
79
|
+
self.explanation_lbl3.grid(column=0, row=3, sticky="w", padx=3, pady=3)
|
|
80
|
+
|
|
81
|
+
# Start button frame
|
|
82
|
+
self.launch_btn = Button(
|
|
83
|
+
self.frame_btns,
|
|
84
|
+
text=I("Launch Viber Desktop"),
|
|
85
|
+
command=self.cb_launch_viber,
|
|
86
|
+
bootstyle="secondary", # type: ignore
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
self.get_cred_btn = Button(
|
|
90
|
+
self.frame_btns,
|
|
91
|
+
text=I("Get auth data"),
|
|
92
|
+
command=self.cb_get_cred,
|
|
93
|
+
bootstyle="default", # type: ignore
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
self.launch_btn.pack()
|
|
97
|
+
self.get_cred_btn.pack()
|
|
98
|
+
|
|
99
|
+
# Config frame
|
|
100
|
+
self.setdir_lbl = Label(
|
|
101
|
+
self.frame_config,
|
|
102
|
+
text=self.gui.help["cred"]["viber_bin_path"],
|
|
103
|
+
justify="left",
|
|
104
|
+
anchor="w",
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
self.setdir_entry = Entry(
|
|
108
|
+
self.frame_config,
|
|
109
|
+
textvariable=self.gui.viber_bin_path_var,
|
|
110
|
+
width=32,
|
|
111
|
+
)
|
|
112
|
+
self.setdir_btn = Button(
|
|
113
|
+
self.frame_config,
|
|
114
|
+
text=I("Choose"),
|
|
115
|
+
command=self.cb_setdir,
|
|
116
|
+
width=8,
|
|
117
|
+
bootstyle="secondary", # type: ignore
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
self.setdir_lbl.grid(column=0, row=0, columnspan=2, sticky="w", padx=3, pady=3)
|
|
121
|
+
self.setdir_entry.grid(column=0, row=1, sticky="w", padx=3, pady=3)
|
|
122
|
+
self.setdir_btn.grid(column=1, row=1, sticky="e", padx=3, pady=3)
|
|
123
|
+
|
|
124
|
+
GUIUtils.finalize_window(self)
|
|
125
|
+
|
|
126
|
+
def cb_get_cred(self) -> None:
|
|
127
|
+
Thread(target=self.cb_get_cred_thread, daemon=True).start()
|
|
128
|
+
|
|
129
|
+
def cb_get_cred_thread(self) -> None:
|
|
130
|
+
m = AuthViber(self.gui.get_opt_cred(), self.gui.cb)
|
|
131
|
+
|
|
132
|
+
viber_bin_path = None
|
|
133
|
+
if self.gui.viber_bin_path_var.get():
|
|
134
|
+
viber_bin_path = self.gui.viber_bin_path_var.get()
|
|
135
|
+
|
|
136
|
+
viber_auth, msg = m.get_cred(viber_bin_path)
|
|
137
|
+
|
|
138
|
+
if viber_auth:
|
|
139
|
+
if not self.gui.creds.get("viber"):
|
|
140
|
+
self.gui.creds["viber"] = {}
|
|
141
|
+
self.gui.creds["viber"]["auth"] = viber_auth
|
|
142
|
+
self.gui.viber_auth_var.set(viber_auth)
|
|
143
|
+
|
|
144
|
+
self.gui.save_creds()
|
|
145
|
+
self.gui.highlight_fields()
|
|
146
|
+
|
|
147
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
148
|
+
|
|
149
|
+
def cb_launch_viber(self) -> None:
|
|
150
|
+
m = AuthViber(self.gui.get_opt_cred(), self.gui.cb)
|
|
151
|
+
viber_bin_path = m.get_viber_desktop()
|
|
152
|
+
|
|
153
|
+
if self.gui.viber_bin_path_var.get():
|
|
154
|
+
viber_bin_path = self.gui.viber_bin_path_var.get()
|
|
155
|
+
|
|
156
|
+
if viber_bin_path:
|
|
157
|
+
Popen([viber_bin_path])
|
|
158
|
+
else:
|
|
159
|
+
msg = "Error: Viber Desktop not installed."
|
|
160
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
161
|
+
|
|
162
|
+
def cb_setdir(self) -> None:
|
|
163
|
+
orig_input_dir = self.gui.viber_bin_path_var.get()
|
|
164
|
+
if not Path(orig_input_dir).is_dir():
|
|
165
|
+
orig_input_dir = ""
|
|
166
|
+
input_dir = filedialog.askdirectory(initialdir=orig_input_dir)
|
|
167
|
+
if input_dir:
|
|
168
|
+
self.gui.viber_bin_path_var.set(input_dir)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: NiklasPeterson
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: NiklasPeterson
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# ios-message-stickers-template
|
|
2
|
-
|
|
3
|
-
I have also created an Figma file with the templates for creating the stickers & iMessage App Icon.
|
|
4
|
-
You can find it here: https://www.figma.com/community/file/894284318358585629/iOS-iMessage-Stickers-Template
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Links
|
|
8
|
-
Video tutorial: https://developer.apple.com/videos/play/tutorials/building-sticker-packs/
|
|
9
|
-
Documentation: https://developer.apple.com/documentation/messages
|
|
10
|
-
General info: https://developer.apple.com/imessage/
|
|
1
|
+
# ios-message-stickers-template
|
|
2
|
+
|
|
3
|
+
I have also created an Figma file with the templates for creating the stickers & iMessage App Icon.
|
|
4
|
+
You can find it here: https://www.figma.com/community/file/894284318358585629/iOS-iMessage-Stickers-Template
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Links
|
|
8
|
+
Video tutorial: https://developer.apple.com/videos/play/tutorials/building-sticker-packs/
|
|
9
|
+
Documentation: https://developer.apple.com/documentation/messages
|
|
10
|
+
General info: https://developer.apple.com/imessage/
|