sticker-convert 2.10.2__py3-none-any.whl → 2.10.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sticker_convert/__main__.py +3 -0
 - sticker_convert/converter.py +3 -2
 - sticker_convert/gui.py +36 -8
 - sticker_convert/version.py +1 -1
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/METADATA +9 -10
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/RECORD +10 -10
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/WHEEL +1 -1
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/LICENSE +0 -0
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/entry_points.txt +0 -0
 - {sticker_convert-2.10.2.dist-info → sticker_convert-2.10.4.dist-info}/top_level.txt +0 -0
 
    
        sticker_convert/__main__.py
    CHANGED
    
    | 
         @@ -9,6 +9,9 @@ def main() -> None: 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                multiprocessing.freeze_support()
         
     | 
| 
       11 
11 
     | 
    
         
             
                print(f"sticker-convert {__version__}")
         
     | 
| 
      
 12 
     | 
    
         
            +
                print("Free and Opensource software by laggykiller")
         
     | 
| 
      
 13 
     | 
    
         
            +
                print("https://github.com/laggykiller/sticker-convert")
         
     | 
| 
      
 14 
     | 
    
         
            +
                print()
         
     | 
| 
       12 
15 
     | 
    
         
             
                if len(sys.argv) == 1:
         
     | 
| 
       13 
16 
     | 
    
         
             
                    print("Launching GUI...")
         
     | 
| 
       14 
17 
     | 
    
         
             
                    from sticker_convert.gui import GUI
         
     | 
    
        sticker_convert/converter.py
    CHANGED
    
    | 
         @@ -324,6 +324,7 @@ class StickerConvert: 
     | 
|
| 
       324 
324 
     | 
    
         | 
| 
       325 
325 
     | 
    
         
             
                def generate_steps_list(self) -> List[Tuple[Optional[int], ...]]:
         
     | 
| 
       326 
326 
     | 
    
         
             
                    steps_list: List[Tuple[Optional[int], ...]] = []
         
     | 
| 
      
 327 
     | 
    
         
            +
                    need_even = self.out_f.suffix in (".webm", ".mp4", ".mkv", ".webp")
         
     | 
| 
       327 
328 
     | 
    
         
             
                    for step in range(self.opt_comp.steps, -1, -1):
         
     | 
| 
       328 
