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.
- {sticker-convert-2.1.5/src/sticker_convert.egg-info → sticker-convert-2.1.7}/PKG-INFO +11 -11
- sticker-convert-2.1.7/requirements.txt +17 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/__init__.py +1 -1
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/__main__.py +7 -4
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/cli.py +42 -32
- sticker-convert-2.1.7/src/sticker_convert/converter.py +432 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/downloaders/download_base.py +40 -16
- sticker-convert-2.1.7/src/sticker_convert/downloaders/download_kakao.py +241 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/downloaders/download_line.py +30 -12
- sticker-convert-2.1.7/src/sticker_convert/downloaders/download_signal.py +89 -0
- sticker-convert-2.1.7/src/sticker_convert/downloaders/download_telegram.py +120 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/gui.py +79 -130
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/gui_components}/gui_utils.py +38 -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
- {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
- {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
- {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
- {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
- sticker-convert-2.1.5/src/sticker_convert/flow.py → sticker-convert-2.1.7/src/sticker_convert/job.py +91 -102
- sticker-convert-2.1.7/src/sticker_convert/job_option.py +301 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/compression.json +1 -1
- sticker-convert-2.1.7/src/sticker_convert/uploaders/compress_wastickers.py +151 -0
- sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_base.py +28 -0
- sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_signal.py +171 -0
- sticker-convert-2.1.7/src/sticker_convert/uploaders/upload_telegram.py +280 -0
- sticker-convert-2.1.7/src/sticker_convert/uploaders/xcode_imessage.py +348 -0
- {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_kakao_auth.py +7 -5
- {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_line_auth.py +6 -5
- {sticker-convert-2.1.5/src/sticker_convert → sticker-convert-2.1.7/src/sticker_convert/utils}/auth/get_signal_auth.py +1 -1
- sticker-convert-2.1.7/src/sticker_convert/utils/fake_cb_msg.py +11 -0
- {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/files}/cache_store.py +7 -3
- sticker-convert-2.1.7/src/sticker_convert/utils/files/dir_utils.py +64 -0
- {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/files}/json_manager.py +5 -4
- sticker-convert-2.1.7/src/sticker_convert/utils/files/metadata_handler.py +226 -0
- sticker-convert-2.1.7/src/sticker_convert/utils/files/run_bin.py +58 -0
- {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
- {sticker-convert-2.1.5/src/sticker_convert/utils → sticker-convert-2.1.7/src/sticker_convert/utils/media}/codec_info.py +41 -35
- sticker-convert-2.1.7/src/sticker_convert/utils/media/decrypt_kakao.py +68 -0
- sticker-convert-2.1.7/src/sticker_convert/utils/media/format_verify.py +184 -0
- sticker-convert-2.1.7/src/sticker_convert/utils/url_detect.py +31 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7/src/sticker_convert.egg-info}/PKG-INFO +11 -11
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/SOURCES.txt +30 -28
- sticker-convert-2.1.7/src/sticker_convert.egg-info/requires.txt +17 -0
- sticker-convert-2.1.5/requirements.txt +0 -17
- sticker-convert-2.1.5/src/sticker_convert/downloaders/download_kakao.py +0 -274
- sticker-convert-2.1.5/src/sticker_convert/downloaders/download_signal.py +0 -73
- sticker-convert-2.1.5/src/sticker_convert/downloaders/download_telegram.py +0 -75
- sticker-convert-2.1.5/src/sticker_convert/uploaders/compress_wastickers.py +0 -130
- sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_base.py +0 -16
- sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_signal.py +0 -133
- sticker-convert-2.1.5/src/sticker_convert/uploaders/upload_telegram.py +0 -240
- sticker-convert-2.1.5/src/sticker_convert/uploaders/xcode_imessage.py +0 -278
- sticker-convert-2.1.5/src/sticker_convert/utils/converter.py +0 -399
- sticker-convert-2.1.5/src/sticker_convert/utils/curr_dir.py +0 -70
- sticker-convert-2.1.5/src/sticker_convert/utils/fake_cb_msg.py +0 -8
- sticker-convert-2.1.5/src/sticker_convert/utils/format_verify.py +0 -188
- sticker-convert-2.1.5/src/sticker_convert/utils/metadata_handler.py +0 -190
- sticker-convert-2.1.5/src/sticker_convert/utils/run_bin.py +0 -46
- sticker-convert-2.1.5/src/sticker_convert/utils/url_detect.py +0 -29
- sticker-convert-2.1.5/src/sticker_convert.egg-info/requires.txt +0 -17
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/LICENSE +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/MANIFEST.in +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/README.md +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/pyproject.toml +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/setup.cfg +0 -0
- {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
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
- {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
- {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
- {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
- {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
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.icns +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.ico +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/appicon.png +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/emoji.json +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/help.json +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/input.json +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert/resources/output.json +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
- {sticker-convert-2.1.5 → sticker-convert-2.1.7}/src/sticker_convert.egg-info/entry_points.txt +0 -0
- {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.
|
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.
|
368
|
-
Requires-Dist:
|
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:
|
371
|
-
Requires-Dist: imageio~=2.
|
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:
|
374
|
-
Requires-Dist: Pillow~=10.0
|
375
|
-
Requires-Dist: pyoxipng~=
|
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
|
379
|
-
Requires-Dist: selenium~=4.
|
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.
|
383
|
+
Requires-Dist: webp~=0.3.0
|
384
384
|
|
385
385
|
# sticker-convert
|
386
386
|

|
@@ -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
|
@@ -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(
|
14
|
-
from sticker_convert.gui import GUI
|
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
|
-
|
21
|
-
|
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 .
|
11
|
-
from .
|
12
|
-
from .
|
13
|
-
from .auth.
|
14
|
-
from .auth.
|
15
|
-
from .utils.
|
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
|
-
|
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
|
-
|
106
|
+
status = job.start()
|
107
107
|
|
108
|
-
if
|
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
|
-
|
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(
|
140
|
+
'dir': args.input_dir if args.input_dir else os.path.join(DirUtils.get_curr_dir(), 'stickers_input')
|
139
141
|
}
|
140
142
|
|
141
|
-
|
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
|
-
|
157
|
+
opt_output = {
|
154
158
|
'option': export_option,
|
155
|
-
'dir': args.output_dir if args.output_dir else os.path.join(
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
232
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
278
|
-
|
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
|
-
|
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(
|
297
|
-
JsonManager.save_json(creds_path,
|
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)
|