sticker-convert 2.1.4__tar.gz → 2.1.6__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.
Files changed (97) hide show
  1. {sticker-convert-2.1.4/src/sticker_convert.egg-info → sticker-convert-2.1.6}/PKG-INFO +8 -7
  2. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/requirements.txt +7 -6
  3. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/__init__.py +1 -1
  4. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/auth/get_line_auth.py +6 -5
  5. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/cli.py +4 -2
  6. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/downloaders/download_line.py +15 -7
  7. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui.py +1 -1
  8. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/uploaders/xcode_imessage.py +7 -8
  9. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/converter.py +25 -14
  10. {sticker-convert-2.1.4 → sticker-convert-2.1.6/src/sticker_convert.egg-info}/PKG-INFO +8 -7
  11. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert.egg-info/requires.txt +7 -6
  12. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/LICENSE +0 -0
  13. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/MANIFEST.in +0 -0
  14. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/README.md +0 -0
  15. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/pyproject.toml +0 -0
  16. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/setup.cfg +0 -0
  17. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/__main__.py +0 -0
  18. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/auth/get_kakao_auth.py +0 -0
  19. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/auth/get_signal_auth.py +0 -0
  20. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/downloaders/download_base.py +0 -0
  21. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/downloaders/download_kakao.py +0 -0
  22. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/downloaders/download_signal.py +0 -0
  23. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  24. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/flow.py +0 -0
  25. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/comp_frame.py +0 -0
  26. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/config_frame.py +0 -0
  27. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/control_frame.py +0 -0
  28. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/cred_frame.py +0 -0
  29. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/input_frame.py +0 -0
  30. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/output_frame.py +0 -0
  31. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/progress_frame.py +0 -0
  32. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_frames/right_clicker.py +0 -0
  33. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_windows/advanced_compression_window.py +0 -0
  34. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_windows/base_window.py +0 -0
  35. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_windows/kakao_get_auth_window.py +0 -0
  36. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_windows/line_get_auth_window.py +0 -0
  37. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/gui_windows/signal_get_auth_window.py +0 -0
  38. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  39. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  40. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  41. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  42. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  43. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  44. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  45. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  46. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  47. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  48. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  49. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  50. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  51. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  52. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  53. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  54. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  55. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  56. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  57. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  58. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  59. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  60. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  61. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  62. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  63. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  64. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  65. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  66. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  67. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  68. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  69. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  70. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  71. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/appicon.icns +0 -0
  72. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/appicon.ico +0 -0
  73. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/appicon.png +0 -0
  74. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/compression.json +0 -0
  75. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/emoji.json +0 -0
  76. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/help.json +0 -0
  77. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/input.json +0 -0
  78. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/resources/output.json +0 -0
  79. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  80. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/uploaders/upload_base.py +0 -0
  81. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  82. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  83. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/apple_png_normalize.py +0 -0
  84. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/cache_store.py +0 -0
  85. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/codec_info.py +0 -0
  86. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/curr_dir.py +0 -0
  87. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/fake_cb_msg.py +0 -0
  88. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/format_verify.py +0 -0
  89. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/gui_utils.py +0 -0
  90. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/json_manager.py +0 -0
  91. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/metadata_handler.py +0 -0
  92. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/run_bin.py +0 -0
  93. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert/utils/url_detect.py +0 -0
  94. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
  95. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  96. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  97. {sticker-convert-2.1.4 → sticker-convert-2.1.6}/src/sticker_convert.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.1.4
3
+ Version: 2.1.6
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>
@@ -364,23 +364,24 @@ Classifier: Programming Language :: Python :: 3 :: Only
364
364
  Requires-Python: >=3.7
365
365
  Description-Content-Type: text/markdown
366
366
  License-File: LICENSE
367
- Requires-Dist: apngasm_python~=1.2.0
368
- Requires-Dist: av~=10.0.0
367
+ Requires-Dist: apngasm_python~=1.2.1
368
+ Requires-Dist: pyav~=11.0.1
369
369
  Requires-Dist: beautifulsoup4~=4.12.2
370
- Requires-Dist: browser-cookie3~=0.19.1
370
+ Requires-Dist: rookiepy~=0.2.7
371
371
  Requires-Dist: imageio~=2.31.5
372
372
  Requires-Dist: memory-tempfile~=2.2.3
373
373
  Requires-Dist: mergedeep~=1.3.4
374
+ Requires-Dist: numpy~=1.26.0
374
375
  Requires-Dist: Pillow~=10.0.1
375
- Requires-Dist: pyoxipng~=8.0.0
376
+ Requires-Dist: pyoxipng~=8.0.1
376
377
  Requires-Dist: python-telegram-bot~=20.5
377
378
  Requires-Dist: requests~=2.31.0