329 
     | 
    
         
             
                        steps_list.append(
         
     | 
| 
       329 
330 
     | 
    
         
             
                            (
         
     | 
| 
         @@ -333,7 +334,7 @@ class StickerConvert: 
     | 
|
| 
       333 
334 
     | 
    
         
             
                                    step,
         
     | 
| 
       334 
335 
     | 
    
         
             
                                    self.opt_comp.steps,
         
     | 
| 
       335 
336 
     | 
    
         
             
                                    self.opt_comp.res_power,
         
     | 
| 
       336 
     | 
    
         
            -
                                     
     | 
| 
      
 337 
     | 
    
         
            +
                                    need_even,
         
     | 
| 
       337 
338 
     | 
    
         
             
                                ),
         
     | 
| 
       338 
339 
     | 
    
         
             
                                get_step_value(
         
     | 
| 
       339 
340 
     | 
    
         
             
                                    self.opt_comp.res_h_max,
         
     | 
| 
         @@ -341,7 +342,7 @@ class StickerConvert: 
     | 
|
| 
       341 
342 
     | 
    
         
             
                                    step,
         
     | 
| 
       342 
343 
     | 
    
         
             
                                    self.opt_comp.steps,
         
     | 
| 
       343 
344 
     | 
    
         
             
                                    self.opt_comp.res_power,
         
     | 
| 
       344 
     | 
    
         
            -
                                     
     | 
| 
      
 345 
     | 
    
         
            +
                                    need_even,
         
     | 
| 
       345 
346 
     | 
    
         
             
                                ),
         
     | 
| 
       346 
347 
     | 
    
         
             
                                get_step_value(
         
     | 
| 
       347 
348 
     | 
    
         
             
                                    self.opt_comp.quality_max,
         
     | 
    
        sticker_convert/gui.py
    CHANGED
    
    | 
         @@ -1,4 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            #!/usr/bin/env python3
         
     | 
| 
      
 2 
     | 
    
         
            +
            import locale
         
     | 
| 
       2 
3 
     | 
    
         
             
            import os
         
     | 
| 
       3 
4 
     | 
    
         
             
            import platform
         
     | 
| 
       4 
5 
     | 
    
         
             
            import signal
         
     | 
| 
         @@ -9,7 +10,7 @@ from math import ceil 
     | 
|
| 
       9 
10 
     | 
    
         
             
            from multiprocessing import Event, cpu_count
         
     | 
| 
       10 
11 
     | 
    
         
             
            from pathlib import Path
         
     | 
| 
       11 
12 
     | 
    
         
             
            from threading import Thread
         
     | 
| 
       12 
     | 
    
         
            -
            from typing import Any, Callable, Dict, Optional, Union
         
     | 
| 
      
 13 
     | 
    
         
            +
            from typing import Any, Callable, Dict, Optional, Union, cast
         
     | 
| 
       13 
14 
     | 
    
         
             
            from urllib.parse import urlparse
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
            from mergedeep import merge  # type: ignore
         
     | 
| 
         @@ -62,6 +63,7 @@ class GUI(Window): 
     | 
|
| 
       62 
63 
     | 
    
         
             
                    self.apply_creds()
         
     | 
| 
       63 
64 
     | 
    
         
             
                    self.init_frames()
         
     | 
| 
       64 
65 
     | 
    
         
             
                    self.pack_frames()
         
     | 
| 
      
 66 
     | 
    
         
            +
                    self.author_info()
         
     | 
| 
       65 
67 
     | 
    
         
             
                    self.warn_tkinter_bug()
         
     | 
| 
       66 
68 
     | 
    
         
             
                    GUIUtils.finalize_window(self)
         
     | 
| 
       67 
69 
     | 
    
         | 
| 
         @@ -206,6 +208,36 @@ class GUI(Window): 
     | 
|
| 
       206 
208 
     | 
    
         
             
                        column=0, row=4, columnspan=2, sticky="news", padx=5, pady=5
         
     | 
| 
       207 
209 
     | 
    
         
             
                    )
         
     | 
| 
       208 
210 
     | 
    
         | 
| 
      
 211 
     | 
    
         
            +
                def is_cn(self) -> bool:
         
     | 
| 
      
 212 
     | 
    
         
            +
                    cn_locs = ("zh_chs", "zh_cn", "chinese")
         
     | 
| 
      
 213 
     | 
    
         
            +
                    loc = locale.getlocale()[0]
         
     | 
| 
      
 214 
     | 
    
         
            +
                    winloc = ""
         
     | 
| 
      
 215 
     | 
    
         
            +
                    if platform.system() == "Windows":
         
     | 
| 
      
 216 
     | 
    
         
            +
                        import ctypes
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
                        windll = ctypes.windll.kernel32  # type: ignore
         
     | 
| 
      
 219 
     | 
    
         
            +
                        winloc_id = cast(int, windll.GetUserDefaultUILanguage())  # type: ignore
         
     | 
| 
      
 220 
     | 
    
         
            +
                        winloc = cast(str, locale.windows_locale[winloc_id])  # type: ignore
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
                    if loc is not None and (
         
     | 
| 
      
 223 
     | 
    
         
            +
                        loc.lower().startswith(cn_locs) or winloc.lower().startswith(cn_locs)
         
     | 
| 
      
 224 
     | 
    
         
            +
                    ):
         
     | 
| 
      
 225 
     | 
    
         
            +
                        return True
         
     | 
| 
      
 226 
     | 
    
         
            +
                    return False
         
     | 
| 
      
 227 
     | 
    
         
            +
             
     | 
| 
      
 228 
     | 
    
         
            +
                def author_info(self) -> None:
         
     | 
| 
      
 229 
     | 
    
         
            +
                    if self.is_cn():
         
     | 
| 
      
 230 
     | 
    
         
            +
                        msg = "sticker-convert是laggykiller创作的免费开源项目,严禁翻售\n"
         
     | 
| 
      
 231 
     | 
    
         
            +
                        msg += "https://github.com/laggykiller/sticker-convert\n"
         
     | 
| 
      
 232 
     | 
    
         
            +
                        msg += "尊重知识产权,做个文明人,请不要转售贴图!\n"
         
     | 
| 
      
 233 
     | 
    
         
            +
                    else:
         
     | 
| 
      
 234 
     | 
    
         
            +
                        msg = "sticker-convert is Free and Opensource software by laggykiller\n"
         
     | 
| 
      
 235 
     | 
    
         
            +
                        msg += "https://github.com/laggykiller/sticker-convert\n"
         
     | 
| 
      
 236 
     | 
    
         
            +
                        msg += "Please use the stickers with your friends only.\n"
         
     | 
| 
      
 237 
     | 
    
         
            +
                        msg += "It is illegal and immoral to sell stickers downloaded from this program.\n"
         
     | 
| 
      
 238 
     | 
    
         
            +
             
     | 
| 
      
 239 
     | 
    
         
            +
                    self.cb_msg(msg)
         
     | 
| 
      
 240 
     | 
    
         
            +
             
     | 
| 
       209 
241 
     | 
    
         
             
                def warn_tkinter_bug(self) -> None:
         
     | 
| 
       210 
242 
     | 
    
         
             
                    if (
         
     | 
| 
       211 
243 
     | 
    
         
             
                        platform.system() == "Darwin"
         
     | 
| 
         @@ -215,13 +247,9 @@ class GUI(Window): 
     | 
|
| 
       215 
247 
     | 
    
         
             
                        and sys.version_info[2] <= 6
         
     | 
| 
       216 
248 
     | 
    
         
             
                    ):
         
     | 
| 
       217 
249 
     | 
    
         
             
                        msg = "NOTICE: If buttons are not responsive, try to press "
         
     | 
| 
       218 
     | 
    
         
            -
                        msg += "on title bar or move mouse cursor away from window for a while 
     | 
| 
       219 
     | 
    
         
            -
                         
     | 
| 
       220 
     | 
    
         
            -
                        msg  
     | 
| 
       221 
     | 
    
         
            -
                            "(This is due to a bug in tkinter specific to macOS 14 python <=3.11.6)"
         
     | 
| 
       222 
     | 
    
         
            -
                        )
         
     | 
