sticker-convert 2.12.3__tar.gz → 2.13.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 (127) hide show
  1. {sticker_convert-2.12.3/src/sticker_convert.egg-info → sticker_convert-2.13.0}/PKG-INFO +35 -27
  2. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/README.md +28 -20
  3. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/requirements.txt +6 -6
  4. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/cli.py +3 -0
  5. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/converter.py +61 -54
  6. sticker_convert-2.13.0/src/sticker_convert/downloaders/download_band.py +110 -0
  7. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_kakao.py +84 -22
  8. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui.py +14 -3
  9. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +17 -0
  10. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/discord_get_auth_window.py +3 -3
  11. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +2 -6
  12. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +3 -3
  13. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/viber_get_auth_window.py +1 -1
  14. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/job.py +6 -0
  15. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/job_option.py +2 -0
  16. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/compression.json +47 -0
  17. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/help.json +1 -0
  18. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/input.json +10 -0
  19. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/memdump_linux.sh +0 -1
  20. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_discord_auth.py +1 -1
  21. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_kakao_desktop_auth.py +119 -35
  22. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_signal_auth.py +2 -2
  23. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_viber_auth.py +1 -1
  24. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/telethon_setup.py +3 -1
  25. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/chrome_remotedebug.py +25 -13
  26. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/media/codec_info.py +1 -1
  27. sticker_convert-2.13.0/src/sticker_convert/utils/singletons.py +18 -0
  28. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/url_detect.py +3 -0
  29. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/version.py +1 -1
  30. {sticker_convert-2.12.3 → sticker_convert-2.13.0/src/sticker_convert.egg-info}/PKG-INFO +35 -27
  31. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert.egg-info/SOURCES.txt +2 -0
  32. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert.egg-info/requires.txt +6 -6
  33. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/tests/test_download.py +32 -2
  34. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/LICENSE +0 -0
  35. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/MANIFEST.in +0 -0
  36. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/pyproject.toml +0 -0
  37. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/setup.cfg +0 -0
  38. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/__init__.py +0 -0
  39. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/__main__.py +0 -0
  40. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/definitions.py +0 -0
  41. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/__init__.py +0 -0
  42. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_base.py +0 -0
  43. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_discord.py +0 -0
  44. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_line.py +0 -0
  45. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_signal.py +0 -0
  46. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  47. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/downloaders/download_viber.py +0 -0
  48. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/__init__.py +0 -0
  49. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
  50. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
  51. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
  52. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
  53. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
  54. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
  55. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
  56. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
  57. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
  58. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/gui_utils.py +0 -0
  59. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
  60. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
  61. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
  62. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  63. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  64. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  65. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  66. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  67. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  68. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  69. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  70. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  71. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  72. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  73. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  74. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  75. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  76. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  77. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  78. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  79. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  80. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  81. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  82. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  83. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  84. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  85. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  86. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  87. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  88. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  89. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  90. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  91. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  92. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  93. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  94. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  95. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/appicon.icns +0 -0
  96. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/appicon.ico +0 -0
  97. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/appicon.png +0 -0
  98. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/emoji.json +0 -0
  99. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/memdump_windows.ps1 +0 -0
  100. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/resources/output.json +0 -0
  101. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/__init__.py +0 -0
  102. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  103. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/upload_base.py +0 -0
  104. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  105. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  106. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/upload_viber.py +0 -0
  107. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
  108. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
  109. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
  110. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/auth/telegram_api.py +0 -0
  111. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/callback.py +0 -0
  112. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/emoji.py +0 -0
  113. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/cache_store.py +0 -0
  114. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/json_manager.py +0 -0
  115. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
  116. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
  117. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/run_bin.py +0 -0
  118. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
  119. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
  120. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
  121. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/media/format_verify.py +0 -0
  122. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert/utils/process.py +0 -0
  123. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  124. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  125. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/src/sticker_convert.egg-info/top_level.txt +0 -0
  126. {sticker_convert-2.12.3 → sticker_convert-2.13.0}/tests/test_compression.py +0 -0
  127. {sticker_convert-2.12.3 → sticker_convert-2.13.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.12.3
3
+ Version: 2.13.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>
@@ -365,8 +365,8 @@ Description-Content-Type: text/markdown
365
365
  License-File: LICENSE
366
366
  Requires-Dist: aiolimiter~=1.2.1
367
367
  Requires-Dist: anyio~=4.9.0
368
- Requires-Dist: apngasm_python~=1.3.1
369
- Requires-Dist: av~=13.1.0
368
+ Requires-Dist: apngasm_python~=1.3.2
369
+ Requires-Dist: av>=13.1.0
370
370
  Requires-Dist: beautifulsoup4~=4.13.3
371
371
  Requires-Dist: cryptg~=0.5.0.post0
372
372
  Requires-Dist: rookiepy~=0.5.6
@@ -375,14 +375,14 @@ Requires-Dist: imagequant~=1.1.4
375
375
  Requires-Dist: memory-tempfile~=2.2.3
376
376
  Requires-Dist: mergedeep~=1.3.4
377
377
  Requires-Dist: numpy>=1.22.4
378
- Requires-Dist: Pillow~=11.1.0
379
- Requires-Dist: pybrowsers~=0.7.0
380
- Requires-Dist: pyoxipng~=9.0.0
378
+ Requires-Dist: Pillow~=11.2.1
379
+ Requires-Dist: pybrowsers~=0.8.0
380
+ Requires-Dist: pyoxipng~=9.1.0
381
381
  Requires-Dist: python-telegram-bot~=22.0
382
382
  Requires-Dist: psutil~=7.0.0
383
383
  Requires-Dist: PyMemoryEditor~=1.5.22
384
384
  Requires-Dist: requests~=2.32.3
385
- Requires-Dist: rlottie_python~=1.3.6
385
+ Requires-Dist: rlottie_python~=1.3.7
386
386
  Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
387
387
  Requires-Dist: socksio~=1.0.0
388
388
  Requires-Dist: telethon~=1.39.0
@@ -397,7 +397,7 @@ Dynamic: license-file
397
397
 
398
398
  - A python script for creating, downloading, converting+compressing and uploading stickers from multiple instant messaging applications.
399
399
  - With GUI and CLI that runs on Windows, MacOS and Linux
400
- - Currently supports Signal, Telegram, WhatsApp (Create .wastickers), Line (Download only), Kakao (Download only), Viber, Discord (Download only), iMessage (Create Xcode sticker pack project)
400
+ - Currently supports Signal, Telegram, WhatsApp (Create .wastickers), Line (Download only), Kakao (Download only), Naver Band (Download only), Viber, Discord (Download only), iMessage (Create Xcode sticker pack project)
401
401
  - Supports static and animated stickers, with transparency support
402
402
 
403
403
  ## Downloads
@@ -438,6 +438,7 @@ Dynamic: license-file
438
438
  | [WhatsApp](docs/guide_whatsapp.md) | ⭕ (By Android or WhatsApp Web) | ⭕ (Create `.wastickers`, import by Sticker Maker) |
439
439
  | [Line](docs/guide_line.md) | ✅ | 🚫 (Need to submit for manual approval) |
440
440
  | [Kakao](docs/guide_kakao.md) | ✅ (Need 'auth_token' for animated) | 🚫 (Need to submit for manual approval) |
441
+ | [Band](docs/guide_band.md) | ✅ | 🚫 (Need to submit for manual approval) |
441
442
  | [Viber](docs/guide_viber.md) | ✅ | ✅ (Require `viber_auth`) |
442
443
  | [Discord](docs/guide_discord.md) | ✅ (Require `token`) | 🚫 |
443
444
  | [iMessage](docs/guide_imessage.md) | 🚫 | ⭕ (Create Xcode stickerpack project for sideload) |
@@ -464,6 +465,9 @@ Dynamic: license-file
464
465
  - Kakao
465
466
  - 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
467
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
468
+ - Band
469
+ - Download: Supported (e.g. `https://www.band.us/sticker/xxxx` OR 2535). Learn how to get share link from [docs/guide_band.md](docs/guide_band.md)
470
+ - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
467
471
  - Viber
468
472
  - Download: Supported (e.g. `https://stickers.viber.com/pages/example` OR `https://stickers.viber.com/pages/custom-sticker-packs/example`)
469
473
  - Upload: Supported. Viber authentication data required for uploading Viber stickers, which could be fetched from Viber Desktop application automatically.
@@ -490,30 +494,27 @@ Dynamic: license-file
490
494
  To run in CLI mode, pass on any arguments
491
495
 
492
496
  ```
493
- usage: sticker-convert.py [-h] [--version] [--no-confirm] [--no-progress] [--custom-presets CUSTOM_PRESETS]
494
- [--input-dir INPUT_DIR]
495
- [--download-auto DOWNLOAD_AUTO | --download-signal DOWNLOAD_SIGNAL | --download-telegram DOWNLOAD_TELEGRAM | --download-telegram-telethon DOWNLOAD_TELEGRAM_TELETHON | --download-line DOWNLOAD_LINE | --download-kakao DOWNLOAD_KAKAO | --download-viber DOWNLOAD_VIBER | --download-discord DOWNLOAD_DISCORD | --download-discord-emoji DOWNLOAD_DISCORD_EMOJI]
497
+ usage: sticker-convert.py [-h] [--version] [--no-confirm] [--no-progress] [--custom-presets CUSTOM_PRESETS] [--input-dir INPUT_DIR]
498
+ [--download-auto DOWNLOAD_AUTO | --download-signal DOWNLOAD_SIGNAL | --download-telegram DOWNLOAD_TELEGRAM | --download-telegram-telethon DOWNLOAD_TELEGRAM_TELETHON | --download-line DOWNLOAD_LINE | --download-kakao DOWNLOAD_KAKAO | --download-band DOWNLOAD_BAND | --download-viber DOWNLOAD_VIBER | --download-discord DOWNLOAD_DISCORD | --download-discord-emoji DOWNLOAD_DISCORD_EMOJI]
496
499
  [--output-dir OUTPUT_DIR] [--author AUTHOR] [--title TITLE]
497
500
  [--export-signal | --export-telegram | --export-telegram-emoji | --export-telegram-telethon | --export-telegram-emoji-telethon | --export-viber | --export-whatsapp | --export-imessage]
498
501
  [--no-compress]
499
502
  [--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,viber,discord,discord_emoji,imessage_small,imessage_medium,imessage_large,custom}]
500
- [--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX]
501
- [--fps-power FPS_POWER] [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN]
502
- [--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
503
- [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX] [--quality-power QUALITY_POWER]
504
- [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
503
+ [--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX] [--fps-power FPS_POWER]
504
+ [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN] [--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN]
505
+ [--res-h-max RES_H_MAX] [--res-power RES_POWER] [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX]
506
+ [--quality-power QUALITY_POWER] [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
505
507
  [--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--padding-percent PADDING_PERCENT]
506
- [--bg-color BG_COLOR] [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX]
507
- [--vid-format VID_FORMAT] [--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER]
508
- [--quantize-method QUANTIZE_METHOD] [--cache-dir CACHE_DIR] [--default-emoji DEFAULT_EMOJI]
509
- [--signal-uuid SIGNAL_UUID] [--signal-password SIGNAL_PASSWORD] [--signal-get-auth]
510
- [--telegram-token TELEGRAM_TOKEN] [--telegram-userid TELEGRAM_USERID] [--telethon-setup]
511
- [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth] [--kakao-get-auth-desktop]
512
- [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
508
+ [--bg-color BG_COLOR] [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
509
+ [--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER] [--quantize-method QUANTIZE_METHOD]
510
+ [--cache-dir CACHE_DIR] [--chromium-path CHROMIUM_PATH] [--default-emoji DEFAULT_EMOJI] [--signal-uuid SIGNAL_UUID]
511
+ [--signal-password SIGNAL_PASSWORD] [--signal-get-auth] [--telegram-token TELEGRAM_TOKEN]
512
+ [--telegram-userid TELEGRAM_USERID] [--telethon-setup] [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth]
513
+ [--kakao-get-auth-desktop] [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
513
514
  [--kakao-password KAKAO_PASSWORD] [--kakao-country-code KAKAO_COUNTRY_CODE]
514
- [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth] [--line-cookies LINE_COOKIES]
515
- [--viber-auth VIBER_AUTH] [--viber-get-auth VIBER_GET_AUTH] [--viber-bin-path VIBER_BIN_PATH]
516
- [--discord-get-auth] [--discord-token DISCORD_TOKEN] [--save-cred]
515
+ [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth] [--line-cookies LINE_COOKIES] [--viber-auth VIBER_AUTH]
516
+ [--viber-get-auth VIBER_GET_AUTH] [--viber-bin-path VIBER_BIN_PATH] [--discord-get-auth]
517
+ [--discord-token DISCORD_TOKEN] [--save-cred]
517
518
 
518
519
  CLI for stickers-convert
519
520
 
@@ -552,6 +553,9 @@ Input options:
552
553
  Download kakao stickers from a URL / ID as input
553
554
  (Example: https://e.kakao.com/t/xxxxx
554
555
  OR https://emoticon.kakao.com/items/xxxxx OR 4404400)
556
+ --download-band DOWNLOAD_BAND
557
+ Download Naver Band stickers from a URL / ID as input
558
+ (Example: https://www.band.us/sticker/xxxx OR 2535)
555
559
  --download-viber DOWNLOAD_VIBER
556
560
  Download viber stickers from a URL as input
557
561
  (Example: https://stickers.viber.com/pages/example
@@ -659,6 +663,10 @@ Compression options:
659
663
  --cache-dir CACHE_DIR
660
664
  Set custom cache directory.
661
665
  Useful for debugging, or speed up conversion if cache_dir is on RAM disk.
666
+ --chromium-path CHROMIUM_PATH
667
+ Set Chromium(-based)/Chrome browser path.
668
+ Required for converting from SVG files.
669
+ Leave blank to auto detect
662
670
  --default-emoji DEFAULT_EMOJI
663
671
  Set the default emoji for uploading Signal and Telegram sticker packs.
664
672
 
@@ -885,5 +893,5 @@ See [docs/TODO.md](docs/TODO.md)
885
893
  - Banner generated from [GitHub Socialify](https://socialify.git.ci/)
886
894
 
887
895
  ## DISCLAIMER
888
- - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Viber, Discord, iMessage or Sticker Maker.
896
+ - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Naver Band, Viber, Discord, iMessage or Sticker Maker.
889
897
  - The author of this repo is NOT repsonsible for any legal consequences and loss incurred from using this repo.
@@ -4,7 +4,7 @@
4
4
 
5
5
  - A python script for creating, downloading, converting+compressing and uploading stickers from multiple instant messaging applications.
6
6
  - With GUI and CLI that runs on Windows, MacOS and Linux
7
- - Currently supports Signal, Telegram, WhatsApp (Create .wastickers), Line (Download only), Kakao (Download only), Viber, Discord (Download only), iMessage (Create Xcode sticker pack project)
7
+ - Currently supports Signal, Telegram, WhatsApp (Create .wastickers), Line (Download only), Kakao (Download only), Naver Band (Download only), Viber, Discord (Download only), iMessage (Create Xcode sticker pack project)
8
8
  - Supports static and animated stickers, with transparency support
9
9
 
10
10
  ## Downloads
@@ -45,6 +45,7 @@
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
47
  | [Kakao](docs/guide_kakao.md) | ✅ (Need 'auth_token' for animated) | 🚫 (Need to submit for manual approval) |
48
+ | [Band](docs/guide_band.md) | ✅ | 🚫 (Need to submit for manual approval) |
48
49
  | [Viber](docs/guide_viber.md) | ✅ | ✅ (Require `viber_auth`) |
49
50
  | [Discord](docs/guide_discord.md) | ✅ (Require `token`) | 🚫 |
50
51
  | [iMessage](docs/guide_imessage.md) | 🚫 | ⭕ (Create Xcode stickerpack project for sideload) |
@@ -71,6 +72,9 @@
71
72
  - Kakao
72
73
  - 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
74
  - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
75
+ - Band
76
+ - Download: Supported (e.g. `https://www.band.us/sticker/xxxx` OR 2535). Learn how to get share link from [docs/guide_band.md](docs/guide_band.md)
77
+ - Upload: Not supported. You need to manually submit sticker pack for approval before you can use in app.
74
78
  - Viber
75
79
  - Download: Supported (e.g. `https://stickers.viber.com/pages/example` OR `https://stickers.viber.com/pages/custom-sticker-packs/example`)
76
80
  - Upload: Supported. Viber authentication data required for uploading Viber stickers, which could be fetched from Viber Desktop application automatically.
@@ -97,30 +101,27 @@
97
101
  To run in CLI mode, pass on any arguments
98
102
 
99
103
  ```
100
- usage: sticker-convert.py [-h] [--version] [--no-confirm] [--no-progress] [--custom-presets CUSTOM_PRESETS]
101
- [--input-dir INPUT_DIR]
102
- [--download-auto DOWNLOAD_AUTO | --download-signal DOWNLOAD_SIGNAL | --download-telegram DOWNLOAD_TELEGRAM | --download-telegram-telethon DOWNLOAD_TELEGRAM_TELETHON | --download-line DOWNLOAD_LINE | --download-kakao DOWNLOAD_KAKAO | --download-viber DOWNLOAD_VIBER | --download-discord DOWNLOAD_DISCORD | --download-discord-emoji DOWNLOAD_DISCORD_EMOJI]
104
+ usage: sticker-convert.py [-h] [--version] [--no-confirm] [--no-progress] [--custom-presets CUSTOM_PRESETS] [--input-dir INPUT_DIR]
105
+ [--download-auto DOWNLOAD_AUTO | --download-signal DOWNLOAD_SIGNAL | --download-telegram DOWNLOAD_TELEGRAM | --download-telegram-telethon DOWNLOAD_TELEGRAM_TELETHON | --download-line DOWNLOAD_LINE | --download-kakao DOWNLOAD_KAKAO | --download-band DOWNLOAD_BAND | --download-viber DOWNLOAD_VIBER | --download-discord DOWNLOAD_DISCORD | --download-discord-emoji DOWNLOAD_DISCORD_EMOJI]
103
106
  [--output-dir OUTPUT_DIR] [--author AUTHOR] [--title TITLE]
104
107
  [--export-signal | --export-telegram | --export-telegram-emoji | --export-telegram-telethon | --export-telegram-emoji-telethon | --export-viber | --export-whatsapp | --export-imessage]
105
108
  [--no-compress]
106
109
  [--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,viber,discord,discord_emoji,imessage_small,imessage_medium,imessage_large,custom}]
107
- [--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX]
108
- [--fps-power FPS_POWER] [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN]
109
- [--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
110
- [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX] [--quality-power QUALITY_POWER]
111
- [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
110
+ [--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX] [--fps-power FPS_POWER]
111
+ [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN] [--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN]
112
+ [--res-h-max RES_H_MAX] [--res-power RES_POWER] [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX]
113
+ [--quality-power QUALITY_POWER] [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
112
114
  [--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--padding-percent PADDING_PERCENT]
113
- [--bg-color BG_COLOR] [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX]
114
- [--vid-format VID_FORMAT] [--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER]
115
- [--quantize-method QUANTIZE_METHOD] [--cache-dir CACHE_DIR] [--default-emoji DEFAULT_EMOJI]
116
- [--signal-uuid SIGNAL_UUID] [--signal-password SIGNAL_PASSWORD] [--signal-get-auth]
117
- [--telegram-token TELEGRAM_TOKEN] [--telegram-userid TELEGRAM_USERID] [--telethon-setup]
118
- [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth] [--kakao-get-auth-desktop]
119
- [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
115
+ [--bg-color BG_COLOR] [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
116
+ [--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER] [--quantize-method QUANTIZE_METHOD]
117
+ [--cache-dir CACHE_DIR] [--chromium-path CHROMIUM_PATH] [--default-emoji DEFAULT_EMOJI] [--signal-uuid SIGNAL_UUID]
118
+ [--signal-password SIGNAL_PASSWORD] [--signal-get-auth] [--telegram-token TELEGRAM_TOKEN]
119
+ [--telegram-userid TELEGRAM_USERID] [--telethon-setup] [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth]
120
+ [--kakao-get-auth-desktop] [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
120
121
  [--kakao-password KAKAO_PASSWORD] [--kakao-country-code KAKAO_COUNTRY_CODE]
121
- [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth] [--line-cookies LINE_COOKIES]
122
- [--viber-auth VIBER_AUTH] [--viber-get-auth VIBER_GET_AUTH] [--viber-bin-path VIBER_BIN_PATH]
123
- [--discord-get-auth] [--discord-token DISCORD_TOKEN] [--save-cred]
122
+ [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth] [--line-cookies LINE_COOKIES] [--viber-auth VIBER_AUTH]
123
+ [--viber-get-auth VIBER_GET_AUTH] [--viber-bin-path VIBER_BIN_PATH] [--discord-get-auth]
124
+ [--discord-token DISCORD_TOKEN] [--save-cred]
124
125
 
125
126
  CLI for stickers-convert
126
127
 
@@ -159,6 +160,9 @@ Input options:
159
160
  Download kakao stickers from a URL / ID as input
160
161
  (Example: https://e.kakao.com/t/xxxxx
161
162
  OR https://emoticon.kakao.com/items/xxxxx OR 4404400)
163
+ --download-band DOWNLOAD_BAND
164
+ Download Naver Band stickers from a URL / ID as input
165
+ (Example: https://www.band.us/sticker/xxxx OR 2535)
162
166
  --download-viber DOWNLOAD_VIBER
163
167
  Download viber stickers from a URL as input
164
168
  (Example: https://stickers.viber.com/pages/example
@@ -266,6 +270,10 @@ Compression options:
266
270
  --cache-dir CACHE_DIR
267
271
  Set custom cache directory.
268
272
  Useful for debugging, or speed up conversion if cache_dir is on RAM disk.
273
+ --chromium-path CHROMIUM_PATH
274
+ Set Chromium(-based)/Chrome browser path.
275
+ Required for converting from SVG files.
276
+ Leave blank to auto detect
269
277
  --default-emoji DEFAULT_EMOJI
270
278
  Set the default emoji for uploading Signal and Telegram sticker packs.
271
279
 
@@ -492,5 +500,5 @@ See [docs/TODO.md](docs/TODO.md)
492
500
  - Banner generated from [GitHub Socialify](https://socialify.git.ci/)
493
501
 
494
502
  ## DISCLAIMER
495
- - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Viber, Discord, iMessage or Sticker Maker.
503
+ - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Naver Band, Viber, Discord, iMessage or Sticker Maker.
496
504
  - The author of this repo is NOT repsonsible for any legal consequences and loss incurred from using this repo.
@@ -1,7 +1,7 @@
1
1
  aiolimiter~=1.2.1
2
2
  anyio~=4.9.0
3
- apngasm_python~=1.3.1
4
- av~=13.1.0
3
+ apngasm_python~=1.3.2
4
+ av>=13.1.0
5
5
  beautifulsoup4~=4.13.3
6
6
  cryptg~=0.5.0.post0
7
7
  rookiepy~=0.5.6
@@ -10,14 +10,14 @@ imagequant~=1.1.4
10
10
  memory-tempfile~=2.2.3
11
11
  mergedeep~=1.3.4
12
12
  numpy>=1.22.4
13
- Pillow~=11.1.0
14
- pybrowsers~=0.7.0
15
- pyoxipng~=9.0.0
13
+ Pillow~=11.2.1
14
+ pybrowsers~=0.8.0
15
+ pyoxipng~=9.1.0
16
16
  python-telegram-bot~=22.0
17
17
  psutil~=7.0.0
18
18
  PyMemoryEditor~=1.5.22
19
19
  requests~=2.32.3
20
- rlottie_python~=1.3.6
20
+ rlottie_python~=1.3.7
21
21
  signalstickers-client-fork-laggykiller~=3.3.0.post2
22
22
  socksio~=1.0.0
23
23
  telethon~=1.39.0
@@ -139,6 +139,7 @@ class CLI:
139
139
  "cache_dir",
140
140
  "scale_filter",
141
141
  "quantize_method",
142
+ "chromium_path",
142
143
  )
143
144
  flags_comp_bool = ("fake_vid",)
144
145
  keyword_args: Dict[str, Any]
@@ -231,6 +232,7 @@ class CLI:
231
232
  "telegram": args.download_telegram,
232
233
  "telegram_telethon": args.download_telegram_telethon,
233
234
  "kakao": args.download_kakao,
235
+ "band": args.download_band,
234
236
  "viber": args.download_viber,
235
237
  "discord": args.download_discord,
236
238
  "discord_emoji": args.download_discord_emoji,
@@ -427,6 +429,7 @@ class CLI:
427
429
  fake_vid=self.compression_presets[preset]["fake_vid"]
428
430
  if args.fake_vid is None
429
431
  else args.fake_vid,
432
+ chromium_path=args.chromium_path,
430
433
  cache_dir=args.cache_dir,
431
434
  scale_filter=self.compression_presets[preset]["scale_filter"]
432
435
  if args.scale_filter is None
@@ -19,6 +19,7 @@ from sticker_convert.utils.chrome_remotedebug import CRD
19
19
  from sticker_convert.utils.files.cache_store import CacheStore
20
20
  from sticker_convert.utils.media.codec_info import CodecInfo, rounding
21
21
  from sticker_convert.utils.media.format_verify import FormatVerify
22
+ from sticker_convert.utils.singletons import singletons
22
23
 
23
24
  if TYPE_CHECKING:
24
25
  from av.video.frame import VideoFrame
@@ -435,22 +436,30 @@ class StickerConvert:
435
436
  width = self.codec_info_orig.res[0]
436
437
  height = self.codec_info_orig.res[1]
437
438
 
438
- chrome_path = CRD.get_chrome_path()
439
- args = [
440
- "--headless",
441
- "--kiosk",
442
- "--disable-extensions",
443
- "--disable-infobars",
444
- "--disable-gpu",
445
- "--disable-gpu-rasterization",
446
- "--hide-scrollbars",
447
- f"--window-size={width + 200},{height + 200}",
448
- "about:blank",
449
- ]
450
- if chrome_path is None:
451
- raise RuntimeError("[F] Chrome/Chromium required for importing svg")
452
- self.cb.put("[W] Importing SVG takes long time")
453
-
439
+ if singletons.objs.get("crd") is None:
440
+ chrome_path: Optional[str]
441
+ if self.opt_comp.chromium_path:
442
+ chrome_path = self.opt_comp.chromium_path
443
+ else:
444
+ chrome_path = CRD.get_chrome_path()
445
+ args = [
446
+ "--headless",
447
+ "--kiosk",
448
+ "--disable-extensions",
449
+ "--disable-infobars",
450
+ "--disable-gpu",
451
+ "--disable-gpu-rasterization",
452
+ "--hide-scrollbars",
453
+ "--force-device-scale-factor=1",
454
+ "about:blank",
455
+ ]
456
+ if chrome_path is None:
457
+ raise RuntimeError("[F] Chrome/Chromium required for importing svg")
458
+ self.cb.put("[W] Importing SVG takes long time")
459
+ singletons.objs["crd"] = CRD(chrome_path, args=args)
460
+ singletons.objs["crd"].connect(-1) # type: ignore
461
+
462
+ crd = cast(CRD, singletons.objs["crd"])
454
463
  if isinstance(self.in_f, bytes):
455
464
  svg = self.in_f.decode()
456
465
  else:
@@ -465,39 +474,35 @@ class StickerConvert:
465
474
  svg_tag["height"] = height
466
475
  svg = str(soup)
467
476
 
468
- crd = None
469
- try:
470
- crd = CRD(chrome_path, args=args)
471
- crd.connect(-1)
472
- crd.open_html_str(svg)
473
- crd.set_transparent_bg()
474
- crd.exec_js('svg = document.getElementsByTagName("svg")[0]')
475
- x = json.loads(crd.exec_js("svg.getBoundingClientRect().x"))["result"][
476
- "result"
477
- ]["value"]
478
- y = json.loads(crd.exec_js("svg.getBoundingClientRect().y"))["result"][
479
- "result"
480
- ]["value"]
481
- clip = {"x": x, "y": y, "width": width, "height": height, "scale": 1}
482
-
483
- if self.codec_info_orig.fps > 0:
484
- crd.exec_js("svg.pauseAnimations()")
485
- for i in range(self.codec_info_orig.frames):
486
- curr_time = (
487
- i
488
- / self.codec_info_orig.frames
489
- * self.codec_info_orig.duration
490
- / 1000
491
- )
492
- crd.exec_js(f"svg.setCurrentTime({curr_time})")
493
- self.frames_raw.append(
494
- np.asarray(crd.screenshot(clip).convert("RGBA"))
495
- )
496
- else:
497
- self.frames_raw.append(np.asarray(crd.screenshot(clip).convert("RGBA")))
498
- finally:
499
- if crd is not None:
500
- crd.close()
477
+ crd.open_html_str(svg)
478
+ crd.set_transparent_bg()
479
+ init_js = 'svg = document.getElementsByTagName("svg")[0];'
480
+ if self.codec_info_orig.fps > 0:
481
+ init_js += "svg.pauseAnimations();"
482
+ init_js += "JSON.stringify(svg.getBoundingClientRect());"
483
+ bound = json.loads(
484
+ json.loads(crd.exec_js(init_js))["result"]["result"]["value"]
485
+ )
486
+ clip = {
487
+ "x": bound["x"],
488
+ "y": bound["y"],
489
+ "width": width,
490
+ "height": height,
491
+ "scale": 1,
492
+ }
493
+
494
+ if self.codec_info_orig.fps > 0:
495
+ for i in range(self.codec_info_orig.frames):
496
+ curr_time = (
497
+ i
498
+ / self.codec_info_orig.frames
499
+ * self.codec_info_orig.duration
500
+ / 1000
501
+ )
502
+ crd.exec_js(f"svg.setCurrentTime({curr_time})")
503
+ self.frames_raw.append(np.asarray(crd.screenshot(clip)))
504
+ else:
505
+ self.frames_raw.append(np.asarray(crd.screenshot(clip)))
501
506
 
502
507
  def _frames_import_pillow(self) -> None:
503
508
  with Image.open(self.in_f) as im:
@@ -559,7 +564,7 @@ class StickerConvert:
559
564
  container = cast(InputContainer, container)
560
565
  context = container.streams.video[0].codec_context
561
566
  if context.name == "vp8":
562
- context = cast(VideoCodecContext, CodecContext.create("libvpx", "r"))
567
+ context = CodecContext.create("libvpx", "r")
563
568
  elif context.name == "vp9":
564
569
  context = cast(
565
570
  VideoCodecContext, CodecContext.create("libvpx-vp9", "r")
@@ -592,7 +597,12 @@ class StickerConvert:
592
597
  else:
593
598
  frame_resized = frame
594
599
 
595
- if frame_resized.format.name == "yuv420p":
600
+ # yuva420p may cause crash for pyav < 14
601
+ # Not safe to directly call frame.to_ndarray(format="rgba")
602
+ # https://github.com/PyAV-Org/PyAV/discussions/1510
603
+ if int(av.__version__.split(".")[0]) >= 14:
604
+ rgba_array = frame_resized.to_ndarray(format="rgba")
605
+ elif frame_resized.format.name == "yuv420p":
596
606
  rgb_array = frame_resized.to_ndarray(format="rgb24")
597
607
  rgba_array = np.dstack(
598
608
  (
@@ -604,9 +614,6 @@ class StickerConvert:
604
614
  )
605
615
  )
606
616
  else:
607
- # yuva420p may cause crash
608
- # Not safe to directly call frame.to_ndarray(format="rgba")
609
- # https://github.com/laggykiller/sticker-convert/issues/114
610
617
  frame_resized = frame_resized.reformat(
611
618
  format="yuva420p",
612
619
  dst_colorspace=1,
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env python3
2
+ from __future__ import annotations
3
+
4
+ import json
5
+ import zipfile
6
+ from io import BytesIO
7
+ from pathlib import Path
8
+ from typing import Any, Dict, Optional, Tuple
9
+ from urllib.parse import urlparse
10
+
11
+ import requests
12
+
13
+ from sticker_convert.downloaders.download_base import DownloadBase
14
+ from sticker_convert.job_option import CredOption, InputOption
15
+ from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
16
+ from sticker_convert.utils.files.metadata_handler import MetadataHandler
17
+
18
+
19
+ class DownloadBand(DownloadBase):
20
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
21
+ super().__init__(*args, **kwargs)
22
+
23
+ def decompress(self, zip_file: bytes) -> int:
24
+ with zipfile.ZipFile(BytesIO(zip_file)) as zf:
25
+ self.cb.put("Unzipping...")
26
+
27
+ zf_files = zf.namelist()
28
+ animated = [i for i in zf_files if "animation/" in i]
29
+ if len(animated) > 0:
30
+ pack_files = animated
31
+ else:
32
+ pack_files = [
33
+ i
34
+ for i in zf_files
35
+ if i.endswith(".meta") is False and "_key" not in i
36
+ ]
37
+
38
+ self.cb.put(
39
+ (
40
+ "bar",
41
+ None,
42
+ {"set_progress_mode": "determinate", "steps": len(pack_files)},
43
+ )
44
+ )
45
+
46
+ for num, sticker in enumerate(pack_files):
47
+ data = zf.read(sticker)
48
+ self.cb.put(f"Read {sticker}")
49
+ ext = sticker.split(".")[-1]
50
+
51
+ out_path = Path(self.out_dir, str(num).zfill(3) + f".{ext}")
52
+ with open(out_path, "wb") as f:
53
+ f.write(data)
54
+
55
+ self.cb.put("update_bar")
56
+
57
+ return len(pack_files)
58
+
59
+ def get_metadata(self, pack_no: str) -> Optional[Dict[Any, Any]]:
60
+ r = requests.get(
61
+ f"https://sapi.band.us/v1.0.0/get_sticker_info?pack_no={pack_no}"
62
+ )
63
+ if r.text:
64
+ return json.loads(r.text)
65
+ else:
66
+ return None
67
+
68
+ def download_stickers_band(self) -> Tuple[int, int]:
69
+ if urlparse(self.url).netloc != "www.band.us" and self.url.isnumeric() is False:
70
+ self.cb.put("Download failed: Unsupported URL format")
71
+ return 0, 0
72
+
73
+ if self.url.isnumeric():
74
+ pack_no = self.url
75
+ else:
76
+ pack_no = urlparse(self.url).path.split("/")[-1]
77
+ metadata = self.get_metadata(pack_no)
78
+ if metadata:
79
+ self.title = metadata["result_data"]["sticker"]["name"]
80
+ else:
81
+ self.cb.put("Download failed: Failed to get metadata")
82
+ return 0, 0
83
+
84
+ MetadataHandler.set_metadata(self.out_dir, title=self.title)
85
+
86
+ pack_url = f"http://s.cmstatic.net/band/sticker/v2/{pack_no}/shop/pack"
87
+ zip_file = self.download_file(pack_url)
88
+
89
+ if zip_file:
90
+ self.cb.put(f"Downloaded {pack_url}")
91
+ else:
92
+ self.cb.put(f"Cannot download {pack_url}")
93
+ return 0, 0
94
+
95
+ pack_files_no = self.decompress(zip_file)
96
+
97
+ cover_url = f"http://s.cmstatic.net/band/sticker/v2/{pack_no}/shop/main"
98
+ self.download_file(cover_url, self.out_dir / "cover.png")
99
+
100
+ return pack_files_no, pack_files_no
101
+
102
+ @staticmethod
103
+ def start(
104
+ opt_input: InputOption,
105
+ opt_cred: Optional[CredOption],
106
+ cb: CallbackProtocol,
107
+ cb_return: CallbackReturn,
108
+ ) -> Tuple[int, int]:
109
+ downloader = DownloadBand(opt_input, opt_cred, cb, cb_return)
110
+ return downloader.download_stickers_band()