sticker-convert 2.1.9__py3-none-any.whl → 2.1.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sticker_convert/__init__.py +1 -1
- sticker_convert/utils/auth/get_signal_auth.py +3 -13
- sticker_convert/utils/media/codec_info.py +13 -10
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/METADATA +1 -1
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/RECORD +9 -9
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/LICENSE +0 -0
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/WHEEL +0 -0
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.1.9.dist-info → sticker_convert-2.1.11.dist-info}/top_level.txt +0 -0
sticker_convert/__init__.py
CHANGED
@@ -16,6 +16,7 @@ from selenium.webdriver.chrome.service import Service
|
|
16
16
|
from selenium.common.exceptions import JavascriptException
|
17
17
|
|
18
18
|
from ..files.run_bin import RunBin # type: ignore
|
19
|
+
from ..files.dir_utils import DirUtils # type: ignore
|
19
20
|
|
20
21
|
# https://stackoverflow.com/a/17197027
|
21
22
|
def strings(filename: str, min: int = 4) -> Generator[str, None, None]:
|
@@ -32,20 +33,9 @@ def strings(filename: str, min: int = 4) -> Generator[str, None, None]:
|
|
32
33
|
yield result
|
33
34
|
|
34
35
|
class GetSignalAuth:
|
35
|
-
def __init__(self, signal_bin_version: str = 'beta',
|
36
|
-
|
37
|
-
fallback_dir = os.path.expandvars('%APPDATA%\\sticker-convert')
|
38
|
-
else:
|
39
|
-
fallback_dir = os.path.expanduser('~/.config/sticker-convert')
|
40
|
-
|
41
|
-
appimage_path = os.getenv('APPIMAGE')
|
42
|
-
if appimage_path:
|
43
|
-
chromedriver_download_dir = os.path.join(os.path.split(appimage_path)[0], 'bin')
|
44
|
-
|
36
|
+
def __init__(self, signal_bin_version: str = 'beta', cb_msg=print, cb_ask_str=input):
|
37
|
+
chromedriver_download_dir = os.path.join(DirUtils.get_config_dir(), 'bin')
|
45
38
|
os.makedirs(chromedriver_download_dir, exist_ok=True)
|
46
|
-
if not os.access(chromedriver_download_dir, os.W_OK):
|
47
|
-
os.makedirs(fallback_dir, exist_ok=True)
|
48
|
-
chromedriver_download_dir = fallback_dir
|
49
39
|
|
50
40
|
self.signal_bin_version = signal_bin_version
|
51
41
|
self.chromedriver_download_dir = chromedriver_download_dir
|
@@ -6,7 +6,7 @@ from typing import Optional
|
|
6
6
|
|
7
7
|
import imageio.v3 as iio
|
8
8
|
from rlottie_python import LottieAnimation # type: ignore
|
9
|
-
from PIL import Image
|
9
|
+
from PIL import Image, UnidentifiedImageError
|
10
10
|
import mmap
|
11
11
|
|
12
12
|
|
@@ -69,16 +69,19 @@ class CodecInfo:
|
|
69
69
|
|
70
70
|
@staticmethod
|
71
71
|
def get_file_codec(file: str) -> Optional[str]:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
codec = None
|
73
|
+
try:
|
74
|
+
codec = Image.open(file).format
|
75
|
+
except UnidentifiedImageError:
|
76
|
+
pass
|
77
|
+
|
78
|
+
# Unable to distinguish apng and png
|
79
|
+
if codec not in (None, 'PNG'):
|
80
|
+
return codec.lower()
|
76
81
|
else:
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
return codec
|
82
|
+
metadata = iio.immeta(file, plugin="pyav", exclude_applied=False)
|
83
|
+
codec = metadata.get("codec", None)
|
84
|
+
return codec
|
82
85
|
|
83
86
|
@staticmethod
|
84
87
|
def get_file_res(file: str) -> tuple[int, int]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.11
|
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>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
sticker_convert/__init__.py,sha256=
|
1
|
+
sticker_convert/__init__.py,sha256=jfcI-Nq9bhNcUPfJL46bHZg9Jg_mwzMqiiiJ-hgtz_4,67
|
2
2
|
sticker_convert/__main__.py,sha256=W3n9SprqoDQxaWDAqLVA7DiavMdbPLVdtbASTKSpZS0,546
|
3
3
|
sticker_convert/cli.py,sha256=21D5lAghcB3f5V7vk_qS6Di-NtGlH1ilAqDCPpzVUak,16534
|
4
4
|
sticker_convert/converter.py,sha256=k4wy8nYtUFaEFxQ6QRPWPUyAorGgRIWQ0WLElsnKTXw,16780
|
@@ -74,19 +74,19 @@ sticker_convert/utils/fake_cb_msg.py,sha256=LYHWKqjL4GdNG2HUCbvVNsRjQOErJBXsJS-k
|
|
74
74
|
sticker_convert/utils/url_detect.py,sha256=x163bVIH4rEimozvFHMC-XBmxyecf3qpBjJIBt8WPeE,793
|
75
75
|
sticker_convert/utils/auth/get_kakao_auth.py,sha256=Q3CxzDqzoo9vf_bsbmpKZXeQODEXQ5leijKjjMt2Gv8,9306
|
76
76
|
sticker_convert/utils/auth/get_line_auth.py,sha256=pKe2N3QLTyB0wWBpkD9rlDBqHK7LZ5hnAmfPH7XVmFI,1211
|
77
|
-
sticker_convert/utils/auth/get_signal_auth.py,sha256=
|
77
|
+
sticker_convert/utils/auth/get_signal_auth.py,sha256=NHGOZEiKkGaJmj58BmR8ynmUsAn_IRzE4jpEHXKUhVM,11874
|
78
78
|
sticker_convert/utils/files/cache_store.py,sha256=lNS6ItZ3lwNa7NipkDo7n0wIoAf728dcRV0r0ohmM3s,730
|
79
79
|
sticker_convert/utils/files/dir_utils.py,sha256=_jDyyPTVQXiVr4dJhPFaXqaKvch_MWLngwH7eZfezv4,1861
|
80
80
|
sticker_convert/utils/files/json_manager.py,sha256=BBndjSY5kvjxurOpnDI2DRsKoLrNBTf5HoGfUqlf-4Y,503
|
81
81
|
sticker_convert/utils/files/metadata_handler.py,sha256=KIy8j89DMBW7-gpL9jqhzz96GgBvPHsRYegHXemk_mY,8346
|
82
82
|
sticker_convert/utils/files/run_bin.py,sha256=4c8y5c_2wUfm0hbJSOGFcezpW5BVqM5_e9aliPbxvwo,1632
|
83
83
|
sticker_convert/utils/media/apple_png_normalize.py,sha256=YGrZ8pZvgfhw8dW-0gf7XcXk_R82lJTX-oTo6SsB7uY,3719
|
84
|
-
sticker_convert/utils/media/codec_info.py,sha256=
|
84
|
+
sticker_convert/utils/media/codec_info.py,sha256=zX9zXUy0qxxxvJIJMF7KBUm4seOeJN-ZFcJE2yqsuOs,4421
|
85
85
|
sticker_convert/utils/media/decrypt_kakao.py,sha256=gMz64vIGEIPAl4FFWuUbPMHE7vExr46ZFpzMoukvwws,1918
|
86
86
|
sticker_convert/utils/media/format_verify.py,sha256=7WvvDSFDkyG1WlkXKqVbmPjKiyEedtqivZcCqSNziD8,6179
|
87
|
-
sticker_convert-2.1.
|
88
|
-
sticker_convert-2.1.
|
89
|
-
sticker_convert-2.1.
|
90
|
-
sticker_convert-2.1.
|
91
|
-
sticker_convert-2.1.
|
92
|
-
sticker_convert-2.1.
|
87
|
+
sticker_convert-2.1.11.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
88
|
+
sticker_convert-2.1.11.dist-info/METADATA,sha256=NSKhAwvKvr9esES64SYlWCtb7nPeh3IJ96sf2udkcjk,44697
|
89
|
+
sticker_convert-2.1.11.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
90
|
+
sticker_convert-2.1.11.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
91
|
+
sticker_convert-2.1.11.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
92
|
+
sticker_convert-2.1.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|