sticker-convert 2.1.13__tar.gz → 2.1.15__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 (99) hide show
  1. {sticker-convert-2.1.13/src/sticker_convert.egg-info → sticker-convert-2.1.15}/PKG-INFO +1 -1
  2. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/__init__.py +1 -1
  3. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/__main__.py +2 -0
  4. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/converter.py +3 -2
  5. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/job.py +1 -1
  6. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/files/dir_utils.py +1 -0
  7. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/media/codec_info.py +14 -6
  8. {sticker-convert-2.1.13 → sticker-convert-2.1.15/src/sticker_convert.egg-info}/PKG-INFO +1 -1
  9. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/LICENSE +0 -0
  10. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/MANIFEST.in +0 -0
  11. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/README.md +0 -0
  12. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/pyproject.toml +0 -0
  13. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/requirements.txt +0 -0
  14. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/setup.cfg +0 -0
  15. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/cli.py +0 -0
  16. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/downloaders/download_base.py +0 -0
  17. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/downloaders/download_kakao.py +0 -0
  18. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/downloaders/download_line.py +0 -0
  19. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/downloaders/download_signal.py +0 -0
  20. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  21. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui.py +0 -0
  22. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
  23. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
  24. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
  25. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
  26. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
  27. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
  28. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
  29. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
  30. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/gui_utils.py +0 -0
  31. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
  32. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
  33. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
  34. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
  35. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
  36. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  37. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  38. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  39. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  40. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  41. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  42. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  43. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  44. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  45. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  46. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  47. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  48. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  49. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  50. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  51. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  52. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  53. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  54. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  55. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  56. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  57. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  58. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  59. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  60. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  61. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  62. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  63. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  64. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  65. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  66. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  67. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  68. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/job_option.py +0 -0
  69. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  70. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/appicon.icns +0 -0
  71. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/appicon.ico +0 -0
  72. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/appicon.png +0 -0
  73. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/compression.json +0 -0
  74. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/emoji.json +0 -0
  75. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/help.json +0 -0
  76. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/input.json +0 -0
  77. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/resources/output.json +0 -0
  78. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  79. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/uploaders/upload_base.py +0 -0
  80. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  81. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  82. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
  83. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
  84. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
  85. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
  86. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/fake_cb_msg.py +0 -0
  87. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/files/cache_store.py +0 -0
  88. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/files/json_manager.py +0 -0
  89. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
  90. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/files/run_bin.py +0 -0
  91. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
  92. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
  93. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/media/format_verify.py +0 -0
  94. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert/utils/url_detect.py +0 -0
  95. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
  96. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  97. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  98. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/src/sticker_convert.egg-info/requires.txt +0 -0
  99. {sticker-convert-2.1.13 → sticker-convert-2.1.15}/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.13
3
+ Version: 2.1.15
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,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
  '''sticker-convert'''
3
- __version__ = '2.1.13'
3
+ __version__ = '2.1.15'
@@ -3,8 +3,10 @@ def main():
3
3
  import multiprocessing
4
4
  import sys
5
5
  import os
6
+ from .__init__ import __version__
6
7
 
7
8
  multiprocessing.freeze_support()
9
+ print(f"sticker-convert {__version__}")
8
10
  script_path = os.path.dirname(__file__)
9
11
  if not os.path.isdir(script_path):
10
12
  script_path = os.path.dirname(sys.argv[0])
@@ -218,8 +218,9 @@ class StickerConvert:
218
218
  self.frames_import_imageio()
219
219
 
220
220
  def frames_import_imageio(self):
221
- if self.in_f_ext in '.webp':
222
- # ffmpeg do not support webp decoding (yet)
221
+ # ffmpeg do not support webp decoding (yet)
222
+ # ffmpeg could fail to decode apng if file is buggy
223
+ if self.in_f_ext in ('.webp', '.apng', 'png'):
223
224
  for frame in iio.imiter(self.in_f, plugin='pillow', mode='RGBA'):
224
225
  self.frames_raw.append(frame)
225
226
  return
@@ -410,7 +410,7 @@ class Job:
410
410
 
411
411
  if self.out_urls:
412
412
  with open(os.path.join(self.opt_output.dir, 'export-result.txt'), 'w+') as f:
413
- f.writelines(self.out_urls)
413
+ f.write('\n'.join(self.out_urls))
414
414
  else:
415
415
  self.cb_msg('An error occured while exporting stickers')
416
416
  return False
@@ -61,4 +61,5 @@ class DirUtils:
61
61
  if (config_dir := DirUtils._get_curr_dir_if_writable()) != None:
62
62
  return config_dir
63
63
  else:
64
+ os.makedirs(fallback_dir, exist_ok=True)
64
65
  return fallback_dir
@@ -75,17 +75,25 @@ class CodecInfo:
75
75
  def get_file_codec(file: str) -> Optional[str]:
76
76
  codec = None
77
77
  try:
78
- codec = Image.open(file).format
78
+ im = Image.open(file)
79
+ codec = im.format
79
80
  except UnidentifiedImageError:
80
81
  pass
81
82
 
82
83
  # Unable to distinguish apng and png
83
- if codec not in (None, 'PNG'):
84
- return codec.lower()
85
- else:
84
+ if codec == None:
86
85
  metadata = iio.immeta(file, plugin="pyav", exclude_applied=False)
87
86
  codec = metadata.get("codec", None)
87
+ if codec == None:
88
+ raise RuntimeError(f"Unable to get codec for file {file}")
88
89
  return codec
90
+ elif codec == "PNG":
91
+ if im.is_animated:
92
+ return "apng"
93
+ else:
94
+ return "png"
95
+ else:
96
+ return codec.lower()
89
97
 
90
98
  @staticmethod
91
99
  def get_file_res(file: str) -> tuple[int, int]:
@@ -95,7 +103,7 @@ class CodecInfo:
95
103
  with LottieAnimation.from_tgs(file) as anim:
96
104
  width, height = anim.lottie_animation_get_size()
97
105
  else:
98
- if file_ext == ".webp":
106
+ if file_ext in (".webp", ".png", ".apng"):
99
107
  plugin = "pillow"
100
108
  else:
101
109
  plugin = "pyav"
@@ -114,7 +122,7 @@ class CodecInfo:
114
122
  with LottieAnimation.from_tgs(file) as anim:
115
123
  frames = anim.lottie_animation_get_totalframe()
116
124
  else:
117
- if file_ext == ".webp":
125
+ if file_ext in (".webp", ".png", ".apng"):
118
126
  frames = Image.open(file).n_frames
119
127
  else:
120
128
  frames = frames = len([* iio.imiter(file, plugin="pyav")])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.1.13
3
+ Version: 2.1.15
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>