378
- Requires-Dist: rlottie_python~=1.1.9
379
+ Requires-Dist: rlottie_python~=1.2.1
379
380
  Requires-Dist: selenium~=4.13.0
380
381
  Requires-Dist: signalstickers-client~=3.3.0
381
382
  Requires-Dist: tqdm~=4.66.1
382
383
  Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
383
- Requires-Dist: webp~=0.2.0
384
+ Requires-Dist: webp~=0.3.0
384
385
 
385
386
  # sticker-convert
386
387
  ![imgs/banner.png](imgs/banner.png)
@@ -1,17 +1,18 @@
1
- apngasm_python~=1.2.0
2
- av~=10.0.0
1
+ apngasm_python~=1.2.1
2
+ pyav~=11.0.1
3
3
  beautifulsoup4~=4.12.2
4
- browser-cookie3~=0.19.1
4
+ rookiepy~=0.2.7
5
5
  imageio~=2.31.5
6
6
  memory-tempfile~=2.2.3
7
7
  mergedeep~=1.3.4
8
+ numpy~=1.26.0
8
9
  Pillow~=10.0.1
9
- pyoxipng~=8.0.0
10
+ pyoxipng~=8.0.1
10
11
  python-telegram-bot~=20.5
11
12
  requests~=2.31.0
12
- rlottie_python~=1.1.9
13
+ rlottie_python~=1.2.1
13
14
  selenium~=4.13.0
14
15
  signalstickers-client~=3.3.0
15
16
  tqdm~=4.66.1
16
17
  ttkbootstrap-fork-laggykiller~=1.5.1
17
- webp~=0.2.0
18
+ webp~=0.3.0
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
  '''sticker-convert'''
3
- __version__ = '2.1.4'
3
+ __version__ = '2.1.6'
@@ -2,18 +2,19 @@
2
2
  import json
3
3
  from typing import Optional
4
4
 
5
- import browser_cookie3 # type: ignore
5
+ import rookiepy # type: ignore
6
6
  import requests
7
7
 
8
8
  class GetLineAuth:
9
9
  def get_cred(self) -> Optional[str]:
10
- cookies_jar = browser_cookie3.load(domain_name='store.line.me')
10
+ cookies = [c for c in rookiepy.load() if c.domain == 'store.line.me']
11
+ cookies_dict = rookiepy.to_dict(cookies)
12
+ cookies_jar = rookiepy.to_cookiejar(cookies)
11
13
 
12
14
  if not GetLineAuth.validate_cookies(cookies_jar):
13
15
  return None
14
-
15
- cookies_dict = requests.utils.dict_from_cookiejar(cookies_jar)
16
- cookies_list = ['%s=%s' % (name, value) for (name, value) in cookies_dict.items()]
16
+
17
+ cookies_list = ['%s=%s' % (i['name'], i['value']) for i in cookies_dict]
17
18
  cookies = ';'.join(cookies_list)
18
19
 
19
20
  return cookies
@@ -103,10 +103,12 @@ class CLI:
103
103
  self.cb_msg, self.cb_msg_block, self.cb_bar, self.cb_ask_bool
104
104
  )
105
105
 
106
- success = flow.start()
106
+ status = flow.start()
107
107
 
108
- if not success:
108
+ if status == 1:
109
109
  self.cb_msg(msg='An error occured during this run.')
110
+ elif status == 2:
111
+ self.cb_msg(msg='Job cancelled.')
110
112
 
111
113
  def get_opt_input(self, args):
