sticker-convert 2.11.2__tar.gz → 2.11.4__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.11.2/src/sticker_convert.egg-info → sticker_convert-2.11.4}/PKG-INFO +2 -2
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/requirements.txt +1 -1
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/converter.py +9 -5
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_signal.py +12 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui.py +9 -6
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/job.py +6 -1
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_signal.py +62 -36
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/version.py +1 -1
- {sticker_convert-2.11.2 → sticker_convert-2.11.4/src/sticker_convert.egg-info}/PKG-INFO +2 -2
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/requires.txt +1 -1
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/LICENSE +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/MANIFEST.in +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/README.md +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/pyproject.toml +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/setup.cfg +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/__main__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/cli.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/definitions.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_base.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_discord.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_kakao.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_line.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_telegram.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_viber.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/gui_utils.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/discord_get_auth_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/gui_components/windows/viber_get_auth_window.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/job_option.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/appicon.icns +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/appicon.ico +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/appicon.png +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/compression.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/emoji.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/help.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/input.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/memdump_linux.sh +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/memdump_windows.ps1 +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/output.json +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/__init__.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_base.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_viber.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_discord_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_kakao_desktop_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_viber_auth.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/telegram_api.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/telethon_setup.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/callback.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/chrome_remotedebug.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/emoji.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/cache_store.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/json_manager.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/run_bin.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/codec_info.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/format_verify.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/process.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/url_detect.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/entry_points.txt +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/top_level.txt +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/tests/test_compression.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/tests/test_download.py +0 -0
- {sticker_convert-2.11.2 → sticker_convert-2.11.4}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.11.
|
3
|
+
Version: 2.11.4
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -379,7 +379,7 @@ Requires-Dist: numpy>=1.22.4
|
|
379
379
|
Requires-Dist: Pillow~=11.1.0
|
380
380
|
Requires-Dist: pyoxipng~=9.0.0
|
381
381
|
Requires-Dist: python-telegram-bot~=21.10
|
382
|
-
Requires-Dist: psutil~=
|
382
|
+
Requires-Dist: psutil~=7.0.0
|
383
383
|
Requires-Dist: PyMemoryEditor~=1.5.22
|
384
384
|
Requires-Dist: requests~=2.32.3
|
385
385
|
Requires-Dist: rlottie_python~=1.3.6
|
@@ -284,10 +284,14 @@ class StickerConvert:
|
|
284
284
|
return self.compress_fail()
|
285
285
|
|
286
286
|
def check_if_compatible(self) -> Optional[bytes]:
|
287
|
+
f_fmt = self.opt_comp.get_format()
|
287
288
|
if (
|
288
|
-
|
289
|
+
# Issue #260: Some webp file not accepted by Whatsapp
|
290
|
+
".webp" not in f_fmt[0]
|
291
|
+
and ".webp" not in f_fmt[1]
|
292
|
+
and FormatVerify.check_format(
|
289
293
|
self.in_f,
|
290
|
-
fmt=
|
294
|
+
fmt=f_fmt,
|
291
295
|
file_info=self.codec_info_orig,
|
292
296
|
)
|
293
297
|
and FormatVerify.check_file_res(
|
@@ -577,9 +581,9 @@ class StickerConvert:
|
|
577
581
|
colors = colors[colors[:, 3] != 0]
|
578
582
|
if colors.shape[0] != 0:
|
579
583
|
alphas = colors[:, 3] / 255
|
580
|
-
r_mean = np.mean(colors[:, 0] * alphas)
|
581
|
-
g_mean = np.mean(colors[:, 1] * alphas)
|
582
|
-
b_mean = np.mean(colors[:, 2] * alphas)
|
584
|
+
r_mean = cast(float, np.mean(colors[:, 0] * alphas))
|
585
|
+
g_mean = cast(float, np.mean(colors[:, 1] * alphas))
|
586
|
+
b_mean = cast(float, np.mean(colors[:, 2] * alphas))
|
583
587
|
mean_total += (r_mean + g_mean + b_mean) / 3
|
584
588
|
|
585
589
|
if mean_total / len(self.frames_raw) < 128:
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_signal.py
RENAMED
@@ -58,6 +58,18 @@ class DownloadSignal(DownloadBase):
|
|
58
58
|
|
59
59
|
self.cb.put("update_bar")
|
60
60
|
|
61
|
+
if pack.cover is not None and pack.cover.image_data is not None:
|
62
|
+
cover_path = Path(self.out_dir, "cover")
|
63
|
+
with open(cover_path, "wb") as f:
|
64
|
+
f.write(pack.cover.image_data)
|
65
|
+
|
66
|
+
cover_codec = CodecInfo.get_file_codec(cover_path)
|
67
|
+
if cover_codec == "":
|
68
|
+
cover_codec = "png"
|
69
|
+
cover_path_new = Path(self.out_dir, f"cover.{cover_codec}")
|
70
|
+
cover_path.rename(cover_path_new)
|
71
|
+
self.cb.put(f"Downloaded cover.{cover_codec}")
|
72
|
+
|
61
73
|
MetadataHandler.set_metadata(
|
62
74
|
self.out_dir, title=pack.title, author=pack.author, emoji_dict=emoji_dict
|
63
75
|
)
|
@@ -634,7 +634,7 @@ class GUI(Window):
|
|
634
634
|
initialvalue: Optional[str] = None,
|
635
635
|
cli_show_initialvalue: bool = True,
|
636
636
|
parent: Optional[object] = None,
|
637
|
-
) ->
|
637
|
+
) -> str:
|
638
638
|
self.action = partial(
|
639
639
|
Querybox.get_string, # type: ignore
|
640
640
|
question,
|
@@ -646,7 +646,12 @@ class GUI(Window):
|
|
646
646
|
self.response_event.wait()
|
647
647
|
self.response_event.clear()
|
648
648
|
|
649
|
-
|
649
|
+
if self.response is None:
|
650
|
+
return ""
|
651
|
+
elif isinstance(self.response, str):
|
652
|
+
return self.response
|
653
|
+
else:
|
654
|
+
raise RuntimeError(f"Invalid response in cb_ask_str: {self.response}")
|
650
655
|
|
651
656
|
def cb_ask_bool(
|
652
657
|
self, question: str, parent: Union[Window, Toplevel, None] = None
|
@@ -701,9 +706,9 @@ class GUI(Window):
|
|
701
706
|
set_progress_mode, steps, update_bar, *args, **kwargs
|
702
707
|
)
|
703
708
|
|
704
|
-
def highlight_fields(self)
|
709
|
+
def highlight_fields(self):
|
705
710
|
if not self.init_done:
|
706
|
-
return
|
711
|
+
return
|
707
712
|
|
708
713
|
input_option = self.get_input_name()
|
709
714
|
input_option_display = self.get_input_display_name()
|
@@ -853,5 +858,3 @@ class GUI(Window):
|
|
853
858
|
else:
|
854
859
|
self.comp_frame.comp_preset_opt.config(bootstyle="secondary") # type: ignore
|
855
860
|
self.output_frame.output_option_opt.config(bootstyle="secondary") # type: ignore
|
856
|
-
|
857
|
-
return True
|
@@ -642,7 +642,12 @@ class Job:
|
|
642
642
|
|
643
643
|
if not in_f.is_file():
|
644
644
|
continue
|
645
|
-
if
|
645
|
+
if (
|
646
|
+
CodecInfo.get_file_ext(i) in (".txt", ".m4a")
|
647
|
+
or (
|
648
|
+
self.opt_comp.preset != "signal" and Path(i).stem == "cover"
|
649
|
+
) # Signal cover has same spec as normal sticker
|
650
|
+
):
|
646
651
|
shutil.copy(in_f, output_dir / i.name)
|
647
652
|
else:
|
648
653
|
in_fs.append(i)
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_signal.py
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
import copy
|
3
3
|
from pathlib import Path
|
4
|
-
from typing import Any, Dict, List, Tuple
|
4
|
+
from typing import Any, Dict, List, Optional, Tuple
|
5
5
|
|
6
6
|
import anyio
|
7
7
|
from signalstickers_client.errors import SignalException
|
@@ -46,51 +46,77 @@ class UploadSignal(UploadBase):
|
|
46
46
|
)
|
47
47
|
return result
|
48
48
|
|
49
|
-
def
|
50
|
-
self,
|
51
|
-
) ->
|
52
|
-
|
53
|
-
self.cb.put(f"Verifying {src} for uploading to signal")
|
49
|
+
def create_sticker(
|
50
|
+
self, src: Path, emoji_dict: Dict[str, str]
|
51
|
+
) -> Optional[Sticker]:
|
52
|
+
self.cb.put(f"Verifying {src} for uploading to signal")
|
54
53
|
|
55
|
-
|
56
|
-
sticker.id = pack.nb_stickers
|
54
|
+
sticker = Sticker()
|
57
55
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
emoji = extract_emojis(emoji_dict.get(Path(src).stem, ""))
|
57
|
+
if emoji == "":
|
58
|
+
self.cb.put(
|
59
|
+
f"Warning: Cannot find emoji for file {Path(src).name}, using default emoji..."
|
60
|
+
)
|
61
|
+
emoji = self.opt_comp.default_emoji
|
62
|
+
sticker.emoji = emoji
|
65
63
|
|
66
|
-
|
67
|
-
|
64
|
+
if Path(src).suffix == ".webp":
|
65
|
+
spec_choice = self.webp_spec
|
66
|
+
else:
|
67
|
+
spec_choice = self.png_spec
|
68
|
+
|
69
|
+
if not FormatVerify.check_file(src, spec=spec_choice):
|
70
|
+
if self.opt_comp.fake_vid or CodecInfo.is_anim(src):
|
71
|
+
dst = "bytes.apng"
|
68
72
|
else:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
success, _, image_data, _ = StickerConvert.convert(
|
77
|
-
Path(src), Path(dst), self.opt_comp_merged, self.cb, self.cb_return
|
73
|
+
dst = "bytes.png"
|
74
|
+
success, _, image_data, _ = StickerConvert.convert(
|
75
|
+
Path(src), Path(dst), self.opt_comp_merged, self.cb, self.cb_return
|
76
|
+
)
|
77
|
+
if not success:
|
78
|
+
self.cb.put(
|
79
|
+
f"Warning: Cannot compress file {Path(src).name}, skip uploading this file..."
|
78
80
|
)
|
79
|
-
|
80
|
-
self.cb.put(
|
81
|
-
f"Warning: Cannot compress file {Path(src).name}, skip uploading this file..."
|
82
|
-
)
|
83
|
-
continue
|
81
|
+
return None
|
84
82
|
|
85
|
-
|
83
|
+
assert isinstance(image_data, bytes)
|
86
84
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
85
|
+
sticker.image_data = image_data
|
86
|
+
else:
|
87
|
+
with open(src, "rb") as f:
|
88
|
+
sticker.image_data = f.read()
|
89
|
+
|
90
|
+
return sticker
|
91
91
|
|
92
|
+
def add_stickers_to_pack(
|
93
|
+
self, pack: LocalStickerPack, stickers: List[Path], emoji_dict: Dict[str, str]
|
94
|
+
) -> None:
|
95
|
+
cover_file = MetadataHandler.get_cover(self.opt_output.dir)
|
96
|
+
cover_file_bytes = None
|
97
|
+
if cover_file:
|
98
|
+
with open(cover_file, "rb") as f:
|
99
|
+
cover_file_bytes = f.read()
|
100
|
+
for src in stickers:
|
101
|
+
sticker = self.create_sticker(src, emoji_dict)
|
102
|
+
if sticker is None:
|
103
|
+
continue
|
104
|
+
sticker.id = pack.nb_stickers
|
92
105
|
pack._addsticker(sticker) # type: ignore
|
93
106
|
|
107
|
+
if (
|
108
|
+
cover_file
|
109
|
+
and pack.cover is None
|
110
|
+
and sticker.image_data == cover_file_bytes
|
111
|
+
):
|
112
|
+
pack.cover = sticker
|
113
|
+
|
114
|
+
if cover_file and pack.cover is None:
|
115
|
+
sticker = self.create_sticker(cover_file, emoji_dict)
|
116
|
+
if sticker is not None:
|
117
|
+
sticker.id = pack.nb_stickers
|
118
|
+
pack.cover = sticker
|
119
|
+
|
94
120
|
def upload_stickers_signal(self) -> Tuple[int, int, List[str]]:
|
95
121
|
urls: List[str] = []
|
96
122
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.11.
|
3
|
+
Version: 2.11.4
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -379,7 +379,7 @@ Requires-Dist: numpy>=1.22.4
|
|
379
379
|
Requires-Dist: Pillow~=11.1.0
|
380
380
|
Requires-Dist: pyoxipng~=9.0.0
|
381
381
|
Requires-Dist: python-telegram-bot~=21.10
|
382
|
-
Requires-Dist: psutil~=
|
382
|
+
Requires-Dist: psutil~=7.0.0
|
383
383
|
Requires-Dist: PyMemoryEditor~=1.5.22
|
384
384
|
Requires-Dist: requests~=2.32.3
|
385
385
|
Requires-Dist: rlottie_python~=1.3.6
|
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.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/__init__.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_base.py
RENAMED
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_kakao.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_line.py
RENAMED
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/downloaders/download_viber.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/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.11.2 → sticker_convert-2.11.4}/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
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/NotoColorEmoji.ttf
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/appicon.icns
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/compression.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/memdump_linux.sh
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/resources/memdump_windows.ps1
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_base.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_telegram.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/upload_viber.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/uploaders/xcode_imessage.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_discord_auth.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_kakao_auth.py
RENAMED
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_line_auth.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_signal_auth.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/get_viber_auth.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/telegram_api.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/auth/telethon_setup.py
RENAMED
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/chrome_remotedebug.py
RENAMED
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/cache_store.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/json_manager.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/files/run_bin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/codec_info.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/decrypt_kakao.py
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert/utils/media/format_verify.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/dependency_links.txt
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/entry_points.txt
RENAMED
File without changes
|
{sticker_convert-2.11.2 → sticker_convert-2.11.4}/src/sticker_convert.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|