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.
Files changed (93) hide show
  1. sticker_convert/__main__.py +24 -27
  2. sticker_convert/auth/__init__.py +0 -0
  3. sticker_convert/auth/auth_base.py +19 -0
  4. sticker_convert/{utils/auth/get_discord_auth.py → auth/auth_discord.py} +149 -118
  5. sticker_convert/{utils/auth/get_kakao_auth.py → auth/auth_kakao_android_login.py} +331 -330
  6. sticker_convert/auth/auth_kakao_desktop_login.py +327 -0
  7. sticker_convert/{utils/auth/get_kakao_desktop_auth.py → auth/auth_kakao_desktop_memdump.py} +281 -263
  8. sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +98 -80
  9. sticker_convert/{utils/auth/get_signal_auth.py → auth/auth_signal.py} +139 -135
  10. sticker_convert/auth/auth_telethon.py +161 -0
  11. sticker_convert/{utils/auth/get_viber_auth.py → auth/auth_viber.py} +250 -235
  12. sticker_convert/{utils/auth → auth}/telegram_api.py +736 -675
  13. sticker_convert/cli.py +623 -608
  14. sticker_convert/converter.py +1093 -1084
  15. sticker_convert/definitions.py +4 -0
  16. sticker_convert/downloaders/download_band.py +111 -110
  17. sticker_convert/downloaders/download_base.py +171 -166
  18. sticker_convert/downloaders/download_discord.py +92 -91
  19. sticker_convert/downloaders/download_kakao.py +417 -404
  20. sticker_convert/downloaders/download_line.py +484 -475
  21. sticker_convert/downloaders/download_ogq.py +80 -79
  22. sticker_convert/downloaders/download_signal.py +108 -105
  23. sticker_convert/downloaders/download_telegram.py +56 -55
  24. sticker_convert/downloaders/download_viber.py +121 -120
  25. sticker_convert/gui.py +788 -873
  26. sticker_convert/gui_components/frames/comp_frame.py +180 -166
  27. sticker_convert/gui_components/frames/config_frame.py +156 -113
  28. sticker_convert/gui_components/frames/control_frame.py +32 -30
  29. sticker_convert/gui_components/frames/cred_frame.py +232 -233
  30. sticker_convert/gui_components/frames/input_frame.py +139 -137
  31. sticker_convert/gui_components/frames/output_frame.py +112 -110
  32. sticker_convert/gui_components/frames/right_clicker.py +25 -23
  33. sticker_convert/gui_components/windows/advanced_compression_window.py +757 -757
  34. sticker_convert/gui_components/windows/base_window.py +7 -2
  35. sticker_convert/gui_components/windows/discord_get_auth_window.py +79 -82
  36. sticker_convert/gui_components/windows/kakao_get_auth_window.py +511 -321
  37. sticker_convert/gui_components/windows/line_get_auth_window.py +94 -102
  38. sticker_convert/gui_components/windows/signal_get_auth_window.py +84 -89
  39. sticker_convert/gui_components/windows/viber_get_auth_window.py +168 -168
  40. sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +3 -3
  41. sticker_convert/ios-message-stickers-template/README.md +10 -10
  42. sticker_convert/ios-message-stickers-template/stickers/Info.plist +43 -43
  43. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +31 -31
  44. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +6 -6
  45. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +20 -20
  46. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +9 -9
  47. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +9 -9
  48. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +9 -9
  49. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +91 -91
  50. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +364 -364
  51. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
  52. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  53. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  54. sticker_convert/job.py +166 -130
  55. sticker_convert/job_option.py +1 -0
  56. sticker_convert/locales/en_US/LC_MESSAGES/base.mo +0 -0
  57. sticker_convert/locales/ja_JP/LC_MESSAGES/base.mo +0 -0
  58. sticker_convert/locales/zh_CN/LC_MESSAGES/base.mo +0 -0
  59. sticker_convert/locales/zh_TW/LC_MESSAGES/base.mo +0 -0
  60. sticker_convert/py.typed +0 -0
  61. sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  62. sticker_convert/resources/help.ja_JP.json +88 -0
  63. sticker_convert/resources/help.json +10 -7
  64. sticker_convert/resources/help.zh_CN.json +88 -0
  65. sticker_convert/resources/help.zh_TW.json +88 -0
  66. sticker_convert/resources/input.ja_JP.json +74 -0
  67. sticker_convert/resources/input.json +121 -121
  68. sticker_convert/resources/input.zh_CN.json +74 -0
  69. sticker_convert/resources/input.zh_TW.json +74 -0
  70. sticker_convert/resources/output.ja_JP.json +38 -0
  71. sticker_convert/resources/output.zh_CN.json +38 -0
  72. sticker_convert/resources/output.zh_TW.json +38 -0
  73. sticker_convert/uploaders/compress_wastickers.py +186 -177
  74. sticker_convert/uploaders/upload_base.py +44 -35
  75. sticker_convert/uploaders/upload_signal.py +218 -203
  76. sticker_convert/uploaders/upload_telegram.py +353 -338
  77. sticker_convert/uploaders/upload_viber.py +178 -169
  78. sticker_convert/uploaders/xcode_imessage.py +295 -286
  79. sticker_convert/utils/callback.py +238 -6
  80. sticker_convert/utils/emoji.py +16 -4
  81. sticker_convert/utils/files/json_resources_loader.py +24 -19
  82. sticker_convert/utils/files/metadata_handler.py +3 -3
  83. sticker_convert/utils/translate.py +108 -0
  84. sticker_convert/utils/url_detect.py +40 -37
  85. sticker_convert/version.py +1 -1
  86. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/METADATA +89 -74
  87. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/RECORD +91 -74
  88. sticker_convert/utils/auth/telethon_setup.py +0 -97
  89. sticker_convert/utils/singletons.py +0 -18
  90. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/WHEEL +0 -0
  91. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/entry_points.txt +0 -0
  92. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/licenses/LICENSE +0 -0
  93. {sticker_convert-2.13.3.0.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 functools import partial
4
- from threading import Thread
5
- from typing import Any
6
-
7
- from ttkbootstrap import Button, Frame, Label # type: ignore
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.auth.get_line_auth import GetLineAuth
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.cb_msg_block_line = partial(self.gui.cb_msg_block, parent=self)
21
-
22
- self.frame_info = Frame(self.scrollable_frame)
23
- self.frame_btn = Frame(self.scrollable_frame)
24
-
25
- self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
26
- self.frame_btn.grid(column=0, row=1, sticky="news", padx=3, pady=3)
27
-
28
- # Info frame
29
- self.explanation1_lbl = Label(
30
- self.frame_info,
31
- text="Line cookies are required to create custom message stickers",
32
- justify="left",
33
- anchor="w",
34
- )
35
- self.explanation2_lbl = Label(
36
- self.frame_info,
37
- text="Please open web browser and login to Line",
38
- justify="left",
39
- anchor="w",
40
- )
41
- self.explanation3_lbl = Label(
42
- self.frame_info,
43
- text='After that, press "Get cookies"',
44
- justify="left",
45
- anchor="w",
46
- )
47
-
48
- self.explanation1_lbl.grid(
49
- column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
50
- )
51
- self.explanation2_lbl.grid(
52
- column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
53
- )
54
- self.explanation3_lbl.grid(
55
- column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
56
- )
57
-
58
- # Buttons frame
59
- self.open_browser_btn = Button(
60
- self.frame_btn, text="Open browser", command=self.cb_open_browser
61
- )
62
- self.get_cookies_btn = Button(
63
- self.frame_btn, text="Get cookies", command=self.cb_get_cookies
64
- )
65
-
66
- self.open_browser_btn.pack()
67
- self.get_cookies_btn.pack()
68
-
69
- GUIUtils.finalize_window(self)
70
-
71
- def cb_open_browser(self) -> None:
72
- line_login_site = "https://store.line.me/login"
73
- success = webbrowser.open(line_login_site)
74
- if not success:
75
- self.gui.cb_ask_str(
76
- "Cannot open web browser for you. Install web browser and open:",
77
- initialvalue=line_login_site,
78
- )
79
-
80
- def cb_get_cookies(self) -> None:
81
- Thread(target=self.cb_get_cookies_thread, daemon=True).start()
82
-
83
- def cb_get_cookies_thread(self, *_: Any) -> None:
84
- m = GetLineAuth()
85
-
86
- line_cookies = None
87
- line_cookies = m.get_cred()
88
-
89
- if line_cookies:
90
- if not self.gui.creds.get("line"):
91
- self.gui.creds["line"] = {}
92
- self.gui.creds["line"]["cookies"] = line_cookies
93
- self.gui.line_cookies_var.set(line_cookies)
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,89 +1,84 @@
1
- #!/usr/bin/env python3
2
- from functools import partial
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.gui_components.gui_utils import GUIUtils
9
- from sticker_convert.gui_components.windows.base_window import BaseWindow
10
- from sticker_convert.utils.auth.get_signal_auth import GetSignalAuth
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.cb_msg_block_signal = partial(self.gui.cb_msg_block, parent=self)
20
- self.cb_ask_str_signal = partial(self.gui.cb_ask_str, parent=self)
21
-
22
- self.frame_info = Frame(self.scrollable_frame)
23
- self.frame_start_btn = Frame(self.scrollable_frame)
24
-
25
- self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
26
- self.frame_start_btn.grid(column=0, row=1, sticky="news", padx=3, pady=3)
27
-
28
- # Info frame
29
- self.explanation1_lbl = Label(
30
- self.frame_info,
31
- text="Please install Signal Desktop",
32
- justify="left",
33
- anchor="w",
34
- )
35
- self.explanation2_lbl = Label(
36
- self.frame_info,
37
- text="After installation, you need to login to Signal Desktop",
38
- justify="left",
39
- anchor="w",
40
- )
41
- self.explanation3_lbl = Label(
42
- self.frame_info,
43
- text="uuid and password will be automatically fetched",
44
- justify="left",
45
- anchor="w",
46
- )
47
-
48
- self.explanation1_lbl.grid(
49
- column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
50
- )
51
- self.explanation2_lbl.grid(
52
- column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
53
- )
54
- self.explanation3_lbl.grid(
55
- column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
56
- )
57
-
58
- # Start button frame
59
- self.login_btn = Button(
60
- self.frame_start_btn, text="Get uuid and password", command=self.cb_login
61
- )
62
-
63
- self.login_btn.pack()
64
-
65
- GUIUtils.finalize_window(self)
66
-
67
- def cb_login(self) -> None:
68
- Thread(target=self.cb_login_thread, daemon=True).start()
69
-
70
- def cb_login_thread(self, *args: Any) -> None:
71
- m = GetSignalAuth(cb_msg=self.gui.cb_msg, cb_ask_str=self.cb_ask_str_signal)
72
-
73
- uuid, password = m.get_cred()
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.cb_msg_block_signal(
83
- f"Got uuid and password successfully:\nuuid={uuid}\npassword={password}"
84
- )
85
- self.gui.save_creds()
86
- self.gui.highlight_fields()
87
- return
88
-
89
- self.cb_msg_block_signal("Failed to get uuid and password")
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