sticker-convert 2.6.3__tar.gz → 2.7.0__tar.gz
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-2.6.3/src/sticker_convert.egg-info → sticker-convert-2.7.0}/PKG-INFO +4 -4
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/requirements.txt +3 -3
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/cli.py +6 -11
- sticker-convert-2.7.0/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +83 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/compress_wastickers.py +2 -2
- sticker-convert-2.7.0/src/sticker_convert/utils/auth/get_signal_auth.py +115 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/callback.py +0 -1
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/version.py +1 -1
- {sticker-convert-2.6.3 → sticker-convert-2.7.0/src/sticker_convert.egg-info}/PKG-INFO +4 -4
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/requires.txt +3 -3
- sticker-convert-2.6.3/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -93
- sticker-convert-2.6.3/src/sticker_convert/utils/auth/get_signal_auth.py +0 -346
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/LICENSE +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/MANIFEST.in +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/README.md +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/pyproject.toml +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/setup.cfg +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/__main__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/converter.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/definitions.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_base.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_kakao.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_line.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_signal.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_telegram.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/gui_utils.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/job.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/job_option.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/appicon.icns +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/appicon.ico +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/appicon.png +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/compression.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/emoji.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/help.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/input.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/output.json +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/__init__.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_base.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_signal.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/cache_store.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/json_manager.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/run_bin.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/codec_info.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/format_verify.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/url_detect.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/entry_points.txt +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/top_level.txt +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/tests/test_compression.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/tests/test_download.py +0 -0
- {sticker-convert-2.6.3 → sticker-convert-2.7.0}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.7.0
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -370,15 +370,15 @@ Requires-Dist: beautifulsoup4~=4.12.3
|
|
370
370
|
Requires-Dist: rookiepy~=0.3.6
|
371
371
|
Requires-Dist: imagequant~=1.1.1
|
372
372
|
Requires-Dist: memory-tempfile~=2.2.3
|
373
|
-
Requires-Dist: numpy~=1.26.
|
373
|
+
Requires-Dist: numpy~=1.26.4
|
374
374
|
Requires-Dist: Pillow~=10.2.0
|
375
375
|
Requires-Dist: pyoxipng~=9.0.0
|
376
376
|
Requires-Dist: python-telegram-bot~=20.5
|
377
377
|
Requires-Dist: requests~=2.31.0
|
378
378
|
Requires-Dist: rlottie_python~=1.2.1
|
379
|
-
Requires-Dist: selenium~=4.17.2
|
380
379
|
Requires-Dist: signalstickers-client~=3.3.0
|
381
|
-
Requires-Dist:
|
380
|
+
Requires-Dist: sqlcipher3-wheels~=0.5.2.post0
|
381
|
+
Requires-Dist: tqdm~=4.66.2
|
382
382
|
Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
|
383
383
|
Requires-Dist: webp~=0.3.0
|
384
384
|
|
@@ -4,14 +4,14 @@ beautifulsoup4~=4.12.3
|
|
4
4
|
rookiepy~=0.3.6
|
5
5
|
imagequant~=1.1.1
|
6
6
|
memory-tempfile~=2.2.3
|
7
|
-
numpy~=1.26.
|
7
|
+
numpy~=1.26.4
|
8
8
|
Pillow~=10.2.0
|
9
9
|
pyoxipng~=9.0.0
|
10
10
|
python-telegram-bot~=20.5
|
11
11
|
requests~=2.31.0
|
12
12
|
rlottie_python~=1.2.1
|
13
|
-
selenium~=4.17.2
|
14
13
|
signalstickers-client~=3.3.0
|
15
|
-
|
14
|
+
sqlcipher3-wheels~=0.5.2.post0
|
15
|
+
tqdm~=4.66.2
|
16
16
|
ttkbootstrap-fork-laggykiller~=1.5.1
|
17
17
|
webp~=0.3.0
|
@@ -435,20 +435,15 @@ class CLI:
|
|
435
435
|
self.cb.msg(f"Got auth_token successfully: {auth_token}")
|
436
436
|
|
437
437
|
if args.signal_get_auth:
|
438
|
-
m = GetSignalAuth(
|
438
|
+
m = GetSignalAuth()
|
439
439
|
|
440
|
-
uuid, password =
|
441
|
-
while True:
|
442
|
-
uuid, password = m.get_cred()
|
440
|
+
uuid, password, msg = m.get_cred()
|
443
441
|
|
444
|
-
|
445
|
-
|
446
|
-
|
442
|
+
if uuid and password:
|
443
|
+
opt_cred.signal_uuid = uuid
|
444
|
+
opt_cred.signal_password = password
|
447
445
|
|
448
|
-
|
449
|
-
f"Got uuid and password successfully: {uuid}, {password}"
|
450
|
-
)
|
451
|
-
break
|
446
|
+
self.cb.msg(msg)
|
452
447
|
|
453
448
|
if args.line_get_auth:
|
454
449
|
m = GetLineAuth()
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
from functools import partial
|
3
|
+
from subprocess import Popen
|
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):
|
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_btns = Frame(self.scrollable_frame)
|
24
|
+
|
25
|
+
self.frame_info.grid(column=0, row=0, sticky="news", padx=3, pady=3)
|
26
|
+
self.frame_btns.grid(column=0, row=1, sticky="news", padx=3, pady=3)
|
27
|
+
|
28
|
+
# Info frame
|
29
|
+
self.explanation_lbl = Label(
|
30
|
+
self.frame_info,
|
31
|
+
text="Please install Signal Desktop and login first.",
|
32
|
+
justify="left",
|
33
|
+
anchor="w",
|
34
|
+
)
|
35
|
+
|
36
|
+
self.explanation_lbl.grid(
|
37
|
+
column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
|
38
|
+
)
|
39
|
+
|
40
|
+
# Start button frame
|
41
|
+
self.launch_btn = Button(
|
42
|
+
self.frame_btns, text="Launch Signal Desktop", command=self.cb_launch_signal
|
43
|
+
)
|
44
|
+
|
45
|
+
self.login_btn = Button(
|
46
|
+
self.frame_btns, text="Get uuid and password", command=self.cb_login
|
47
|
+
)
|
48
|
+
|
49
|
+
self.launch_btn.pack()
|
50
|
+
self.login_btn.pack()
|
51
|
+
|
52
|
+
GUIUtils.finalize_window(self)
|
53
|
+
|
54
|
+
def cb_login(self):
|
55
|
+
m = GetSignalAuth()
|
56
|
+
uuid, password, msg = m.get_cred()
|
57
|
+
|
58
|
+
if uuid and password:
|
59
|
+
if not self.gui.creds.get("signal"):
|
60
|
+
self.gui.creds["signal"] = {}
|
61
|
+
self.gui.creds["signal"]["uuid"] = uuid
|
62
|
+
self.gui.creds["signal"]["password"] = password
|
63
|
+
self.gui.signal_uuid_var.set(uuid)
|
64
|
+
self.gui.signal_password_var.set(password)
|
65
|
+
|
66
|
+
self.gui.save_creds()
|
67
|
+
self.gui.highlight_fields()
|
68
|
+
|
69
|
+
self.cb_msg_block_signal(msg)
|
70
|
+
|
71
|
+
def cb_launch_signal(self):
|
72
|
+
m = GetSignalAuth()
|
73
|
+
signal_bin_path, signal_user_data_dir = m.get_signal_desktop()
|
74
|
+
if signal_bin_path:
|
75
|
+
Popen(
|
76
|
+
[
|
77
|
+
signal_bin_path,
|
78
|
+
"--no-sandbox",
|
79
|
+
f"--user-data-dir={signal_user_data_dir}",
|
80
|
+
]
|
81
|
+
)
|
82
|
+
else:
|
83
|
+
self.cb_msg_block_signal("Error: Signal Desktop not installed.")
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/compress_wastickers.py
RENAMED
@@ -104,8 +104,8 @@ class CompressWastickers(UploadBase):
|
|
104
104
|
self.add_metadata(Path(tempdir), pack_title, author)
|
105
105
|
with zipfile.ZipFile(out_f, "w", zipfile.ZIP_DEFLATED) as zipf:
|
106
106
|
for file in Path(tempdir).iterdir():
|
107
|
-
file_path = Path(tempdir, file)
|
108
|
-
zipf.write(file_path, arcname=file_path.
|
107
|
+
file_path = Path(tempdir, file.name)
|
108
|
+
zipf.write(file_path, arcname=file_path.name)
|
109
109
|
|
110
110
|
self.cb.put((out_f))
|
111
111
|
urls.append(out_f)
|
@@ -0,0 +1,115 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import os
|
3
|
+
import json
|
4
|
+
import platform
|
5
|
+
import shutil
|
6
|
+
from sqlcipher3 import dbapi2 as sqlite3
|
7
|
+
from pathlib import Path
|
8
|
+
from typing import Optional
|
9
|
+
|
10
|
+
|
11
|
+
class GetSignalAuth:
|
12
|
+
def get_signal_desktop(self) -> tuple[Optional[str], Optional[str]]:
|
13
|
+
if platform.system() == "Windows":
|
14
|
+
signal_bin_path_prod = os.path.expandvars(
|
15
|
+
"%localappdata%/Programs/signal-desktop/Signal.exe"
|
16
|
+
)
|
17
|
+
signal_bin_path_beta = os.path.expandvars(
|
18
|
+
"%localappdata%/Programs/signal-desktop-beta/Signal Beta.exe"
|
19
|
+
)
|
20
|
+
signal_user_data_dir_prod = os.path.abspath(
|
21
|
+
os.path.expandvars("%appdata%/Signal")
|
22
|
+
)
|
23
|
+
signal_user_data_dir_beta = os.path.abspath(
|
24
|
+
os.path.expandvars("%appdata%/Signal Beta")
|
25
|
+
)
|
26
|
+
elif platform.system() == "Darwin":
|
27
|
+
signal_bin_path_prod = "/Applications/Signal.app/Contents/MacOS/Signal"
|
28
|
+
signal_bin_path_beta = (
|
29
|
+
"/Applications/Signal Beta.app/Contents/MacOS/Signal Beta"
|
30
|
+
)
|
31
|
+
signal_user_data_dir_prod = os.path.expanduser(
|
32
|
+
"~/Library/Application Support/Signal"
|
33
|
+
)
|
34
|
+
signal_user_data_dir_beta = os.path.expanduser(
|
35
|
+
"~/Library/Application Support/Signal Beta"
|
36
|
+
)
|
37
|
+
else:
|
38
|
+
if not (signal_bin_path_prod := shutil.which("signal-desktop")): # type: ignore
|
39
|
+
signal_bin_path_prod = "signal-desktop"
|
40
|
+
if not (signal_bin_path_beta := shutil.which("signal-desktop-beta")): # type: ignore
|
41
|
+
signal_bin_path_beta = "signal-desktop-beta"
|
42
|
+
signal_user_data_dir_prod = os.path.expanduser("~/.config/Signal")
|
43
|
+
signal_user_data_dir_beta = os.path.expanduser("~/.config/Signal Beta")
|
44
|
+
|
45
|
+
if Path(signal_bin_path_prod).is_file():
|
46
|
+
return signal_bin_path_prod, signal_user_data_dir_prod
|
47
|
+
elif Path(signal_bin_path_beta).is_file():
|
48
|
+
return signal_bin_path_beta, signal_user_data_dir_beta
|
49
|
+
else:
|
50
|
+
return None, None
|
51
|
+
|
52
|
+
def get_cred(self) -> tuple[Optional[str], Optional[str], str]:
|
53
|
+
signal_bin_path, signal_user_data_dir = self.get_signal_desktop()
|
54
|
+
|
55
|
+
if not (signal_bin_path and signal_user_data_dir):
|
56
|
+
msg = "Signal Desktop not detected.\n"
|
57
|
+
msg += "Download and install Signal Desktop,\n"
|
58
|
+
msg += "then login to Signal Desktop and try again."
|
59
|
+
|
60
|
+
return None, None, msg
|
61
|
+
|
62
|
+
signal_config = Path(signal_user_data_dir, "config.json")
|
63
|
+
|
64
|
+
if not signal_config.is_file():
|
65
|
+
msg = "Signal Desktop installed,\n"
|
66
|
+
msg += "but it's config file not found.\n"
|
67
|
+
msg += "Please login to Signal Desktop and try again.\n"
|
68
|
+
msg += "\n"
|
69
|
+
msg += f"{signal_bin_path=}\n"
|
70
|
+
msg += f"{signal_user_data_dir=}\n"
|
71
|
+
return None, None, msg
|
72
|
+
|
73
|
+
with open(signal_config) as f:
|
74
|
+
config = json.load(f)
|
75
|
+
key = config.get("key")
|
76
|
+
db_key = f"x'{key}'"
|
77
|
+
|
78
|
+
signal_database = Path(signal_user_data_dir, "sql/db.sqlite")
|
79
|
+
|
80
|
+
if not signal_database.is_file():
|
81
|
+
msg = "Signal Desktop installed,\n"
|
82
|
+
msg += "but database file not found.\n"
|
83
|
+
msg += "Please login to Signal Desktop and try again.\n"
|
84
|
+
msg += "\n"
|
85
|
+
msg += f"{signal_bin_path=}\n"
|
86
|
+
msg += f"{signal_user_data_dir=}\n"
|
87
|
+
return None, None, msg
|
88
|
+
|
89
|
+
db_conn = sqlite3.connect(signal_database.as_posix()) # type: ignore
|
90
|
+
db_cursor = db_conn.cursor()
|
91
|
+
db_cursor.execute(f'PRAGMA key="{db_key}"')
|
92
|
+
db_cursor.execute("SELECT * FROM items")
|
93
|
+
result = db_cursor.fetchall()
|
94
|
+
db_conn.close()
|
95
|
+
|
96
|
+
uuid_id = None
|
97
|
+
password = None
|
98
|
+
for r in result:
|
99
|
+
if "uuid_id" in r:
|
100
|
+
uuid_id = json.loads(r[1])["value"]
|
101
|
+
if "password" in r:
|
102
|
+
password = json.loads(r[1])["value"]
|
103
|
+
if uuid_id and password:
|
104
|
+
msg = "Got uuid and password successfully:\n"
|
105
|
+
msg += f"{uuid_id=}\n"
|
106
|
+
msg += f"{password=}"
|
107
|
+
return uuid_id, password, msg
|
108
|
+
|
109
|
+
msg = "Signal Desktop installed and Database found,\n"
|
110
|
+
msg += "but uuid and password not found.\n"
|
111
|
+
msg += "Please login to Signal Desktop and try again.\n"
|
112
|
+
msg += "\n"
|
113
|
+
msg += f"{signal_bin_path=}\n"
|
114
|
+
msg += f"{signal_user_data_dir=}\n"
|
115
|
+
return None, None, msg
|
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
-
__version__ = "2.
|
2
|
+
__version__ = "2.7.0"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.7.0
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -370,15 +370,15 @@ Requires-Dist: beautifulsoup4~=4.12.3
|
|
370
370
|
Requires-Dist: rookiepy~=0.3.6
|
371
371
|
Requires-Dist: imagequant~=1.1.1
|
372
372
|
Requires-Dist: memory-tempfile~=2.2.3
|
373
|
-
Requires-Dist: numpy~=1.26.
|
373
|
+
Requires-Dist: numpy~=1.26.4
|
374
374
|
Requires-Dist: Pillow~=10.2.0
|
375
375
|
Requires-Dist: pyoxipng~=9.0.0
|
376
376
|
Requires-Dist: python-telegram-bot~=20.5
|
377
377
|
Requires-Dist: requests~=2.31.0
|
378
378
|
Requires-Dist: rlottie_python~=1.2.1
|
379
|
-
Requires-Dist: selenium~=4.17.2
|
380
379
|
Requires-Dist: signalstickers-client~=3.3.0
|
381
|
-
Requires-Dist:
|
380
|
+
Requires-Dist: sqlcipher3-wheels~=0.5.2.post0
|
381
|
+
Requires-Dist: tqdm~=4.66.2
|
382
382
|
Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
|
383
383
|
Requires-Dist: webp~=0.3.0
|
384
384
|
|
@@ -4,14 +4,14 @@ beautifulsoup4~=4.12.3
|
|
4
4
|
rookiepy~=0.3.6
|
5
5
|
imagequant~=1.1.1
|
6
6
|
memory-tempfile~=2.2.3
|
7
|
-
numpy~=1.26.
|
7
|
+
numpy~=1.26.4
|
8
8
|
Pillow~=10.2.0
|
9
9
|
pyoxipng~=9.0.0
|
10
10
|
python-telegram-bot~=20.5
|
11
11
|
requests~=2.31.0
|
12
12
|
rlottie_python~=1.2.1
|
13
|
-
selenium~=4.17.2
|
14
13
|
signalstickers-client~=3.3.0
|
15
|
-
|
14
|
+
sqlcipher3-wheels~=0.5.2.post0
|
15
|
+
tqdm~=4.66.2
|
16
16
|
ttkbootstrap-fork-laggykiller~=1.5.1
|
17
17
|
webp~=0.3.0
|
@@ -1,93 +0,0 @@
|
|
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, Toplevel # 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):
|
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 BETA VERSION",
|
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):
|
68
|
-
Thread(target=self.cb_login_thread, daemon=True).start()
|
69
|
-
|
70
|
-
def cb_login_thread(self, *args: Any):
|
71
|
-
m = GetSignalAuth(cb_msg=self.gui.cb_msg, cb_ask_str=self.cb_ask_str_signal)
|
72
|
-
|
73
|
-
uuid, password = None, None
|
74
|
-
while Toplevel.winfo_exists(self):
|
75
|
-
uuid, password = m.get_cred()
|
76
|
-
|
77
|
-
if uuid and password:
|
78
|
-
if not self.gui.creds.get("signal"):
|
79
|
-
self.gui.creds["signal"] = {}
|
80
|
-
self.gui.creds["signal"]["uuid"] = uuid
|
81
|
-
self.gui.creds["signal"]["password"] = password
|
82
|
-
self.gui.signal_uuid_var.set(uuid)
|
83
|
-
self.gui.signal_password_var.set(password)
|
84
|
-
m.close()
|
85
|
-
|
86
|
-
self.cb_msg_block_signal(
|
87
|
-
f"Got uuid and password successfully:\nuuid={uuid}\npassword={password}"
|
88
|
-
)
|
89
|
-
self.gui.save_creds()
|
90
|
-
self.gui.highlight_fields()
|
91
|
-
return
|
92
|
-
|
93
|
-
self.cb_msg_block_signal("Failed to get uuid and password")
|
@@ -1,346 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
import io
|
3
|
-
import json
|
4
|
-
import os
|
5
|
-
import platform
|
6
|
-
import shutil
|
7
|
-
import stat
|
8
|
-
import string
|
9
|
-
import webbrowser
|
10
|
-
import zipfile
|
11
|
-
from pathlib import Path
|
12
|
-
from typing import Generator, Optional, Callable
|
13
|
-
|
14
|
-
import requests
|
15
|
-
from selenium import webdriver
|
16
|
-
from selenium.common.exceptions import JavascriptException
|
17
|
-
from selenium.webdriver.chrome.service import Service
|
18
|
-
|
19
|
-
from sticker_convert.definitions import CONFIG_DIR
|
20
|
-
from sticker_convert.utils.files.run_bin import RunBin
|
21
|
-
|
22
|
-
|
23
|
-
# https://stackoverflow.com/a/17197027
|
24
|
-
def strings(filename: str, min: int = 4) -> Generator[str, None, None]:
|
25
|
-
with open(filename, "r", errors="ignore") as f:
|
26
|
-
result = ""
|
27
|
-
for c in f.read():
|
28
|
-
if c in string.printable:
|
29
|
-
result += c
|
30
|
-
continue
|
31
|
-
if len(result) >= min:
|
32
|
-
yield result
|
33
|
-
result = ""
|
34
|
-
if len(result) >= min: # catch result at EOF
|
35
|
-
yield result
|
36
|
-
|
37
|
-
|
38
|
-
class GetSignalAuth:
|
39
|
-
def __init__(
|
40
|
-
self,
|
41
|
-
signal_bin_version: str = "beta",
|
42
|
-
cb_msg: Callable[..., None] = print,
|
43
|
-
cb_ask_str: Callable[..., str] = input,
|
44
|
-
):
|
45
|
-
chromedriver_download_dir = CONFIG_DIR / "bin"
|
46
|
-
os.makedirs(chromedriver_download_dir, exist_ok=True)
|
47
|
-
|
48
|
-
self.signal_bin_version = signal_bin_version
|
49
|
-
self.chromedriver_download_dir = chromedriver_download_dir
|
50
|
-
|
51
|
-
self.cb_ask_str = cb_ask_str
|
52
|
-
self.cb_msg = cb_msg
|
53
|
-
|
54
|
-
def download_signal_desktop(self, download_url: str, signal_bin_path: str):
|
55
|
-
webbrowser.open(download_url)
|
56
|
-
|
57
|
-
self.cb_msg(download_url)
|
58
|
-
|
59
|
-
prompt = "Signal Desktop not detected.\n"
|
60
|
-
prompt += "Download and install Signal Desktop BETA version\n"
|
61
|
-
prompt += "After installation, quit Signal Desktop before continuing"
|
62
|
-
while not (Path(signal_bin_path).is_file() or shutil.which(signal_bin_path)):
|
63
|
-
if self.cb_ask_str != input:
|
64
|
-
self.cb_ask_str(
|
65
|
-
prompt, initialvalue=download_url, cli_show_initialvalue=False
|
66
|
-
)
|
67
|
-
else:
|
68
|
-
input(prompt)
|
69
|
-
|
70
|
-
def get_signal_chromedriver_version(self, electron_bin_path: str) -> Optional[str]:
|
71
|
-
if RunBin.get_bin("strings", silent=True):
|
72
|
-
status, output_str = RunBin.run_cmd(
|
73
|
-
cmd_list=["strings", electron_bin_path], silence=True
|
74
|
-
)
|
75
|
-
if status is False:
|
76
|
-
return None
|
77
|
-
ss = output_str.split("\n")
|
78
|
-
else:
|
79
|
-
ss = strings(electron_bin_path)
|
80
|
-
|
81
|
-
for s in ss:
|
82
|
-
if "Chrome/" in s and " Electron/" in s:
|
83
|
-
major_version = s.replace("Chrome/", "").split(".", 1)[0]
|
84
|
-
if major_version.isnumeric():
|
85
|
-
return major_version
|
86
|
-
|
87
|
-
return None
|
88
|
-
|
89
|
-
def get_local_chromedriver(
|
90
|
-
self, chromedriver_download_dir: Path
|
91
|
-
) -> tuple[Optional[Path], Optional[str]]:
|
92
|
-
local_chromedriver_version = None
|
93
|
-
if platform.system() == "Windows":
|
94
|
-
chromedriver_name = "chromedriver.exe"
|
95
|
-
else:
|
96
|
-
chromedriver_name = "chromedriver"
|
97
|
-
chromedriver_path = Path(chromedriver_download_dir, chromedriver_name).resolve()
|
98
|
-
if not chromedriver_path.is_file():
|
99
|
-
chromedriver_which = shutil.which("chromedriver")
|
100
|
-
if chromedriver_which:
|
101
|
-
chromedriver_path = Path(chromedriver_which)
|
102
|
-
|
103
|
-
if chromedriver_path:
|
104
|
-
status, output_str = RunBin.run_cmd(
|
105
|
-
cmd_list=[str(chromedriver_path), "-v"], silence=True
|
106
|
-
)
|
107
|
-
if status is False:
|
108
|
-
local_chromedriver_version = None
|
109
|
-
local_chromedriver_version = output_str.split(" ")[1].split(".", 1)[0]
|
110
|
-
else:
|
111
|
-
local_chromedriver_version = None
|
112
|
-
|
113
|
-
return chromedriver_path, local_chromedriver_version
|
114
|
-
|
115
|
-
def download_chromedriver(
|
116
|
-
self, major_version: str, chromedriver_download_dir: Path
|
117
|
-
) -> Optional[Path]:
|
118
|
-
if platform.system() == "Windows":
|
119
|
-
chromedriver_platform = "win32"
|
120
|
-
if "64" in platform.architecture()[0]:
|
121
|
-
chromedriver_platform_new = "win64"
|
122
|
-
else:
|
123
|
-
chromedriver_platform_new = "win32"
|
124
|
-
elif platform.system() == "Darwin":
|
125
|
-
if platform.processor().lower() == "arm64":
|
126
|
-
chromedriver_platform = "mac_arm64"
|
127
|
-
chromedriver_platform_new = "mac-arm64"
|
128
|
-
else:
|
129
|
-
chromedriver_platform = "mac64"
|
130
|
-
chromedriver_platform_new = "mac-x64"
|
131
|
-
else:
|
132
|
-
chromedriver_platform = "linux64"
|
133
|
-
chromedriver_platform_new = "linux64"
|
134
|
-
|
135
|
-
chromedriver_url = None
|
136
|
-
chromedriver_version_url = f"https://chromedriver.storage.googleapis.com/LATEST_RELEASE_{major_version}"
|
137
|
-
r = requests.get(chromedriver_version_url)
|
138
|
-
if r.ok:
|
139
|
-
new_chrome = False
|
140
|
-
chromedriver_version = r.text
|
141
|
-
chromedriver_url = f"https://chromedriver.storage.googleapis.com/{chromedriver_version}/chromedriver_{chromedriver_platform}.zip"
|
142
|
-
else:
|
143
|
-
new_chrome = True
|
144
|
-
r = requests.get(
|
145
|
-
"https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json"
|
146
|
-
)
|
147
|
-
versions_dict = json.loads(r.text)
|
148
|
-
chromedriver_list = (
|
149
|
-
versions_dict.get("milestones", {})
|
150
|
-
.get(major_version, {})
|
151
|
-
.get("downloads", {})
|
152
|
-
.get("chromedriver", {})
|
153
|
-
)
|
154
|
-
|
155
|
-
chromedriver_url = None
|
156
|
-
for i in chromedriver_list:
|
157
|
-
if i.get("platform") == chromedriver_platform_new:
|
158
|
-
chromedriver_url = i.get("url")
|
159
|
-
|
160
|
-
if not chromedriver_url:
|
161
|
-
return None
|
162
|
-
|
163
|
-
if platform.system() == "Windows":
|
164
|
-
chromedriver_name = "chromedriver.exe"
|
165
|
-
else:
|
166
|
-
chromedriver_name = "chromedriver"
|
167
|
-
|
168
|
-
if new_chrome:
|
169
|
-
chromedriver_zip_path = (
|
170
|
-
f"chromedriver-{chromedriver_platform_new}/{chromedriver_name}"
|
171
|
-
)
|
172
|
-
else:
|
173
|
-
chromedriver_zip_path = chromedriver_name
|
174
|
-
|
175
|
-
chromedriver_path = Path(chromedriver_download_dir, chromedriver_name).resolve()
|
176
|
-
|
177
|
-
with io.BytesIO() as f:
|
178
|
-
f.write(requests.get(chromedriver_url).content) # type: ignore
|
179
|
-
with zipfile.ZipFile(f, "r") as z, open(chromedriver_path, "wb+") as g:
|
180
|
-
g.write(z.read(chromedriver_zip_path))
|
181
|
-
|
182
|
-
if platform.system() != "Windows":
|
183
|
-
st = os.stat(chromedriver_path)
|
184
|
-
os.chmod(chromedriver_path, st.st_mode | stat.S_IEXEC)
|
185
|
-
|
186
|
-
return chromedriver_path
|
187
|
-
|
188
|
-
def killall_signal(self):
|
189
|
-
if platform.system() == "Windows":
|
190
|
-
os.system('taskkill /F /im "Signal.exe"')
|
191
|
-
os.system('taskkill /F /im "Signal Beta.exe"')
|
192
|
-
else:
|
193
|
-
RunBin.run_cmd(cmd_list=["killall", "signal-desktop"], silence=True)
|
194
|
-
RunBin.run_cmd(cmd_list=["killall", "signal-desktop-beta"], silence=True)
|
195
|
-
|
196
|
-
def launch_signal(
|
197
|
-
self, signal_bin_path: str, signal_user_data_dir: str, chromedriver_path: str
|
198
|
-
):
|
199
|
-
options = webdriver.ChromeOptions()
|
200
|
-
options.binary_location = signal_bin_path
|
201
|
-
options.add_argument(f"user-data-dir={signal_user_data_dir}") # type: ignore
|
202
|
-
options.add_argument("no-sandbox") # type: ignore
|
203
|
-
service = Service(executable_path=chromedriver_path)
|
204
|
-
|
205
|
-
self.driver = webdriver.Chrome(options=options, service=service)
|
206
|
-
|
207
|
-
def get_cred(self) -> tuple[Optional[str], Optional[str]]:
|
208
|
-
success = self.launch_signal_desktop()
|
209
|
-
|
210
|
-
if not success:
|
211
|
-
return None, None
|
212
|
-
|
213
|
-
# https://stackoverflow.com/a/73456344
|
214
|
-
uuid: Optional[str] = None
|
215
|
-
password: Optional[str] = None
|
216
|
-
try:
|
217
|
-
if self.signal_bin_version == "prod":
|
218
|
-
uuid = self.driver.execute_script( # type: ignore
|
219
|
-
"return window.reduxStore.getState().items.uuid_id"
|
220
|
-
)
|
221
|
-
password = self.driver.execute_script( # type: ignore
|
222
|
-
"return window.reduxStore.getState().items.password"
|
223
|
-
)
|
224
|
-
else:
|
225
|
-
uuid = self.driver.execute_script( # type: ignore
|
226
|
-
"return window.SignalDebug.getReduxState().items.uuid_id"
|
227
|
-
)
|
228
|
-
password = self.driver.execute_script( # type: ignore
|
229
|
-
"return window.SignalDebug.getReduxState().items.password"
|
230
|
-
)
|
231
|
-
except JavascriptException:
|
232
|
-
pass
|
233
|
-
|
234
|
-
assert isinstance(uuid, str)
|
235
|
-
assert isinstance(password, str)
|
236
|
-
return uuid, password
|
237
|
-
|
238
|
-
def close(self):
|
239
|
-
self.cb_msg("Closing Signal Desktop")
|
240
|
-
self.driver.quit()
|
241
|
-
|
242
|
-
def launch_signal_desktop(self) -> bool:
|
243
|
-
if platform.system() == "Windows":
|
244
|
-
signal_bin_path_prod = os.path.expandvars(
|
245
|
-
"%localappdata%/Programs/signal-desktop/Signal.exe"
|
246
|
-
)
|
247
|
-
signal_bin_path_beta = os.path.expandvars(
|
248
|
-
"%localappdata%/Programs/signal-desktop-beta/Signal Beta.exe"
|
249
|
-
)
|
250
|
-
signal_user_data_dir_prod = os.path.abspath(
|
251
|
-
os.path.expandvars("%appdata%/Signal")
|
252
|
-
)
|
253
|
-
signal_user_data_dir_beta = os.path.abspath(
|
254
|
-
os.path.expandvars("%appdata%/Signal Beta")
|
255
|
-
)
|
256
|
-
electron_bin_path_prod = signal_bin_path_prod
|
257
|
-
electron_bin_path_beta = signal_bin_path_beta
|
258
|
-
elif platform.system() == "Darwin":
|
259
|
-
signal_bin_path_prod = "/Applications/Signal.app/Contents/MacOS/Signal"
|
260
|
-
signal_bin_path_beta = (
|
261
|
-
"/Applications/Signal Beta.app/Contents/MacOS/Signal Beta"
|
262
|
-
)
|
263
|
-
signal_user_data_dir_prod = os.path.expanduser(
|
264
|
-
"~/Library/Application Support/Signal"
|
265
|
-
)
|
266
|
-
signal_user_data_dir_beta = os.path.expanduser(
|
267
|
-
"~/Library/Application Support/Signal Beta"
|
268
|
-
)
|
269
|
-
electron_bin_path_prod = "/Applications/Signal.app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
|
270
|
-
electron_bin_path_beta = "/Applications/Signal Beta.app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
|
271
|
-
else:
|
272
|
-
signal_bin_path_prod = "signal-desktop"
|
273
|
-
signal_bin_path_beta = "signal-desktop-beta"
|
274
|
-
signal_user_data_dir_prod = os.path.expanduser("~/.config/Signal")
|
275
|
-
signal_user_data_dir_beta = os.path.expanduser("~/.config/Signal Beta")
|
276
|
-
electron_bin_path_prod = signal_bin_path_prod
|
277
|
-
electron_bin_path_beta = signal_bin_path_beta
|
278
|
-
|
279
|
-
if self.signal_bin_version == "prod":
|
280
|
-
signal_bin_path = signal_bin_path_prod
|
281
|
-
signal_user_data_dir = signal_user_data_dir_prod
|
282
|
-
electron_bin_path = electron_bin_path_prod
|
283
|
-
signal_download_url = "https://signal.org/en/download/"
|
284
|
-
else:
|
285
|
-
signal_bin_path = signal_bin_path_beta
|
286
|
-
signal_user_data_dir = signal_user_data_dir_beta
|
287
|
-
electron_bin_path = electron_bin_path_beta
|
288
|
-
signal_download_url = (
|
289
|
-
"https://support.signal.org/hc/en-us/articles/360007318471-Signal-Beta"
|
290
|
-
)
|
291
|
-
|
292
|
-
if not (Path(signal_bin_path).is_file() or shutil.which(signal_bin_path)):
|
293
|
-
success = self.download_signal_desktop(signal_download_url, signal_bin_path)
|
294
|
-
|
295
|
-
if not success:
|
296
|
-
return False
|
297
|
-
|
298
|
-
electron_bin_path = (
|
299
|
-
shutil.which(electron_bin_path)
|
300
|
-
if not Path(electron_bin_path).is_file()
|
301
|
-
else electron_bin_path
|
302
|
-
)
|
303
|
-
if not electron_bin_path:
|
304
|
-
self.cb_msg("Cannot find Electron Framework inside Signal installation")
|
305
|
-
return False
|
306
|
-
|
307
|
-
signal_bin_path = (
|
308
|
-
signal_bin_path
|
309
|
-
if not shutil.which(signal_bin_path)
|
310
|
-
else shutil.which(signal_bin_path)
|
311
|
-
)
|
312
|
-
if not signal_bin_path:
|
313
|
-
self.cb_msg("Cannot find Signal installation")
|
314
|
-
return False
|
315
|
-
|
316
|
-
major_version = self.get_signal_chromedriver_version(electron_bin_path)
|
317
|
-
if major_version:
|
318
|
-
self.cb_msg(f"Signal Desktop is using chrome version {major_version}")
|
319
|
-
else:
|
320
|
-
self.cb_msg("Unable to determine Signal Desktop chrome version")
|
321
|
-
return False
|
322
|
-
|
323
|
-
chromedriver_path, local_chromedriver_version = self.get_local_chromedriver(
|
324
|
-
chromedriver_download_dir=self.chromedriver_download_dir
|
325
|
-
)
|
326
|
-
if chromedriver_path and local_chromedriver_version == major_version:
|
327
|
-
self.cb_msg(
|
328
|
-
f"Found chromedriver version {local_chromedriver_version}, skip downloading"
|
329
|
-
)
|
330
|
-
else:
|
331
|
-
chromedriver_path = self.download_chromedriver(
|
332
|
-
major_version, chromedriver_download_dir=self.chromedriver_download_dir
|
333
|
-
)
|
334
|
-
if not chromedriver_path:
|
335
|
-
self.cb_msg("Unable to download suitable chromedriver")
|
336
|
-
return False
|
337
|
-
|
338
|
-
self.cb_msg("Killing all Signal Desktop processes")
|
339
|
-
self.killall_signal()
|
340
|
-
|
341
|
-
self.cb_msg("Starting Signal Desktop with Selenium")
|
342
|
-
self.launch_signal(
|
343
|
-
signal_bin_path, signal_user_data_dir, str(chromedriver_path)
|
344
|
-
)
|
345
|
-
|
346
|
-
return True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_base.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_kakao.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_line.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_signal.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/downloaders/download_telegram.py
RENAMED
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/gui_components/gui_utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/NotoColorEmoji.ttf
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/resources/compression.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_base.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_signal.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/upload_telegram.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/uploaders/xcode_imessage.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/auth/get_kakao_auth.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/auth/get_line_auth.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/cache_store.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/json_manager.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/metadata_handler.py
RENAMED
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/files/sanitize_filename.py
RENAMED
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/codec_info.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/decrypt_kakao.py
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert/utils/media/format_verify.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/dependency_links.txt
RENAMED
File without changes
|
{sticker-convert-2.6.3 → sticker-convert-2.7.0}/src/sticker_convert.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|