sticker-convert 2.11.8__tar.gz → 2.12.0__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 (125) hide show
  1. {sticker_convert-2.11.8/src/sticker_convert.egg-info → sticker_convert-2.12.0}/PKG-INFO +4 -5
  2. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/README.md +3 -3
  3. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/requirements.txt +0 -1
  4. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/converter.py +72 -0
  5. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/definitions.py +7 -0
  6. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/__init__.py +0 -0
  7. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_discord.py +0 -0
  8. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_kakao.py +63 -78
  9. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_viber.py +20 -6
  10. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/__init__.py +0 -0
  11. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
  12. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
  13. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
  14. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
  15. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
  16. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
  17. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
  18. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
  19. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
  20. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/gui_utils.py +0 -0
  21. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
  22. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
  23. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
  24. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/discord_get_auth_window.py +0 -0
  25. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
  26. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
  27. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
  28. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui_components/windows/viber_get_auth_window.py +0 -0
  29. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  30. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  31. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  32. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  33. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  34. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  35. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  36. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  37. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  38. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  39. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  40. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  41. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  42. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  43. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  44. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  45. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  46. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  47. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  48. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  49. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  50. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  51. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  52. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  53. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  54. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  55. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  56. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  57. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  58. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  59. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  60. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  61. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/emoji.json +0 -0
  62. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/help.json +0 -0
  63. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/input.json +1 -1
  64. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/memdump_windows.ps1 +0 -0
  65. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/output.json +0 -0
  66. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/__init__.py +0 -0
  67. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/upload_viber.py +13 -14
  68. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_discord_auth.py +0 -0
  69. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_kakao_auth.py +34 -4
  70. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_kakao_desktop_auth.py +1 -1
  71. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/telegram_api.py +0 -0
  72. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/telethon_setup.py +0 -0
  73. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/callback.py +0 -0
  74. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/chrome_remotedebug.py +78 -15
  75. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/emoji.py +0 -0
  76. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
  77. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/metadata_handler.py +1 -0
  78. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/media/codec_info.py +53 -6
  79. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
  80. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/process.py +0 -0
  81. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/url_detect.py +1 -3
  82. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/version.py +1 -1
  83. {sticker_convert-2.11.8 → sticker_convert-2.12.0/src/sticker_convert.egg-info}/PKG-INFO +4 -5
  84. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert.egg-info/requires.txt +0 -1
  85. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/tests/test_download.py +28 -0
  86. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/LICENSE +0 -0
  87. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/MANIFEST.in +0 -0
  88. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/pyproject.toml +0 -0
  89. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/setup.cfg +0 -0
  90. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/__init__.py +0 -0
  91. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/__main__.py +0 -0
  92. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/cli.py +0 -0
  93. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_base.py +0 -0
  94. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_line.py +0 -0
  95. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_signal.py +0 -0
  96. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  97. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/gui.py +0 -0
  98. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/job.py +0 -0
  99. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/job_option.py +0 -0
  100. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  101. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/appicon.icns +0 -0
  102. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/appicon.ico +0 -0
  103. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/appicon.png +0 -0
  104. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/compression.json +0 -0
  105. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/resources/memdump_linux.sh +0 -0
  106. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  107. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/upload_base.py +0 -0
  108. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  109. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  110. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
  111. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
  112. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
  113. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/auth/get_viber_auth.py +0 -0
  114. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/cache_store.py +0 -0
  115. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/json_manager.py +0 -0
  116. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/run_bin.py +0 -0
  117. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
  118. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
  119. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert/utils/media/format_verify.py +0 -0
  120. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
  121. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  122. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  123. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/src/sticker_convert.egg-info/top_level.txt +0 -0
  124. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/tests/test_compression.py +0 -0
  125. {sticker_convert-2.11.8 → sticker_convert-2.12.0}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sticker-convert
3
- Version: 2.11.8
3
+ Version: 2.12.0
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>
@@ -374,7 +374,6 @@ Requires-Dist: httpx~=0.28.1
374
374
  Requires-Dist: imagequant~=1.1.4
375
375
  Requires-Dist: memory-tempfile~=2.2.3
376
376
  Requires-Dist: mergedeep~=1.3.4
377
- Requires-Dist: mini-racer~=0.12.4
378
377
  Requires-Dist: numpy>=1.22.4
379
378
  Requires-Dist: Pillow~=11.1.0
380
379
  Requires-Dist: pyoxipng~=9.0.0