112
114
  download_options = {
@@ -143,16 +143,24 @@ class DownloadLine(DownloadBase):
143
143
  def load_cookies(self) -> dict[str, str]:
144
144
  cookies = {}
145
145
  if self.opt_cred and self.opt_cred.get('line', {}).get('cookies'):
146
+ line_cookies = self.opt_cred['line']['cookies']
147
+
146
148
  try:
147
- for i in self.opt_cred['line']['cookies'].split(';'):
148
- c_key, c_value = i.split('=')
149
- cookies[c_key] = c_value
150
- if not GetLineAuth.validate_cookies(cookies):
149
+ line_cookies_dict = json.loads(line_cookies)
150
+ for c in line_cookies_dict:
151
+ cookies[c['name']] = c['value']
152
+ except json.decoder.JSONDecodeError:
153
+ try:
154
+ for i in line_cookies.split(';'):
155
+ c_key, c_value = i.split('=')
156
+ cookies[c_key] = c_value
157
+ except ValueError:
151
158
  self.cb_msg('Warning: Line cookies invalid, you will not be able to add text to "Custom stickers"')
152
- cookies = {}
153
- except ValueError:
154
- self.cb_msg('Warning: Line cookies invalid, you will not be able to add text to "Custom stickers"')
155
159
 
160
+ if not GetLineAuth.validate_cookies(cookies):
161
+ self.cb_msg('Warning: Line cookies invalid, you will not be able to add text to "Custom stickers"')
162
+ cookies = {}
163
+
156
164
  return cookies
157
165
 
158
166
  def get_pack_url(self) -> str:
@@ -179,7 +179,7 @@ class GUI(Window):
179
179
 
180
180
  def warn_tkinter_bug(self):
181
181
  if (platform.system() == 'Darwin' and
182
- platform.mac_ver().split('.')[0] == '14' and
182
+ platform.mac_ver()[0].split('.')[0] == '14' and
183
183
  sys.version_info[0] == 3 and
184
184
  sys.version_info[1] == 11):
185
185
  msg = 'NOTICE: If buttons are not responsive, try to press '
@@ -53,6 +53,7 @@ class XcodeImessageIconset:
53
53
  # 'Messages-iPad-Pro-74x55pt@2x.png': (148, 110),
54
54
  # 'Messages-iPhone-60x45pt@2x.png': (120, 90),
55
55
  # 'Messages-iPhone-60x45pt@3x.png': (180, 135)
56
+ # }
56
57
 
57
58
 
58
59
 
@@ -97,6 +98,8 @@ class XcodeImessage(UploadBase):
97
98
  def create_imessage_xcode(self) -> list[str]:
98
99
  urls = []
99
100
  title, author, emoji_dict = MetadataHandler.get_metadata(self.in_dir, title=self.opt_output.get('title'), author=self.opt_output.get('author'))
101
+ author = author.replace(' ', '_')
102
+ title = title.replace(' ', '_')
100
103
  packs = MetadataHandler.split_sticker_packs(self.in_dir, title=title, file_per_pack=100, separate_image_anim=False)
101
104
 
102
105
  res_choice = None
@@ -141,13 +144,9 @@ class XcodeImessage(UploadBase):
141
144
 
142
145
  def add_metadata(self, author: str, title: str):
143
146
  first_image_path = os.path.join(self.in_dir, [i for i in sorted(os.listdir(self.in_dir)) if os.path.isfile(os.path.join(self.in_dir, i)) and i.endswith('.png')][0])
144
- cover_path_old = MetadataHandler.get_cover(self.in_dir)
145
- cover_path_new = os.path.join(self.out_dir, 'cover.png')
146
- if os.path.isfile(cover_path_old) and cover_path_new != cover_path_old:
147
- shutil.copy(cover_path_old, cover_path_new)
148
-
149
- if os.path.isfile(cover_path_old):
150
- icon_source = cover_path_old
147
+ cover_path = MetadataHandler.get_cover(self.in_dir)
148
+ if cover_path:
149
+ icon_source = cover_path
151
150
  else:
152
151
  icon_source = first_image_path
153
152
 
@@ -199,7 +198,7 @@ class XcodeImessage(UploadBase):
199
198
  pbxproj_data = pbxproj_data.replace('/* Build configuration list for PBXProject "stickers" */', f'/* Build configuration list for PBXProject "{title}" */')
200
199
  pbxproj_data = pbxproj_data.replace('/* Build configuration list for PBXNativeTarget "stickers StickerPackExtension" */', f'/* Build configuration list for PBXNativeTarget "{title} StickerPackExtension" */')
201
200
  pbxproj_data = pbxproj_data.replace('/* Build configuration list for PBXNativeTarget "stickers" */', f'/* Build configuration list for PBXNativeTarget "{title}" */')
202
- pbxproj_data = pbxproj_data.replace('com.niklaspeterson', f'{title}.{author}')
201
+ pbxproj_data = pbxproj_data.replace('com.niklaspeterson', f'com.{author}')
203
202
  pbxproj_data = pbxproj_data.replace('stickers/Info.plist', f'{title}/Info.plist')
204
203
 
205
204
  with open(os.path.join(pack_path, 'stickers.xcodeproj/project.pbxproj'), 'w+', encoding='utf-8') as f:
@@ -274,10 +274,10 @@ class StickerConvert:
274
274
  return frames_out
275
275
 
276
276
  def frames_drop(self, frames_in: list[np.ndarray]) -> list[np.ndarray]:
277
- frames_out = []
277
+ if not self.fps:
278
+ return [frames_in[0]]
278
279
 
279
- if not (self.duration_min or self.duration_max):
280
- return frames_in
280
+ frames_out = []
281
281
 
282
282
  frames_orig = CodecInfo.get_file_frames(self.in_f)
283
283
  fps_orig = CodecInfo.get_file_fps(self.in_f)
@@ -303,20 +303,31 @@ class StickerConvert:
303
303
  return frames_out
304
304
 
305
305
  def frames_export(self):
306
- if self.out_f_ext == '.apng':
306
+ if self.out_f_ext in ('.apng', '.png') and self.fps:
307
307
  self.frames_export_apng()
308
308
  elif self.out_f_ext == '.png':
309
309
  self.frames_export_png()
310
- elif self.out_f_ext == '.webp':
310
+ elif self.out_f_ext == '.webp' and self.fps:
311
311
  self.frames_export_webp()
312
+ elif self.fps:
313
+ self.frames_export_pyav()
312
314
  else:
313
- self.frames_export_imageio()
314
-
315
- def frames_export_imageio(self):
316
- options = {
317
- 'quality': str(self.quality),
318
- 'lossless': '0'
319
- }
315
+ self.frames_export_pil()
316
+
317
+ def frames_export_pil(self):
318
+ image = Image.fromarray(self.frames_processed[0])
319
+ image.save(
320
+ self.tmp_f,
321
+ format=self.out_f_ext.replace('.', ''),
322
+ quality=self.quality
323
+ )
324
+
325
+ def frames_export_pyav(self):
326
+ options = {}
327
+
328
+ if type(self.quality) == int:
329
+ options['quality'] = str(self.quality)
330
+ options['lossless'] = '0'
320
331
 
321
332
  if self.out_f_ext == '.gif':
322
333
  codec = 'gif'
@@ -388,9 +399,9 @@ class StickerConvert:
388
399
  self.apngasm.add_frame(frame_final)
389
400
 
390
401
  with CacheStore.get_cache_store(path=self.cache_dir) as tempdir:
391
- self.apngasm.assemble(os.path.join(tempdir, 'out.apng'))
402
+ self.apngasm.assemble(os.path.join(tempdir, f'out{self.out_f_ext}'))
392
403
 
393
- with open(os.path.join(tempdir, 'out.apng'), 'rb') as f:
404
+ with open(os.path.join(tempdir, f'out{self.out_f_ext}'), 'rb') as f:
394
405
  self.tmp_f.write(f.read())
395
406
 
396
407
  self.apngasm.reset()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.1.4
3
+ Version: 2.1.6
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>
@@ -364,23 +364,24 @@ Classifier: Programming Language :: Python :: 3 :: Only
364
364
  Requires-Python: >=3.7
365
365
  Description-Content-Type: text/markdown
366
366
  License-File: LICENSE
367
- Requires-Dist: apngasm_python~=1.2.0
368
- Requires-Dist: av~=10.0.0
367
+ Requires-Dist: apngasm_python~=1.2.1
368
+ Requires-Dist: pyav~=11.0.1
369
369
  Requires-Dist: beautifulsoup4~=4.12.2
370
- Requires-Dist: browser-cookie3~=0.19.1
370
+ Requires-Dist: rookiepy~=0.2.7
371
371
  Requires-Dist: imageio~=2.31.5
372
372
  Requires-Dist: memory-tempfile~=2.2.3
373
373
  Requires-Dist: mergedeep~=1.3.4
374
+ Requires-Dist: numpy~=1.26.0
374
375
  Requires-Dist: Pillow~=10.0.1
375
- Requires-Dist: pyoxipng~=8.0.0
376
+ Requires-Dist: pyoxipng~=8.0.1
376
377
  Requires-Dist: python-telegram-bot~=20.5
377
378
  Requires-Dist: requests~=2.31.0
378
- Requires-Dist: rlottie_python~=1.1.9
379
+ Requires-Dist: rlottie_python~=1.2.1
379
380
  Requires-Dist: selenium~=4.13.0
380
381
  Requires-Dist: signalstickers-client~=3.3.0
381
382
  Requires-Dist: tqdm~=4.66.1
382
383
  Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
383
- Requires-Dist: webp~=0.2.0
384
+ Requires-Dist: webp~=0.3.0
384
385
 
385
386
  # sticker-convert
386
387
  ![imgs/banner.png](imgs/banner.png)
@@ -1,17 +1,18 @@
1
- apngasm_python~=1.2.0
2
- av~=10.0.0
1
+ apngasm_python~=1.2.1
2
+ pyav~=11.0.1
3
3
  beautifulsoup4~=4.12.2
4
- browser-cookie3~=0.19.1
4
+ rookiepy~=0.2.7
5
5
  imageio~=2.31.5
6
6
  memory-tempfile~=2.2.3
7
7
  mergedeep~=1.3.4
8
+ numpy~=1.26.0
8
9
  Pillow~=10.0.1
9
- pyoxipng~=8.0.0
10
+ pyoxipng~=8.0.1
10
11
  python-telegram-bot~=20.5
11
12
  requests~=2.31.0
12
- rlottie_python~=1.1.9
13
+ rlottie_python~=1.2.1
13
14
  selenium~=4.13.0
14
15
  signalstickers-client~=3.3.0
15
16
  tqdm~=4.66.1
16
17
  ttkbootstrap-fork-laggykiller~=1.5.1
17
- webp~=0.2.0
18
+ webp~=0.3.0
File without changes