sticker-convert 2.1.4__py3-none-any.whl → 2.1.5__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/uploaders/xcode_imessage.py +7 -8
- sticker_convert/utils/converter.py +9 -6
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/METADATA +1 -1
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/RECORD +9 -9
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/LICENSE +0 -0
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/WHEEL +0 -0
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.1.4.dist-info → sticker_convert-2.1.5.dist-info}/top_level.txt +0 -0
sticker_convert/__init__.py
CHANGED
@@ -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
|
-
|
145
|
-
|
146
|
-
|
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'
|
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
|
-
|
277
|
+
if not self.fps:
|
278
|
+
return [frames_in[0]]
|
278
279
|
|
279
|
-
|
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,7 +303,10 @@ 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 == '.apng' or
|
307
|
+
(self.out_f_ext == '.png' and
|
308
|
+
self.fps != None and
|
309
|
+
(len(self.frames_processed) > 1 or self.fake_vid))):
|
307
310
|
self.frames_export_apng()
|
308
311
|
elif self.out_f_ext == '.png':
|
309
312
|
self.frames_export_png()
|
@@ -388,9 +391,9 @@ class StickerConvert:
|
|
388
391
|
self.apngasm.add_frame(frame_final)
|
389
392
|
|
390
393
|
with CacheStore.get_cache_store(path=self.cache_dir) as tempdir:
|
391
|
-
self.apngasm.assemble(os.path.join(tempdir, 'out.
|
394
|
+
self.apngasm.assemble(os.path.join(tempdir, f'out{self.out_f_ext}'))
|
392
395
|
|
393
|
-
with open(os.path.join(tempdir, 'out.
|
396
|
+
with open(os.path.join(tempdir, f'out{self.out_f_ext}'), 'rb') as f:
|
394
397
|
self.tmp_f.write(f.read())
|
395
398
|
|
396
399
|
self.apngasm.reset()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.5
|
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=zrhIFFkdukbv6wn7kdQ8y4tDW7_yyslMmBP-Wt9ZFjY,66
|
2
2
|
sticker_convert/__main__.py,sha256=gzkK62bHS__nnQnktN2BEL7d3NE0KPMGkNOA-BBR5dg,541
|
3
3
|
sticker_convert/cli.py,sha256=w_NRwMesXdgmynOqUkaQ7ofNN9rrhxnlyHPteTQAv7w,16182
|
4
4
|
sticker_convert/flow.py,sha256=FM3mwMbeQo2uxjf3J8zg4CidtMOkMIAdRYaqWF-wSPc,18975
|
@@ -69,11 +69,11 @@ sticker_convert/uploaders/compress_wastickers.py,sha256=aBUMxKnZ69Hd6ZOR_3XotrEx
|
|
69
69
|
sticker_convert/uploaders/upload_base.py,sha256=5bNIh2a2K_ako_TmkVJ0mHtXdiILhY-chHOZXPBhzcE,658
|
70
70
|
sticker_convert/uploaders/upload_signal.py,sha256=uEeMkqV9_jcZNO6DcUhuHiaufDJjcdE5oz4geGWIAf0,5413
|
71
71
|
sticker_convert/uploaders/upload_telegram.py,sha256=Uj0njsCyuq_xQkx7u2yABDzE4hUT-u0Gd-fTJguNQZ8,10022
|
72
|
-
sticker_convert/uploaders/xcode_imessage.py,sha256=
|
72
|
+
sticker_convert/uploaders/xcode_imessage.py,sha256=2kzF_FE16toeGFMqCITirx2xSiZdbYzhPpIjcHXUPvo,12945
|
73
73
|
sticker_convert/utils/apple_png_normalize.py,sha256=Qg_k4BBZllUXZ2pQrSmp5aP2xEGwRjMJ6kAXTeEB5sw,3571
|
74
74
|
sticker_convert/utils/cache_store.py,sha256=dRQazWoTm3ZGg9QwjQ_6EeQtx4vj3JY5pxy8ITHW_Ek,724
|
75
75
|
sticker_convert/utils/codec_info.py,sha256=FqK_4Wi6s2tqtyDbqQeW4kNXvlRmLLQLtZIbjEV2Dls,3602
|
76
|
-
sticker_convert/utils/converter.py,sha256=
|
76
|
+
sticker_convert/utils/converter.py,sha256=6GqGttdG-VcFciZTdg4hFSQG2wMnJb-0D0tIIYcQlSY,18044
|
77
77
|
sticker_convert/utils/curr_dir.py,sha256=xLg_9FygEp7PE5drzkirtdwzzW24H3gdBj8zIIgkBf8,2431
|
78
78
|
sticker_convert/utils/fake_cb_msg.py,sha256=QRqEnduEfhVdE0oVdZvQquUHnyZ9ICrVcGNHcMBk2-s,213
|
79
79
|
sticker_convert/utils/format_verify.py,sha256=RGxjS7KD0upgC5bFXSICB649vum9yu3YragP1nRoiWo,6848
|
@@ -82,9 +82,9 @@ sticker_convert/utils/json_manager.py,sha256=kGIeDNN0h7He__0d1Ej8ZVsbY6z_LxHqHAy
|
|
82
82
|
sticker_convert/utils/metadata_handler.py,sha256=8SAMT0MwDn6cbg8snx0GQ3FD43FltDvDurfoIokwCMk,8200
|
83
83
|
sticker_convert/utils/run_bin.py,sha256=Ck1Ktqg_6mkZYhMuGyg343QMcf8GvprHQeea4GObVwc,1519
|
84
84
|
sticker_convert/utils/url_detect.py,sha256=SCk1PanPIEIBNE-_xWfnqHrg8xlMJQXlMaBIV8kqW_A,763
|
85
|
-
sticker_convert-2.1.
|
86
|
-
sticker_convert-2.1.
|
87
|
-
sticker_convert-2.1.
|
88
|
-
sticker_convert-2.1.
|
89
|
-
sticker_convert-2.1.
|
90
|
-
sticker_convert-2.1.
|
85
|
+
sticker_convert-2.1.5.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
86
|
+
sticker_convert-2.1.5.dist-info/METADATA,sha256=2fCG4wszsojlQx45mmZRjTHwD83QA3yGbV_-XljMW1k,44705
|
87
|
+
sticker_convert-2.1.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
88
|
+
sticker_convert-2.1.5.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
89
|
+
sticker_convert-2.1.5.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
90
|
+
sticker_convert-2.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|