diff --git a/msicreator.json b/msicreator.json index 58749ec..ba9ebab 100644 --- a/msicreator.json +++ b/msicreator.json @@ -1,6 +1,6 @@ { "upgrade_guid": "1279FFE1-5C4A-4354-B0A0-5A3FCF2719E3", - "version": "2.1.3", + "version": "2.1.4", "product_name": "sticker-convert", "manufacturer": "laggykiller", "name": "sticker-convert", diff --git a/src/sticker_convert/__init__.py b/src/sticker_convert/__init__.py index 2765c0b..450e8a8 100755 --- a/src/sticker_convert/__init__.py +++ b/src/sticker_convert/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 '''sticker-convert''' -__version__ = '2.1.3' \ No newline at end of file +__version__ = '2.1.4' \ No newline at end of file diff --git a/src/sticker_convert/gui.py b/src/sticker_convert/gui.py index d9d69c2..b589206 100755 --- a/src/sticker_convert/gui.py +++ b/src/sticker_convert/gui.py @@ -614,7 +614,7 @@ def highlight_fields(self) -> bool: self.input_frame.address_entry.config(bootstyle='warning') elif (download_option != input_option and - not (input_option == 'kakao' and url.isnumeric())): + not (input_option in ('kakao', 'line') and url.isnumeric())): self.input_frame.address_entry.config(bootstyle='danger') self.input_frame.address_tip.config(text=f"Invalid URL. {self.input_presets[input_option_display]['example']}") diff --git a/src/sticker_convert/uploaders/xcode_imessage.py b/src/sticker_convert/uploaders/xcode_imessage.py index cec7f87..1809d7a 100755 --- a/src/sticker_convert/uploaders/xcode_imessage.py +++ b/src/sticker_convert/uploaders/xcode_imessage.py @@ -19,8 +19,14 @@ class XcodeImessageIconset: def __init__(self): self.iconset = {} - with open('ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json') as f: - dict = json.load(f) + if os.path.isdir('ios-message-stickers-template'): + with open('ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json') as f: + dict = json.load(f) + elif os.path.isfile('ios-message-stickers-template.zip'): + with zipfile.ZipFile('ios-message-stickers-template.zip', 'r') as f: + dict = json.loads(f.read('stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json').decode()) + else: + raise FileNotFoundError('ios-message-stickers-template not found') for i in dict['images']: filename = i['filename']