sticker-convert 2.10.2__py3-none-any.whl → 2.10.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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
- True,
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
- True,
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,34 @@ 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")
213
+ loc = cast(str, locale.getdefaultlocale()[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.startswith(cn_locs) or winloc.startswith(cn_locs):
223
+ return True
224
+ return False
225
+
226
+ def author_info(self) -> None:
227
+ if self.is_cn():
228
+ msg = "sticker-convert是laggykiller创作的免费开源项目,严禁翻售\n"
229
+ msg += "https://github.com/laggykiller/sticker-convert\n"
230
+ msg += "尊重知识产权,做个文明人,请不要转售贴图!\n"
231
+ else:
232
+ msg = "sticker-convert is Free and Opensource software by laggykiller\n"
233
+ msg += "https://github.com/laggykiller/sticker-convert\n"
234
+ msg += "Please use the stickers with your friends only.\n"
235
+ msg += "It is illegal and immoral to sell stickers downloaded from this program.\n"
236
+
237
+ self.cb_msg(msg)
238
+
209
239
  def warn_tkinter_bug(self) -> None:
210
240
  if (
211
241
  platform.system() == "Darwin"
@@ -215,13 +245,9 @@ class GUI(Window):
215
245
  and sys.version_info[2] <= 6
216
246
  ):
217
247
  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
- self.cb_msg(msg)
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)"
248
+ msg += "on title bar or move mouse cursor away from window for a while.\n"
249
+ msg += "(This is a bug in tkinter specific to macOS 14 python <=3.11.6)\n"
250
+ msg += "(https://github.com/python/cpython/issues/110218)\n"
225
251
  self.cb_msg(msg)
226
252
 
227
253
  def load_jsons(self) -> None:
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- __version__ = "2.10.2"
3
+ __version__ = "2.10.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.10.2
3
+ Version: 2.10.3
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>
@@ -370,7 +370,7 @@ Requires-Dist: apngasm-python ~=1.3.1
370
370
  Requires-Dist: av ~=12.3.0
371
371
  Requires-Dist: beautifulsoup4 ~=4.12.3
372
372
  Requires-Dist: rookiepy ~=0.5.2
373
- Requires-Dist: httpx ~=0.27.0
373
+ Requires-Dist: httpx ~=0.27.2
374
374
  Requires-Dist: imagequant ~=1.1.1
375
375
  Requires-Dist: memory-tempfile ~=2.2.3
376
376
  Requires-Dist: mergedeep ~=1.3.4
@@ -378,7 +378,7 @@ Requires-Dist: mini-racer ~=0.12.4
378
378
  Requires-Dist: numpy >=1.22.4
379
379
  Requires-Dist: Pillow ~=10.4.0
380
380
  Requires-Dist: pyoxipng ~=9.0.0
381
- Requires-Dist: python-telegram-bot ~=21.4
381
+ Requires-Dist: python-telegram-bot ~=21.5
382
382
  Requires-Dist: psutil ~=6.0.0
383
383
  Requires-Dist: PyMemoryEditor ~=1.5.22
384
384
  Requires-Dist: requests ~=2.32.3
@@ -1,12 +1,12 @@
1
1
  sticker_convert/__init__.py,sha256=iQnv6UOOA69c3soAn7ZOnAIubTIQSUxtq1Uhh8xRWvU,102
2
- sticker_convert/__main__.py,sha256=6RJauR-SCSSTT3TU7FFB6B6PVwsCxO2xZXtmZ3jc2Is,463
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=XMiYzIzlcdvx_AFyyk7j-Zdyj3ablLFJFUZ6tjrlGIs,35861
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=5mJxeGgmbsniP2fpq5Ow7jNv1BQXFtWwvUyr2KWvBDo,31829
6
+ sticker_convert/gui.py,sha256=9nvxA56m4S_OapRXXJJ-lLR1Boj0s721zfZr51hclPY,33011
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=MMka4FopHFO0UAth4qBkny-QsgGsAkwDLnB1vTG4lqE,47
9
+ sticker_convert/version.py,sha256=9euJw4TloOUB-GV8lXF8DvHpUBDmFvNbEId1fEPNpWs,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.2.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
109
- sticker_convert-2.10.2.dist-info/METADATA,sha256=dRaXHpGKAHOllhohuhCskDSOMW0ouNp_hkCvFD5UAdU,52542
110
- sticker_convert-2.10.2.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
111
- sticker_convert-2.10.2.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
112
- sticker_convert-2.10.2.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
113
- sticker_convert-2.10.2.dist-info/RECORD,,
108
+ sticker_convert-2.10.3.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
109
+ sticker_convert-2.10.3.dist-info/METADATA,sha256=cqSne7lAi53NRz4k6MzoVvaG52ETaPnGUcZy4M5ZTu8,52542
110
+ sticker_convert-2.10.3.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
111
+ sticker_convert-2.10.3.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
112
+ sticker_convert-2.10.3.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
113
+ sticker_convert-2.10.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.0.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5