| 
       223 
     | 
    
         
            -
                        self.cb_msg(msg)
         
     | 
| 
       224 
     | 
    
         
            -
                        msg = "(https://github.com/python/cpython/issues/110218)"
         
     | 
| 
      
 250 
     | 
    
         
            +
                        msg += "on title bar or move mouse cursor away from window for a while.\n"
         
     | 
| 
      
 251 
     | 
    
         
            +
                        msg += "(This is a bug in tkinter specific to macOS 14 python <=3.11.6)\n"
         
     | 
| 
      
 252 
     | 
    
         
            +
                        msg += "(https://github.com/python/cpython/issues/110218)\n"
         
     | 
| 
       225 
253 
     | 
    
         
             
                        self.cb_msg(msg)
         
     | 
| 
       226 
254 
     | 
    
         | 
| 
       227 
255 
     | 
    
         
             
                def load_jsons(self) -> None:
         
     | 
    
        sticker_convert/version.py
    CHANGED
    
    
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.1
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: sticker-convert
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 2.10. 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 2.10.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>
         
     | 
| 
         @@ -355,31 +355,30 @@ Classifier: Intended Audience :: End Users/Desktop 
     | 
|
| 
       355 
355 
     | 
    
         
             
            Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
         
     | 
| 
       356 
356 
     | 
    
         
             
            Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
         
     | 
| 
       357 
357 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3
         
     | 
| 
       358 
     | 
    
         
            -
            Classifier: Programming Language :: Python :: 3.8
         
     | 