@@ -437,7 +436,7 @@ Dynamic: license-file
437
436
  | [Telegram](docs/guide_telegram.md) | ✅ (Require `token` or telethon) | ✅ (Require `token` & `user_id` or telethon or manually) |
438
437
  | [WhatsApp](docs/guide_whatsapp.md) | ⭕ (By Android or WhatsApp Web) | ⭕ (Create `.wastickers`, import by Sticker Maker) |
439
438
  | [Line](docs/guide_line.md) | ✅ | 🚫 (Need to submit for manual approval) |
440
- | [Kakao](docs/guide_kakao.md) | ✅ (Need 'share link' for animated) | 🚫 (Need to submit for manual approval) |
439
+ | [Kakao](docs/guide_kakao.md) | ✅ (Need 'auth_token' for animated) | 🚫 (Need to submit for manual approval) |
441
440
  | [Viber](docs/guide_viber.md) | ✅ | ✅ (Require `viber_auth`) |
442
441
  | [Discord](docs/guide_discord.md) | ✅ (Require `token`) | 🚫 |
443
442
  | [iMessage](docs/guide_imessage.md) | 🚫 | ⭕ (Create Xcode stickerpack project for sideload) |
@@ -462,7 +461,7 @@ Dynamic: license-file
462
461
  - For more information: https://github.com/doubleplusc/Line-sticker-downloader
463
462
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
464
463
  - Kakao
465
- - Download: Supported (e.g. `https://e.kakao.com/t/xxxxx` OR `kakaotalk://store/emoticon/4404400` OR `https://emoticon.kakao.com/items/xxxxx` OR `4404400`). It is rather complicated, learn more from [docs/guide_kakao.md](docs/guide_kakao.md)
464
+ - Download: Supported (e.g. `https://e.kakao.com/t/xxxxx` OR `https://emoticon.kakao.com/items/xxxxx` OR `4404400`). It is rather complicated, learn more from [docs/guide_kakao.md](docs/guide_kakao.md)
466
465
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
467
466
  - Viber
468
467
  - Download: Supported (e.g. `https://stickers.viber.com/pages/example` OR `https://stickers.viber.com/pages/custom-sticker-packs/example`)
@@ -550,7 +549,7 @@ Input options:
550
549
  OR https://line.me/S/sticker/1234/?lang=en OR line://shop/detail/1234 OR 1234)
551
550
  --download-kakao DOWNLOAD_KAKAO
552
551
  Download kakao stickers from a URL / ID as input
