sticker-convert 2.1.5__tar.gz → 2.1.7__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 (116) hide show
  1. {sticker-convert-2.1.5/src/sticker_convert.egg-info → sticker-convert-2.1.7}/PKG-INFO +11 -11
  2. sticker-convert-2.1.7/requirements.txt +17 -0
  3. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/__init__.py +1 -1
  4. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/__main__.py +7 -4
  5. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/cli.py +42 -32
  6. sticker-convert-2.1.7/src/sticker_convert/converter.py +432 -0
  7. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/downloaders/download_base.py +40 -16
  8. sticker-convert-2.1.7/src/sticker_convert/downloaders/download_kakao.py +241 -0
  9. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/downloaders/download_line.py +30 -12
  10. sticker-convert-2.1.7/src/sticker_convert/downloaders/download_signal.py +89 -0
  11. sticker-convert-2.1.7/src/sticker_convert/downloaders/download_telegram.py +120 -0
  12. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/gui.py +79 -130
  13. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/comp_frame.py +2 -3
  14. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/config_frame.py +3 -4
  15. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/control_frame.py +2 -2
  16. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/cred_frame.py +4 -4
  17. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/input_frame.py +4 -4
  18. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/output_frame.py +3 -3
  19. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/progress_frame.py +1 -1
  20. {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/gui_components}/gui_utils.py +38 -21
  21. {sticker-convert-2.1.5/src/sticker_convert/gui_windows → sticker-convert-2.1.7/src/sticker_convert/gui_components/windows}/advanced_compression_window.py +3 -2
  22. {sticker-convert-2.1.5/src/sticker_convert/gui_windows → sticker-convert-2.1.7/src/sticker_convert/gui_components/windows}/base_window.py +3 -2
  23. {sticker-convert-2.1.5/src/sticker_convert/gui_windows → sticker-convert-2.1.7/src/sticker_convert/gui_components/windows}/kakao_get_auth_window.py +3 -3
  24. {sticker-convert-2.1.5/src/sticker_convert/gui_windows → sticker-convert-2.1.7/src/sticker_convert/gui_components/windows}/line_get_auth_window.py +2 -2
  25. {sticker-convert-2.1.5/src/sticker_convert/gui_windows → sticker-convert-2.1.7/src/sticker_convert/gui_components/windows}/signal_get_auth_window.py +2 -2
  26. sticker-convert-2.1.5/src/sticker_convert/flow.py → sticker-convert-2.1.7/src/sticker_convert/job.py +91 -102
  27. sticker-convert-2.1.7/src/sticker_convert/job_option.py +301 -0
  28. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/compression.json +1 -1
  29. sticker-convert-2.1.7/src/sticker_convert/uploaders/compress_wastickers.py +151 -0
  30. sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_base.py +28 -0
  31. sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_signal.py +171 -0
  32. sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_telegram.py +280 -0
  33. sticker-convert-2.1.7/src/sticker_convert/uploaders/xcode_imessage.py +348 -0
  34. {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_kakao_auth.py +7 -5
  35. {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_line_auth.py +6 -5
  36. {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_signal_auth.py +1 -1
  37. sticker-convert-2.1.7/src/sticker_convert/utils/fake_cb_msg.py +11 -0
  38. {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/files}/cache_store.py +7 -3
  39. sticker-convert-2.1.7/src/sticker_convert/utils/files/dir_utils.py +64 -0
  40. {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/files}/json_manager.py +5 -4
  41. sticker-convert-2.1.7/src/sticker_convert/utils/files/metadata_handler.py +226 -0
  42. sticker-convert-2.1.7/src/sticker_convert/utils/files/run_bin.py +58 -0
  43. {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/media}/apple_png_normalize.py +23 -20
  44. {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/media}/codec_info.py +41 -35
  45. sticker-convert-2.1.7/src/sticker_convert/utils/media/decrypt_kakao.py +68 -0
  46. sticker-convert-2.1.7/src/sticker_convert/utils/media/format_verify.py +184 -0
  47. sticker-convert-2.1.7/src/sticker_convert/utils/url_detect.py +31 -0
  48. {sticker-convert-2.1.5 → sticker-convert-2.1.7/src/sticker_convert.egg-info}/PKG-INFO +11 -11
  49. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/SOURCES.txt +30 -28
  50. sticker-convert-2.1.7/src/sticker_convert.egg-info/requires.txt +17 -0
  51. sticker-convert-2.1.5/requirements.txt +0 -17
  52. sticker-convert-2.1.5/src/sticker_convert/downloaders/download_kakao.py +0 -274
  53. sticker-convert-2.1.5/src/sticker_convert/downloaders/download_signal.py +0 -73
  54. sticker-convert-2.1.5/src/sticker_convert/downloaders/download_telegram.py +0 -75
  55. sticker-convert-2.1.5/src/sticker_convert/uploaders/compress_wastickers.py +0 -130
  56. sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_base.py +0 -16
  57. sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_signal.py +0 -133
  58. sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_telegram.py +0 -240
  59. sticker-convert-2.1.5/src/sticker_convert/uploaders/xcode_imessage.py +0 -278
  60. sticker-convert-2.1.5/src/sticker_convert/utils/converter.py +0 -399
  61. sticker-convert-2.1.5/src/sticker_convert/utils/curr_dir.py +0 -70
  62. sticker-convert-2.1.5/src/sticker_convert/utils/fake_cb_msg.py +0 -8
  63. sticker-convert-2.1.5/src/sticker_convert/utils/format_verify.py +0 -188
  64. sticker-convert-2.1.5/src/sticker_convert/utils/metadata_handler.py +0 -190
  65. sticker-convert-2.1.5/src/sticker_convert/utils/run_bin.py +0 -46
  66. sticker-convert-2.1.5/src/sticker_convert/utils/url_detect.py +0 -29
  67. sticker-convert-2.1.5/src/sticker_convert.egg-info/requires.txt +0 -17
  68. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/LICENSE +0 -0
  69. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/MANIFEST.in +0 -0
  70. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/README.md +0 -0
  71. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/pyproject.toml +0 -0
  72. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/setup.cfg +0 -0
  73. {sticker-convert-2.1.5/src/sticker_convert/gui_frames → sticker-convert-2.1.7/src/sticker_convert/gui_components/frames}/right_clicker.py +0 -0
  74. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  75. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  76. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  77. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  78. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  79. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  80. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  81. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  82. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  83. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  84. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  85. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  86. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  87. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  88. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  89. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  90. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  91. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  92. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  93. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  94. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  95. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  96. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  97. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  98. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  99. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  100. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  101. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  102. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  103. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  104. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  105. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  106. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  107. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.icns +0 -0
  108. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.ico +0 -0
  109. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.png +0 -0
  110. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/emoji.json +0 -0
  111. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/help.json +0 -0
  112. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/input.json +0 -0
  113. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/output.json +0 -0
  114. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  115. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  116. {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.1.5
3
+ Version: 2.1.7
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>
@@ -364,23 +364,23 @@ Classifier: Programming Language :: Python :: 3 :: Only
364
364
  Requires-Python: >=3.7
365
365
  Description-Content-Type: text/markdown
366
366
  License-File: LICENSE
367
- Requires-Dist: apngasm_python~=1.2.0
368
- Requires-Dist: av~=10.0.0
367
+ Requires-Dist: apngasm_python~=1.2.1
368
+ Requires-Dist: pyav~=11.4.1
369
369
  Requires-Dist: beautifulsoup4~=4.12.2
370
- Requires-Dist: browser-cookie3~=0.19.1
371
- Requires-Dist: imageio~=2.31.5
370
+ Requires-Dist: rookiepy~=0.3.3
371
+ Requires-Dist: imageio~=2.33.1
372
372
  Requires-Dist: memory-tempfile~=2.2.3
373
- Requires-Dist: mergedeep~=1.3.4
374
- Requires-Dist: Pillow~=10.0.1
375
- Requires-Dist: pyoxipng~=8.0.0
373
+ Requires-Dist: numpy~=1.26.2
374
+ Requires-Dist: Pillow~=10.1.0
375
+ Requires-Dist: pyoxipng~=9.0.0
376
376
  Requires-Dist: python-telegram-bot~=20.5
377
377
  Requires-Dist: requests~=2.31.0
378
- Requires-Dist: rlottie_python~=1.1.9
379
- Requires-Dist: selenium~=4.13.0
378
+ Requires-Dist: rlottie_python~=1.2.1
379
+ Requires-Dist: selenium~=4.16.0
380
380
  Requires-Dist: signalstickers-client~=3.3.0
381
381
  Requires-Dist: tqdm~=4.66.1
382
382
  Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
383
- Requires-Dist: webp~=0.2.0
383
+ Requires-Dist: webp~=0.3.0
384
384
 
385
385
  # sticker-convert
386
386
  ![imgs/banner.png](imgs/banner.png)
@@ -0,0 +1,17 @@
1
+ apngasm_python~=1.2.1
2
+ pyav~=11.4.1
3
+ beautifulsoup4~=4.12.2
4
+ rookiepy~=0.3.3
5
+ imageio~=2.33.1
6
+ memory-tempfile~=2.2.3
7
+ numpy~=1.26.2
8
+ Pillow~=10.1.0
9
+ pyoxipng~=9.0.0
10
+ python-telegram-bot~=20.5
11
+ requests~=2.31.0
12
+ rlottie_python~=1.2.1
13
+ selenium~=4.16.0
14
+ signalstickers-client~=3.3.0
15
+ tqdm~=4.66.1
16
+ ttkbootstrap-fork-laggykiller~=1.5.1
17
+ webp~=0.3.0
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
  '''sticker-convert'''
3
- __version__ = '2.1.5'
3
+ __version__ = '2.1.7'
@@ -10,12 +10,15 @@ def main():
10
10
  script_path = os.path.dirname(sys.argv[0])
11
11
  os.chdir(script_path)
12
12
  if len(sys.argv) == 1:
13
- print('Launching GUI...')
14
- from sticker_convert.gui import GUI # type: ignore
13
+ print("Launching GUI...")
14
+ from sticker_convert.gui import GUI # type: ignore
15
+
15
16
  GUI().gui()
16
17
  else:
17
18
  from sticker_convert.cli import CLI
19
+
18
20
  CLI().cli()
19
21
 
20
- if __name__ == '__main__':
21
- main()
22
+
23
+ if __name__ == "__main__":
24
+ main()
@@ -7,12 +7,13 @@ from typing import Optional
7
7
 
8
8
  from tqdm import tqdm
9
9
 
10
- from .flow import Flow # type: ignore
11
- from .utils.json_manager import JsonManager # type: ignore
12
- from .auth.get_kakao_auth import GetKakaoAuth # type: ignore
13
- from .auth.get_signal_auth import GetSignalAuth # type: ignore
14
- from .auth.get_line_auth import GetLineAuth # type: ignore
15
- from .utils.curr_dir import CurrDir # type: ignore
10
+ from .job import Job # type: ignore
11
+ from .job_option import InputOption, CompOption, OutputOption, CredOption # type: ignore
12
+ from .utils.files.json_manager import JsonManager # type: ignore
13
+ from .utils.auth.get_kakao_auth import GetKakaoAuth # type: ignore
14
+ from .utils.auth.get_signal_auth import GetSignalAuth # type: ignore
15
+ from .utils.auth.get_line_auth import GetLineAuth # type: ignore
16
+ from .utils.files.dir_utils import DirUtils # type: ignore
16
17
  from .utils.url_detect import UrlDetect # type: ignore
17
18
  from .__init__ import __version__ # type: ignore
18
19
 
@@ -92,23 +93,24 @@ class CLI:
92
93
 
93
94
  self.no_confirm = args.no_confirm
94
95
 
95
- self.get_opt_input(args)
96
- self.get_opt_output(args)
97
- self.get_opt_comp(args)
98
- self.get_opt_cred(args)
96
+ self.opt_input = InputOption(self.get_opt_input(args))
97
+ self.opt_output = OutputOption(self.get_opt_output(args))
98
+ self.opt_comp = CompOption(self.get_opt_comp(args))
99
+ self.opt_cred = CredOption(self.get_opt_cred(args))
99
100
 
100
- flow = Flow(
101
+ job = Job(
101
102
  self.opt_input, self.opt_comp, self.opt_output, self.opt_cred,
102
- self.input_presets, self.output_presets,
103
103
  self.cb_msg, self.cb_msg_block, self.cb_bar, self.cb_ask_bool
104
104
  )
105
105
 
106
- success = flow.start()
106
+ status = job.start()
107
107
 
108
- if not success:
108
+ if status == 1:
109
109
  self.cb_msg(msg='An error occured during this run.')
110
+ elif status == 2:
111
+ self.cb_msg(msg='Job cancelled.')
110
112
 
111
- def get_opt_input(self, args):
113
+ def get_opt_input(self, args) -> dict:
112
114
  download_options = {
113
115
  'auto': args.download_auto,
114
116
  'signal': args.download_signal,
@@ -132,13 +134,15 @@ class CLI:
132
134
  self.cb_msg(f'Error: Unrecognied URL input source for url: {url}')
133
135
  exit()
134
136
 
135
- self.opt_input = {
137
+ opt_input = {
136
138
  'option': download_option,
137
139
  'url': url,
138
- 'dir': args.input_dir if args.input_dir else os.path.join(CurrDir.get_curr_dir(), 'stickers_input')
140
+ 'dir': args.input_dir if args.input_dir else os.path.join(DirUtils.get_curr_dir(), 'stickers_input')
139
141
  }
140
142
 
141
- def get_opt_output(self, args):
143
+ return opt_input
144
+
145
+ def get_opt_output(self, args) -> dict:
142
146
  if args.export_whatsapp:
143
147
  export_option = 'whatsapp'
144
148
  elif args.export_signal:
@@ -150,14 +154,16 @@ class CLI:
150
154
  else:
151
155
  export_option = 'local'
152
156
 
153
- self.opt_output = {
157
+ opt_output = {
154
158
  'option': export_option,
155
- 'dir': args.output_dir if args.output_dir else os.path.join(CurrDir.get_curr_dir(), 'stickers_output'),
159
+ 'dir': args.output_dir if args.output_dir else os.path.join(DirUtils.get_curr_dir(), 'stickers_output'),
156
160
  'title': args.title,
157
161
  'author': args.author
158
162
  }
159
163
 
160
- def get_opt_comp(self, args):
164
+ return opt_output
165
+
166
+ def get_opt_comp(self, args) -> dict:
161
167
  preset = args.preset
162
168
  if args.preset == 'custom':
163
169
  if sum((args.export_whatsapp, args.export_signal, args.export_telegram, args.export_imessage)) > 1:
@@ -172,7 +178,7 @@ class CLI:
172
178
  elif args.export_imessage:
173
179
  preset = 'imessage_small'
174
180
  elif args.preset == 'auto':
175
- output_option = self.opt_output['option']
181
+ output_option = self.opt_output.option
176
182
  if output_option == 'local':
177
183
  preset = 'custom'
178
184
  args.no_compress = True
@@ -184,7 +190,7 @@ class CLI:
184
190
  preset = output_option
185
191
  self.cb_msg(f'Auto compression option set to {preset}')
186
192
 
187
- self.opt_comp = {
193
+ opt_comp = {
188
194
  'preset': preset,
189
195
  'size_max': {
190
196
  'img': self.compression_presets[preset]['size_max']['img'] if args.img_size_max == None else args.img_size_max,
@@ -228,15 +234,17 @@ class CLI:
228
234
  'processes': args.processes if args.processes else math.ceil(cpu_count() / 2)
229
235
  }
230
236
 
231
- def get_opt_cred(self, args):
232
- creds_path = os.path.join(CurrDir.get_config_dir(), 'creds.json')
237
+ return opt_comp
238
+
239
+ def get_opt_cred(self, args) -> dict:
240
+ creds_path = os.path.join(DirUtils.get_config_dir(), 'creds.json')
233
241
  creds = JsonManager.load_json(creds_path)
234
242
  if creds:
235
243
  self.cb_msg('Loaded credentials from creds.json')
236
244
  else:
237
245
  creds = {}
238
246
 
239
- self.opt_cred = {
247
+ opt_cred = {
240
248
  'signal': {
241
249
  'uuid': args.signal_uuid if args.signal_uuid else creds.get('signal', {}).get('uuid'),
242
250
  'password': args.signal_password if args.signal_password else creds.get('signal', {}).get('password')
@@ -262,7 +270,7 @@ class CLI:
262
270
  auth_token = m.get_cred()
263
271
 
264
272
  if auth_token:
265
- self.opt_cred['kakao']['auth_token'] = auth_token
273
+ opt_cred['kakao']['auth_token'] = auth_token
266
274
 
267
275
  self.cb_msg(f'Got auth_token successfully: {auth_token}')
268
276
 
@@ -274,8 +282,8 @@ class CLI:
274
282
  uuid, password = m.get_cred()
275
283
 
276
284
  if uuid and password:
277
- self.opt_cred['signal']['uuid'] = uuid
278
- self.opt_cred['signal']['password'] = password
285
+ opt_cred['signal']['uuid'] = uuid
286
+ opt_cred['signal']['password'] = password
279
287
 
280
288
  self.cb_msg(f'Got uuid and password successfully: {uuid}, {password}')
281
289
  break
@@ -286,16 +294,18 @@ class CLI:
286
294
  line_cookies = m.get_cred()
287
295
 
288
296
  if line_cookies:
289
- self.opt_cred['line']['cookies'] = line_cookies
297
+ opt_cred['line']['cookies'] = line_cookies
290
298
 
291
299
  self.cb_msg('Got Line cookies successfully')
292
300
  else:
293
301
  self.cb_msg('Failed to get Line cookies. Have you logged in the web browser?')
294
302
 
295
303
  if args.save_cred:
296
- creds_path = os.path.join(CurrDir.get_config_dir(), 'creds.json')
297
- JsonManager.save_json(creds_path, self.opt_cred)
304
+ creds_path = os.path.join(DirUtils.get_config_dir(), 'creds.json')
305
+ JsonManager.save_json(creds_path, opt_cred)
298
306
  self.cb_msg('Saved credentials to creds.json')
307
+
308
+ return opt_cred
299
309
 
300
310
  def cb_ask_str(self, msg: Optional[str] = None, initialvalue: Optional[str] = None, cli_show_initialvalue: bool = True) -> str:
301
311
  self.cb_msg(msg)