| 
       359 
358 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3.9
         
     | 
| 
       360 
359 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3.10
         
     | 
| 
       361 
360 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3.11
         
     | 
| 
       362 
361 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3.12
         
     | 
| 
       363 
362 
     | 
    
         
             
            Classifier: Programming Language :: Python :: 3 :: Only
         
     | 
| 
       364 
     | 
    
         
            -
            Requires-Python: >=3. 
     | 
| 
      
 363 
     | 
    
         
            +
            Requires-Python: >=3.9
         
     | 
| 
       365 
364 
     | 
    
         
             
            Description-Content-Type: text/markdown
         
     | 
| 
       366 
365 
     | 
    
         
             
            License-File: LICENSE
         
     | 
| 
       367 
366 
     | 
    
         
             
            Requires-Dist: aiolimiter ~=1.1.0
         
     | 
| 
       368 
     | 
    
         
            -
            Requires-Dist: anyio ~=4. 
     | 
| 
      
 367 
     | 
    
         
            +
            Requires-Dist: anyio ~=4.6.2.post1
         
     | 
| 
       369 
368 
     | 
    
         
             
            Requires-Dist: apngasm-python ~=1.3.1
         
     | 
| 
       370 
     | 
    
         
            -
            Requires-Dist: av ~= 
     | 
| 
      
 369 
     | 
    
         
            +
            Requires-Dist: av ~=13.1.0
         
     | 
| 
       371 
370 
     | 
    
         
             
            Requires-Dist: beautifulsoup4 ~=4.12.3
         
     | 
| 
       372 
     | 
    
         
            -
            Requires-Dist: rookiepy ~=0.5. 
     | 
| 
       373 
     | 
    
         
            -
            Requires-Dist: httpx ~=0.27. 
     | 
| 
      
 371 
     | 
    
         
            +
            Requires-Dist: rookiepy ~=0.5.4
         
     | 
| 
      
 372 
     | 
    
         
            +
            Requires-Dist: httpx ~=0.27.2
         
     | 
| 
       374 
373 
     | 
    
         
             
            Requires-Dist: imagequant ~=1.1.1
         
     | 
| 
       375 
374 
     | 
    
         
             
            Requires-Dist: memory-tempfile ~=2.2.3
         
     | 
| 
       376 
375 
     | 
    
         
             
            Requires-Dist: mergedeep ~=1.3.4
         
     | 
| 
       377 
376 
     | 
    
         
             
            Requires-Dist: mini-racer ~=0.12.4
         
     | 
| 
       378 
377 
     | 
    
         
             
            Requires-Dist: numpy >=1.22.4
         
     | 
| 
       379 
     | 
    
         
            -
            Requires-Dist: Pillow ~= 
     | 
| 
      
 378 
     | 
    
         
            +
            Requires-Dist: Pillow ~=11.0.0
         
     | 
| 
       380 
379 
     | 
    
         
             
            Requires-Dist: pyoxipng ~=9.0.0
         
     | 
| 
       381 
     | 
    
         
            -
            Requires-Dist: python-telegram-bot ~=21. 
     | 
| 
       382 
     | 
    
         
            -
            Requires-Dist: psutil ~=6. 
     | 
| 
      
 380 
     | 
    
         
            +
            Requires-Dist: python-telegram-bot ~=21.6
         
     | 
| 
      
 381 
     | 
    
         
            +
            Requires-Dist: psutil ~=6.1.0
         
     | 
| 
       383 
382 
     | 
    
         
             
            Requires-Dist: PyMemoryEditor ~=1.5.22
         
     | 
| 
       384 
383 
     | 
    
         
             
            Requires-Dist: requests ~=2.32.3
         
     | 
| 
       385 
384 
     | 
    
         
             
            Requires-Dist: rlottie-python ~=1.3.6
         
     | 
| 
         @@ -1,12 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            sticker_convert/__init__.py,sha256=iQnv6UOOA69c3soAn7ZOnAIubTIQSUxtq1Uhh8xRWvU,102
         
     | 