553
- (Example: https://e.kakao.com/t/xxxxx OR kakaotalk://store/emoticon/4404400
552
+ (Example: https://e.kakao.com/t/xxxxx
554
553
  OR https://emoticon.kakao.com/items/xxxxx OR 4404400)
555
554
  --download-viber DOWNLOAD_VIBER
556
555
  Download viber stickers from a URL as input
@@ -44,7 +44,7 @@
44
44
  | [Telegram](docs/guide_telegram.md) | ✅ (Require `token` or telethon) | ✅ (Require `token` & `user_id` or telethon or manually) |
45
45
  | [WhatsApp](docs/guide_whatsapp.md) | ⭕ (By Android or WhatsApp Web) | ⭕ (Create `.wastickers`, import by Sticker Maker) |
46
46
  | [Line](docs/guide_line.md) | ✅ | 🚫 (Need to submit for manual approval) |
47
- | [Kakao](docs/guide_kakao.md) | ✅ (Need 'share link' for animated) | 🚫 (Need to submit for manual approval) |
47
+ | [Kakao](docs/guide_kakao.md) | ✅ (Need 'auth_token' for animated) | 🚫 (Need to submit for manual approval) |
48
48
  | [Viber](docs/guide_viber.md) | ✅ | ✅ (Require `viber_auth`) |
49
49
  | [Discord](docs/guide_discord.md) | ✅ (Require `token`) | 🚫 |
50
50
  | [iMessage](docs/guide_imessage.md) | 🚫 | ⭕ (Create Xcode stickerpack project for sideload) |
@@ -69,7 +69,7 @@
69
69
  - For more information: https://github.com/doubleplusc/Line-sticker-downloader
70
70
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
71
71
  - Kakao
72
- - Download: Supported (e.g. `https://e.kakao.com/t/xxxxx` OR `kakaotalk://store/emoticon/4404400` OR `https://emoticon.kakao.com/items/xxxxx` OR `4404400`). It is rather complicated, learn more from [docs/guide_kakao.md](docs/guide_kakao.md)
72
+ - Download: Supported (e.g. `https://e.kakao.com/t/xxxxx` OR `https://emoticon.kakao.com/items/xxxxx` OR `4404400`). It is rather complicated, learn more from [docs/guide_kakao.md](docs/guide_kakao.md)
73
73
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
74
74
  - Viber
75
75
  - Download: Supported (e.g. `https://stickers.viber.com/pages/example` OR `https://stickers.viber.com/pages/custom-sticker-packs/example`)
@@ -157,7 +157,7 @@ Input options:
157
157
  OR https://line.me/S/sticker/1234/?lang=en OR line://shop/detail/1234 OR 1234)
158
158
  --download-kakao DOWNLOAD_KAKAO
159
159
  Download kakao stickers from a URL / ID as input
160
- (Example: https://e.kakao.com/t/xxxxx OR kakaotalk://store/emoticon/4404400
160
+ (Example: https://e.kakao.com/t/xxxxx
161
161
  OR https://emoticon.kakao.com/items/xxxxx OR 4404400)
162
162
  --download-viber DOWNLOAD_VIBER
163
163
  Download viber stickers from a URL as input
@@ -9,7 +9,6 @@ httpx~=0.28.1
9
9
  imagequant~=1.1.4
10
10
  memory-tempfile~=2.2.3
11
11
  mergedeep~=1.3.4
12
- mini-racer~=0.12.4
13
12
  numpy>=1.22.4
14
13
  Pillow~=11.1.0
15
14
  pyoxipng~=9.0.0
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ import json
2
3
  import os
3
4
  from fractions import Fraction
4
5
  from io import BytesIO
@@ -7,12 +8,14 @@ from pathlib import Path
7
8
  from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Union, cast
8
9
 
9
10
  import numpy as np
11
+ from bs4 import BeautifulSoup
10
12
  from PIL import Image
11
13
  from PIL import __version__ as PillowVersion
12
14
  from PIL import features
13
15
 
14
16
  from sticker_convert.job_option import CompOption
15
17
  from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
18
+ from sticker_convert.utils.chrome_remotedebug import CRD
16
19
  from sticker_convert.utils.files.cache_store import CacheStore
17
20
  from sticker_convert.utils.media.codec_info import CodecInfo, rounding
18
21
  from sticker_convert.utils.media.format_verify import FormatVerify
@@ -423,9 +426,78 @@ class StickerConvert:
423
426
  # ffmpeg do not support webp decoding (yet)
424
427
  # ffmpeg could fail to decode apng if file is buggy
425
428
  self._frames_import_pillow()
429
+ elif suffix == ".svg":
430
+ self._frames_import_svg()
426
431
  else:
427
432
  self._frames_import_pyav()
428
433
 
434
+ def _frames_import_svg(self) -> None:
435
+ width = self.codec_info_orig.res[0]
436
+ height = self.codec_info_orig.res[1]
437
+
438
+ chrome_path = CRD.get_chrome_path()
439
+ args = [
440
+ "--headless",
441
+ "--disable-extensions",
442
+ "--disable-infobars",
443
+ "--disable-gpu",
444
+ "--disable-gpu-rasterization",
445
+ "--hide-scrollbars",
446
+ f"--window-size={width + 100},{height + 100}",
447
+ "about:blank",
448
+ ]
449
+ if chrome_path is None:
450
+ raise RuntimeError("[F] Chrome/Chromium required for importing svg")
451
+ self.cb.put("[W] Importing SVG takes long time")
452
+
453
+ if isinstance(self.in_f, bytes):
454
+ svg = self.in_f.decode()
455
+ else:
456
+ with open(self.in_f) as f:
457
+ svg = f.read()
458
+ soup = BeautifulSoup(svg, "html.parser")
459
+ svg_tag = soup.find_all("svg")[0]
460
+
461
+ if svg_tag.get("width") is None:
462
+ svg_tag["width"] = width
463
+ if svg_tag.get("height") is None:
464
+ svg_tag["height"] = height
465
+ svg = str(soup)
466
+
467
+ crd = None
468
+ try:
469
+ crd = CRD(chrome_path, args=args)
470
+ crd.connect(-1)
471
+ crd.open_html_str(svg)
472
+ crd.set_transparent_bg()
473
+ crd.exec_js('svg = document.getElementsByTagName("svg")[0]')
474
+ x = json.loads(crd.exec_js("svg.getBoundingClientRect().x"))["result"][
475
+ "result"
476
+ ]["value"]
477
+ y = json.loads(crd.exec_js("svg.getBoundingClientRect().y"))["result"][
478
+ "result"
479
+ ]["value"]
480
+ clip = {"x": x, "y": y, "width": width, "height": height, "scale": 1}
481
+
482
+ if self.codec_info_orig.fps > 0:
483
+ crd.exec_js("svg.pauseAnimations()")
484
+ for i in range(self.codec_info_orig.frames):
485
+ curr_time = (
486
+ i
487
+ / self.codec_info_orig.frames
488
+ * self.codec_info_orig.duration
489
+ / 1000
490
+ )
491
+ crd.exec_js(f"svg.setCurrentTime({curr_time})")
492
+ self.frames_raw.append(
493
+ np.asarray(crd.screenshot(clip).convert("RGBA"))
494
+ )
495
+ else:
496
+ self.frames_raw.append(np.asarray(crd.screenshot(clip).convert("RGBA")))
497
+ finally:
498
+ if crd is not None:
499
+ crd.close()
500
+
429
501
  def _frames_import_pillow(self) -> None:
430
502
  with Image.open(self.in_f) as im:
431
503
  # Note: im.convert("RGBA") would return rgba image of current frame only
@@ -82,3 +82,10 @@ def get_config_dir() -> Path:
82
82
 
83
83
  # Directory for saving configs
84
84
  CONFIG_DIR = get_config_dir()
85
+
86
+ # When importing SVG, import at this fps
87
+ SVG_SAMPLE_FPS = 30
88
+
89
+ # If width and height not set in SVG tag, import at this dimension
90
+ SVG_DEFAULT_WIDTH = 1024
91
+ SVG_DEFAULT_HEIGHT = 1024
@@ -4,12 +4,10 @@ from __future__ import annotations
4
4
  import itertools
5
5
  import json
6
6
  from pathlib import Path
7
- from typing import Any, List, Optional, Tuple, cast
7
+ from typing import Any, List, Optional, Tuple
8
8
  from urllib.parse import urlparse
9
9
 
10
10
  import requests
11
- from bs4 import BeautifulSoup
12
- from py_mini_racer import MiniRacer
13
11
 
14
12
  from sticker_convert.downloaders.download_base import DownloadBase
15
13
  from sticker_convert.job_option import CredOption, InputOption
@@ -17,34 +15,32 @@ from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
17
15
  from sticker_convert.utils.files.metadata_handler import MetadataHandler
18
16
  from sticker_convert.utils.media.decrypt_kakao import DecryptKakao
19
17
 
20
- JSINJECT = """
21
- class osclass {
22
- android = true;
23
- }
24
- class uaclass {
25
- os = new osclass();
26
- }
27
- class util {
28
- static userAgent() {
29
- return new uaclass();
30
- }
31
- }
32
- class daumtools {
33
- static web2app(dataDict) {
34
- return dataDict['urlScheme'];
35
- }
36
- }
37
- class document {
38
- static querySelectorAll(selectors) {
39
- return [];
40
- }
41
- }
42
- """
43
-
44
18
 
45
19
  class MetadataKakao:
46
20
  @staticmethod
47
- def get_item_code(title_ko: str, auth_token: str) -> Optional[str]:
21
+ def get_item_code_from_hash(hash: str, auth_token: str) -> Optional[str]:
22
+ headers = {
23
+ "Authorization": auth_token,
24
+ }
25
+
26
+ data = {"hashedItemCode": hash}
27
+
28
+ response = requests.post(
29
+ "https://talk-pilsner.kakao.com/emoticon/api/store/v3/item-code-by-hash",
30
+ headers=headers,
31
+ data=data,
32
+ )
33
+
34
+ if response.status_code != 200:
35
+ return None
36
+
37
+ response_json = json.loads(response.text)
38
+ item_code = response_json["itemCode"]
39
+
40
+ return item_code
41
+
42
+ @staticmethod
43
+ def get_item_code_from_title(title_ko: str, auth_token: str) -> Optional[str]:
48
44
  headers = {
49
45
  "Authorization": auth_token,
50
46
  }
@@ -112,66 +108,53 @@ class DownloadKakao(DownloadBase):
112
108
  self.pack_info_unauthed: Optional[dict[str, Any]] = None
113
109
  self.pack_info_authed: Optional[dict[str, Any]] = None
114
110
 
115
- def get_info_from_share_link(self, url: str) -> Tuple[Optional[str], Optional[str]]:
116
- headers = {"User-Agent": "Android"}
117
-
118
- response = requests.get(url, headers=headers)
119
- soup = BeautifulSoup(response.content.decode("utf-8", "ignore"), "html.parser")
120
-
121
- pack_title_tag = soup.find("title") # type: ignore
122
- if not pack_title_tag:
123
- return None, None
124
-
125
- pack_title: str = pack_title_tag.string # type: ignore
126
-
127
- js = ""
128
- for script_tag in soup.find_all("script"):
129
- js = script_tag.string
130
- if js and "daumtools.web2app" in js:
131
- break
132
- if "daumtools.web2app" not in js:
133
- return None, None
134
-
135
- js = JSINJECT + js
136
-
137
- ctx = MiniRacer()
138
- kakao_url = cast(str, ctx.eval(js))
139
- item_code = urlparse(kakao_url).path.split("/")[2]
140
-
141
- # Share link redirect to preview link if use desktop headers
142
- # This allows us to find pack author
143
- headers_desktop = {"User-Agent": "Chrome"}
144
-
145
- response = requests.get(url, headers=headers_desktop, allow_redirects=True)
146
- response.url
147
-
148
- pack_title_url = urlparse(response.url).path.split("/")[-1]
149
- pack_info_unauthed = MetadataKakao.get_pack_info_unauthed(pack_title_url)
150
- if pack_info_unauthed:
151
- self.author = pack_info_unauthed["result"]["artist"]
152
-
153
- return pack_title, item_code
154
-
155
111
  def download_stickers_kakao(self) -> Tuple[int, int]:
156
112
  self.auth_token = None
157
113
  if self.opt_cred:
158
114
  self.auth_token = self.opt_cred.kakao_auth_token
159
115
 
160
116
  if urlparse(self.url).netloc == "emoticon.kakao.com":
161
- self.pack_title, item_code = self.get_info_from_share_link(self.url)
117
+ item_code = None
118
+ if self.auth_token is not None:
119
+ hash = urlparse(self.url).path.split("/")[-1]
120
+ item_code = MetadataKakao.get_item_code_from_hash(hash, self.auth_token)
162
121
 
163
- if item_code:
164
- return self.download_animated(item_code)
165
- self.cb.put("Download failed: Cannot download metadata for sticker pack")
166
- return 0, 0
122
+ # Share link redirect to preview link if use desktop headers
123
+ # This allows us to find pack author
124
+ headers_desktop = {"User-Agent": "Chrome"}
125
+
126
+ r = requests.get(self.url, headers=headers_desktop, allow_redirects=True)
127
+
128
+ self.pack_title = urlparse(r.url).path.split("/")[-1]
129
+ pack_info_unauthed = MetadataKakao.get_pack_info_unauthed(self.pack_title)
130
+ if pack_info_unauthed is None:
131
+ self.cb.put(
132
+ "Download failed: Cannot download metadata for sticker pack"
133
+ )
134
+ return 0, 0
135
+
136
+ self.author = pack_info_unauthed["result"]["artist"]
137
+ thumbnail_urls = pack_info_unauthed["result"]["thumbnailUrls"]
167
138
 
168
- if self.url.isnumeric() or self.url.startswith("kakaotalk://store/emoticon/"):
169
- item_code = self.url.replace("kakaotalk://store/emoticon/", "")
139
+ if item_code is None:
140
+ if self.auth_token is None:
141
+ self.cb.put(
142
+ "Warning: Downloading animated sticker requires auth_token"
143
+ )
144
+ else:
145
+ self.cb.put(
146
+ "Warning: auth_token invalid, cannot download animated sticker"
147
+ )
148
+ self.cb.put("Downloading static stickers...")
149
+ self.download_static(thumbnail_urls)
150
+ else:
151
+ return self.download_animated(item_code)
170
152
 
153
+ if self.url.isnumeric():
171
154
  self.pack_title = None
172
155
  if self.auth_token:
173
156
  self.pack_info_authed = MetadataKakao.get_pack_info_authed(
174
- item_code, self.auth_token
157
+ self.url, self.auth_token
175
158
  )
176
159
  if self.pack_info_authed:
177
160
  self.pack_title = self.pack_info_authed["itemUnitInfo"][0]["title"]
@@ -182,7 +165,7 @@ class DownloadKakao(DownloadBase):
182
165
  )
183
166
  self.cb.put("Continuing without getting pack_title")
184
167
 
185
- return self.download_animated(item_code)
168
+ return self.download_animated(self.url)
186
169
 
187
170
  if urlparse(self.url).netloc == "e.kakao.com":
188
171
  self.pack_title = urlparse(self.url).path.split("/")[-1]
@@ -201,7 +184,9 @@ class DownloadKakao(DownloadBase):
201
184
  thumbnail_urls = self.pack_info_unauthed["result"]["thumbnailUrls"]
202
185
 
203
186
  if self.auth_token:
204
- item_code = MetadataKakao.get_item_code(title_ko, self.auth_token)
187
+ item_code = MetadataKakao.get_item_code_from_title(
188
+ title_ko, self.auth_token
189
+ )
205
190
  if item_code:
206
191
  return self.download_animated(item_code)
207
192
  msg = "Warning: Cannot get item code.\n"
@@ -19,7 +19,7 @@ class DownloadViber(DownloadBase):
19
19
  # def __init__(self, *args: Any, **kwargs: Any) -> None:
20
20
  # super().__init__(*args, **kwargs)
21
21
 
22
- def get_pack_info(self, url: str) -> Optional[Tuple[str, str]]:
22
+ def get_pack_info(self, url: str) -> Optional[Tuple[str, str, str]]:
23
23
  r = requests.get(url, allow_redirects=True)
24
24
  soup = BeautifulSoup(r.text, "html.parser")
25
25
 
@@ -41,10 +41,13 @@ class DownloadViber(DownloadBase):
41
41
  title = pack_dict["title"]
42
42
  first_sticker_url = cast(str, pack_dict["stickerFirstItemUrl"])
43
43
  zip_url = "/".join(first_sticker_url.split("/")[:-1]) + ".zip"
44
+ pack_id = pack_dict["id"].split(".")[-1]
44
45
 
45
- return title, zip_url
46
+ return title, zip_url, pack_id
46
47
 
47
- def decompress(self, zip_file: bytes) -> int:
48
+ def decompress(
49
+ self, zip_file: bytes, exts: Optional[Tuple[str, ...]] = None
50
+ ) -> int:
48
51
  with zipfile.ZipFile(BytesIO(zip_file)) as zf:
49
52
  self.cb.put("Unzipping...")
50
53
 
@@ -58,9 +61,14 @@ class DownloadViber(DownloadBase):
58
61
  )
59
62
 
60
63
  for sticker in zf_files:
64
+ ext = Path(sticker).suffix
65
+ if "frame" in sticker or ".db" in sticker or sticker.endswith("/"):
66
+ continue
67
+ if exts is not None and ext not in exts:
68
+ continue
61
69
  num = sticker.split(".")[0][-2:].zfill(3)
62
70
  data = zf.read(sticker)
63
- ext = Path(sticker).suffix
71
+
64
72
  self.cb.put(f"Read {sticker}")
65
73
 
66
74
  out_path = Path(self.out_dir, num + ext)
@@ -76,10 +84,16 @@ class DownloadViber(DownloadBase):
76
84
  if pack_info is None:
77
85
  self.cb.put("Download failed: Cannot get pack info")
78
86
  return 0, 0
79
- title, zip_url = pack_info
87
+ title, zip_url, pack_id = pack_info
80
88
 
89
+ anim_url = f"https://content.cdn.viber.com/stickers/ASVG/{pack_id}.zip"
90
+ anim_file = self.download_file(anim_url)
81
91
  zip_file = self.download_file(zip_url)
82
- count = self.decompress(zip_file)
92
+ if anim_file:
93
+ count = self.decompress(anim_file, (".svg",))
94
+ count += self.decompress(zip_file, (".mp3",))
95
+ else:
96
+ count = self.decompress(zip_file, (".mp3", ".png"))
83
97
 
84
98
  MetadataHandler.set_metadata(self.out_dir, title=title)
85
99
 
@@ -52,7 +52,7 @@
52
52
  "kakao": {
53
53
  "full_name": "Download from Kakao",
54
54
  "help": "Download kakao stickers from a URL / ID as input",
55
- "example": "Example: https://e.kakao.com/t/xxxxx OR kakaotalk://store/emoticon/4404400\nOR https://emoticon.kakao.com/items/xxxxx OR 4404400",
55
+ "example": "Example: https://e.kakao.com/t/xxxxx \nOR https://emoticon.kakao.com/items/xxxxx OR 4404400",
56
56
  "address_lbls": "URL address / ID",
57
57
  "metadata_provides": {
58
58
  "title": true,