| 
       2 
     | 
    
         
            -
            sticker_convert/__main__.py,sha256= 
     | 
| 
      
 2 
     | 
    
         
            +
            sticker_convert/__main__.py,sha256=elDCMvU27letiYs8jPUpxaCq5puURnvcDuqGsAAb6_w,592
         
     | 
| 
       3 
3 
     | 
    
         
             
            sticker_convert/cli.py,sha256=yI_56AfEi3Q2q8h1p8-l7wSK7wk3ktQNE_rwTAWwW1Q,20526
         
     | 
| 
       4 
     | 
    
         
            -
            sticker_convert/converter.py,sha256= 
     | 
| 
      
 4 
     | 
    
         
            +
            sticker_convert/converter.py,sha256=ZppZcz6ZCmzx23RjtBWBQ3oLh2fTiPV1U3nEVWHt_xM,35947
         
     | 
| 
       5 
5 
     | 
    
         
             
            sticker_convert/definitions.py,sha256=ZhP2ALCEud-w9ZZD4c3TDG9eHGPZyaAL7zPUsJAbjtE,2073
         
     | 
| 
       6 
     | 
    
         
            -
            sticker_convert/gui.py,sha256= 
     | 
| 
      
 6 
     | 
    
         
            +
            sticker_convert/gui.py,sha256=IsVCXr5_6mzBgIgXtUICI3fcKu51J9WaLE9MBLrm5t4,33064
         
     | 
| 
       7 
7 
     | 
    
         
             
            sticker_convert/job.py,sha256=ae0DKz74nctDLSI0VU7BYI4dx3kwTM8ynky_aLspQVU,26491
         
     | 
| 
       8 
8 
     | 
    
         
             
            sticker_convert/job_option.py,sha256=lhcyioT6qPHrNYRBTv5wxPmmY9RkATo1-DE7-lzCwp0,7887
         
     | 
| 
       9 
     | 
    
         
            -
            sticker_convert/version.py,sha256= 
     | 
| 
      
 9 
     | 
    
         
            +
            sticker_convert/version.py,sha256=9FHU3pAwrdUe2XxHBvtgK7odt3IaLrMg_IagpcWCNTY,47
         
     | 
| 
       10 
10 
     | 
    
         
             
            sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       11 
11 
     | 
    
         
             
            sticker_convert/downloaders/download_base.py,sha256=a34JcNBgZ5yf6gZnxc-B5uNaKVUG-vs3sjOJnLneWsw,4468
         
     | 
| 
       12 
12 
     | 
    
         
             
            sticker_convert/downloaders/download_discord.py,sha256=HeQFjJ7igb5KOk0aXQAUEuJ9OoPKyiE_mAD2_AW9PDw,3435
         
     | 
| 
         @@ -105,9 +105,9 @@ sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE 
     | 
|
| 
       105 
105 
     | 
    
         
             
            sticker_convert/utils/media/codec_info.py,sha256=XoEWBfPWTzr4zSVQIU1XF1yh5viHxH5FytNEpdZR38c,14874
         
     | 
| 
       106 
106 
     | 
    
         
             
            sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
         
     | 
| 
       107 
107 
     | 
    
         
             
            sticker_convert/utils/media/format_verify.py,sha256=MH68GLJfXeL8WFT8emtj355K5BLAtUX64tQ59nugx2c,5673
         
     | 
| 
       108 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
       109 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
       110 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
       111 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
       112 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
       113 
     | 
    
         
            -
            sticker_convert-2.10. 
     | 
| 
      
 108 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
         
     | 
| 
      
 109 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/METADATA,sha256=hbfspaOo9jy4-xMUiGnaFiNfF1qaIrtlnxBDnG9Ru2Y,52498
         
     | 
| 
      
 110 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
         
     | 
| 
      
 111 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
         
     | 
| 
      
 112 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
         
     | 
| 
      
 113 
     | 
    
         
            +
            sticker_convert-2.10.4.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |