sticker-convert 2.13.3.0__py3-none-any.whl → 2.17.0.0__py3-none-any.whl

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 (93) hide show
  1. sticker_convert/__main__.py +24 -27
  2. sticker_convert/auth/__init__.py +0 -0
  3. sticker_convert/auth/auth_base.py +19 -0
  4. sticker_convert/{utils/auth/get_discord_auth.py → auth/auth_discord.py} +149 -118
  5. sticker_convert/{utils/auth/get_kakao_auth.py → auth/auth_kakao_android_login.py} +331 -330
  6. sticker_convert/auth/auth_kakao_desktop_login.py +327 -0
  7. sticker_convert/{utils/auth/get_kakao_desktop_auth.py → auth/auth_kakao_desktop_memdump.py} +281 -263
  8. sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +98 -80
  9. sticker_convert/{utils/auth/get_signal_auth.py → auth/auth_signal.py} +139 -135
  10. sticker_convert/auth/auth_telethon.py +161 -0
  11. sticker_convert/{utils/auth/get_viber_auth.py → auth/auth_viber.py} +250 -235
  12. sticker_convert/{utils/auth → auth}/telegram_api.py +736 -675
  13. sticker_convert/cli.py +623 -608
  14. sticker_convert/converter.py +1093 -1084
  15. sticker_convert/definitions.py +4 -0
  16. sticker_convert/downloaders/download_band.py +111 -110
  17. sticker_convert/downloaders/download_base.py +171 -166
  18. sticker_convert/downloaders/download_discord.py +92 -91
  19. sticker_convert/downloaders/download_kakao.py +417 -404
  20. sticker_convert/downloaders/download_line.py +484 -475
  21. sticker_convert/downloaders/download_ogq.py +80 -79
  22. sticker_convert/downloaders/download_signal.py +108 -105
  23. sticker_convert/downloaders/download_telegram.py +56 -55
  24. sticker_convert/downloaders/download_viber.py +121 -120
  25. sticker_convert/gui.py +788 -873
  26. sticker_convert/gui_components/frames/comp_frame.py +180 -166
  27. sticker_convert/gui_components/frames/config_frame.py +156 -113
  28. sticker_convert/gui_components/frames/control_frame.py +32 -30
  29. sticker_convert/gui_components/frames/cred_frame.py +232 -233
  30. sticker_convert/gui_components/frames/input_frame.py +139 -137
  31. sticker_convert/gui_components/frames/output_frame.py +112 -110
  32. sticker_convert/gui_components/frames/right_clicker.py +25 -23
  33. sticker_convert/gui_components/windows/advanced_compression_window.py +757 -757
  34. sticker_convert/gui_components/windows/base_window.py +7 -2
  35. sticker_convert/gui_components/windows/discord_get_auth_window.py +79 -82
  36. sticker_convert/gui_components/windows/kakao_get_auth_window.py +511 -321
  37. sticker_convert/gui_components/windows/line_get_auth_window.py +94 -102
  38. sticker_convert/gui_components/windows/signal_get_auth_window.py +84 -89
  39. sticker_convert/gui_components/windows/viber_get_auth_window.py +168 -168
  40. sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +3 -3
  41. sticker_convert/ios-message-stickers-template/README.md +10 -10
  42. sticker_convert/ios-message-stickers-template/stickers/Info.plist +43 -43
  43. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +31 -31
  44. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +6 -6
  45. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +20 -20
  46. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +9 -9
  47. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +9 -9
  48. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +9 -9
  49. sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +91 -91
  50. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +364 -364
  51. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
  52. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  53. sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  54. sticker_convert/job.py +166 -130
  55. sticker_convert/job_option.py +1 -0
  56. sticker_convert/locales/en_US/LC_MESSAGES/base.mo +0 -0
  57. sticker_convert/locales/ja_JP/LC_MESSAGES/base.mo +0 -0
  58. sticker_convert/locales/zh_CN/LC_MESSAGES/base.mo +0 -0
  59. sticker_convert/locales/zh_TW/LC_MESSAGES/base.mo +0 -0
  60. sticker_convert/py.typed +0 -0
  61. sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  62. sticker_convert/resources/help.ja_JP.json +88 -0
  63. sticker_convert/resources/help.json +10 -7
  64. sticker_convert/resources/help.zh_CN.json +88 -0
  65. sticker_convert/resources/help.zh_TW.json +88 -0
  66. sticker_convert/resources/input.ja_JP.json +74 -0
  67. sticker_convert/resources/input.json +121 -121
  68. sticker_convert/resources/input.zh_CN.json +74 -0
  69. sticker_convert/resources/input.zh_TW.json +74 -0
  70. sticker_convert/resources/output.ja_JP.json +38 -0
  71. sticker_convert/resources/output.zh_CN.json +38 -0
  72. sticker_convert/resources/output.zh_TW.json +38 -0
  73. sticker_convert/uploaders/compress_wastickers.py +186 -177
  74. sticker_convert/uploaders/upload_base.py +44 -35
  75. sticker_convert/uploaders/upload_signal.py +218 -203
  76. sticker_convert/uploaders/upload_telegram.py +353 -338
  77. sticker_convert/uploaders/upload_viber.py +178 -169
  78. sticker_convert/uploaders/xcode_imessage.py +295 -286
  79. sticker_convert/utils/callback.py +238 -6
  80. sticker_convert/utils/emoji.py +16 -4
  81. sticker_convert/utils/files/json_resources_loader.py +24 -19
  82. sticker_convert/utils/files/metadata_handler.py +3 -3
  83. sticker_convert/utils/translate.py +108 -0
  84. sticker_convert/utils/url_detect.py +40 -37
  85. sticker_convert/version.py +1 -1
  86. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/METADATA +89 -74
  87. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/RECORD +91 -74
  88. sticker_convert/utils/auth/telethon_setup.py +0 -97
  89. sticker_convert/utils/singletons.py +0 -18
  90. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/WHEEL +0 -0
  91. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/entry_points.txt +0 -0
  92. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/licenses/LICENSE +0 -0
  93. {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/top_level.txt +0 -0
@@ -1,177 +1,186 @@
1
- #!/usr/bin/env python3
2
- import copy
3
- import zipfile
4
- from pathlib import Path
5
- from typing import Any, List, Tuple
6
-
7
- from sticker_convert.converter import StickerConvert
8
- from sticker_convert.job_option import CompOption, CredOption, OutputOption
9
- from sticker_convert.uploaders.upload_base import UploadBase
10
- from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
11
- from sticker_convert.utils.files.metadata_handler import MetadataHandler
12
- from sticker_convert.utils.files.sanitize_filename import sanitize_filename
13
- from sticker_convert.utils.media.codec_info import CodecInfo
14
- from sticker_convert.utils.media.format_verify import FormatVerify
15
-
16
-
17
- class CompressWastickers(UploadBase):
18
- def __init__(self, *args: Any, **kwargs: Any) -> None:
19
- super().__init__(*args, **kwargs)
20
- self.base_spec.size_max_img = 100000
21
- self.base_spec.size_max_vid = 500000
22
- self.base_spec.duration_min = 8
23
- self.base_spec.duration_max = 10000
24
- self.base_spec.set_res(512)
25
- self.base_spec.set_format((".webp",))
26
-
27
- self.spec_cover = CompOption(
28
- size_max_img=50000,
29
- size_max_vid=50000,
30
- animated=False,
31
- )
32
- self.spec_cover.set_res(96)
33
- self.spec_cover.set_res(96)
34
- self.spec_cover.set_fps(0)
35
- self.spec_cover.set_format((".png",))
36
-
37
- self.webp_spec = copy.deepcopy(self.base_spec)
38
- self.webp_spec.set_format((".webp",))
39
- self.webp_spec.animated = None if self.opt_comp.fake_vid else True
40
-
41
- self.png_spec = copy.deepcopy(self.base_spec)
42
- self.png_spec.set_format((".png",))
43
- self.png_spec.animated = False
44
-
45
- self.opt_comp_merged = copy.deepcopy(self.opt_comp)
46
- self.opt_comp_merged.merge(self.base_spec)
47
-
48
- def compress_wastickers(self) -> Tuple[int, int, List[str]]:
49
- urls: List[str] = []
50
- title, author, _ = MetadataHandler.get_metadata(
51
- self.opt_output.dir,
52
- title=self.opt_output.title,
53
- author=self.opt_output.author,
54
- )
55
- if not title:
56
- self.cb.put("Title is required for compressing .wastickers")
57
- return 0, 0, urls
58
- if not author:
59
- self.cb.put("Author is required for compressing .wastickers")
60
- return 0, 0, urls
61
- packs = MetadataHandler.split_sticker_packs(
62
- self.opt_output.dir,
63
- title=title,
64
- file_per_pack=30,
65
- separate_image_anim=not self.opt_comp.fake_vid,
66
- )
67
-
68
- stickers_total = 0
69
- for pack_title, stickers in packs.items():
70
- stickers_total += len(stickers)
71
- out_f = Path(
72
- self.opt_output.dir, sanitize_filename(pack_title + ".wastickers")
73
- ).as_posix()
74
-
75
- MetadataHandler.set_metadata(
76
- self.opt_output.dir, author=author, title=title, newline=True
77
- )
78
- with zipfile.ZipFile(out_f, "w", zipfile.ZIP_DEFLATED) as zipf:
79
- cover_opt_comp_merged = copy.deepcopy(self.opt_comp)
80
- cover_opt_comp_merged.merge(self.spec_cover)
81
-
82
- cover_path_old = MetadataHandler.get_cover(self.opt_output.dir)
83
- cover_path_new = Path("bytes.png")
84
- if cover_path_old is None:
85
- # First image in the directory, extracting first frame
86
- first_image = [
87
- i
88
- for i in sorted(self.opt_output.dir.iterdir())
89
- if Path(self.opt_output.dir, i.name).is_file()
90
- and i.suffix not in (".txt", ".m4a", ".wastickers")
91
- ][0]
92
- self.cb.put(f"Creating cover using {first_image.name}")
93
- success, _, cover_data, _ = StickerConvert.convert(
94
- Path(self.opt_output.dir, first_image),
95
- cover_path_new,
96
- cover_opt_comp_merged,
97
- self.cb,
98
- self.cb_return,
99
- )
100
- if not success:
101
- self.cb.put(
102
- f"Warning: Cannot compress cover {first_image.name}, unable to create .wastickers"
103
- )
104
- continue
105
- else:
106
- if not FormatVerify.check_file(
107
- cover_path_old, spec=self.spec_cover
108
- ):
109
- success, _, cover_data, _ = StickerConvert.convert(
110
- cover_path_old,
111
- cover_path_new,
112
- cover_opt_comp_merged,
113
- self.cb,
114
- self.cb_return,
115
- )
116
- if not success:
117
- self.cb.put(
118
- f"Warning: Cannot compress cover {cover_path_old.name}, unable to create .wastickers"
119
- )
120
- continue
121
- else:
122
- with open(cover_path_old, "rb") as f:
123
- cover_data = f.read()
124
-
125
- assert isinstance(cover_data, bytes)
126
- zipf.writestr("tray.png", cover_data)
127
- zipf.write(Path(self.opt_output.dir, "author.txt"), "author.txt")
128
- zipf.write(Path(self.opt_output.dir, "title.txt"), "title.txt")
129
-
130
- for num, src in enumerate(stickers):
131
- self.cb.put(f"Verifying {src} for compressing into .wastickers")
132
-
133
- if self.opt_comp.fake_vid or CodecInfo.is_anim(src):
134
- ext = ".webp"
135
- else:
136
- ext = ".png"
137
- dst = f"bytes{ext}"
138
-
139
- if not (
140
- FormatVerify.check_file(src, spec=self.webp_spec)
141
- or FormatVerify.check_file(src, spec=self.png_spec)
142
- ):
143
- success, _, image_data, _ = StickerConvert.convert(
144
- Path(src),
145
- Path(dst),
146
- self.opt_comp_merged,
147
- self.cb,
148
- self.cb_return,
149
- )
150
- assert isinstance(image_data, bytes)
151
- if not success:
152
- self.cb.put(
153
- f"Warning: Cannot compress file {Path(src).name}, skip this file..."
154
- )
155
- continue
156
- else:
157
- with open(src, "rb") as f:
158
- image_data = f.read()
159
-
160
- # Originally the Sticker Maker application name the files with int(time.time())
161
- zipf.writestr(f"sticker_{num + 1}{ext}", image_data)
162
-
163
- self.cb.put((out_f))
164
- urls.append(out_f)
165
-
166
- return stickers_total, stickers_total, urls
167
-
168
- @staticmethod
169
- def start(
170
- opt_output: OutputOption,
171
- opt_comp: CompOption,
172
- opt_cred: CredOption,
173
- cb: CallbackProtocol,
174
- cb_return: CallbackReturn,
175
- ) -> Tuple[int, int, List[str]]:
176
- exporter = CompressWastickers(opt_output, opt_comp, opt_cred, cb, cb_return)
177
- return exporter.compress_wastickers()
1
+ #!/usr/bin/env python3
2
+ import copy
3
+ import zipfile
4
+ from pathlib import Path
5
+ from typing import Any, List, Tuple
6
+
7
+ from sticker_convert.converter import StickerConvert
8
+ from sticker_convert.job_option import CompOption, CredOption, OutputOption
9
+ from sticker_convert.uploaders.upload_base import UploadBase
10
+ from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
11
+ from sticker_convert.utils.files.metadata_handler import MetadataHandler
12
+ from sticker_convert.utils.files.sanitize_filename import sanitize_filename
13
+ from sticker_convert.utils.media.codec_info import CodecInfo
14
+ from sticker_convert.utils.media.format_verify import FormatVerify
15
+ from sticker_convert.utils.translate import I
16
+
17
+
18
+ class CompressWastickers(UploadBase):
19
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
20
+ super().__init__(*args, **kwargs)
21
+ self.base_spec.size_max_img = 100000
22
+ self.base_spec.size_max_vid = 500000
23
+ self.base_spec.duration_min = 8
24
+ self.base_spec.duration_max = 10000
25
+ self.base_spec.set_res(512)
26
+ self.base_spec.set_format((".webp",))
27
+
28
+ self.spec_cover = CompOption(
29
+ size_max_img=50000,
30
+ size_max_vid=50000,
31
+ animated=False,
32
+ )
33
+ self.spec_cover.set_res(96)
34
+ self.spec_cover.set_res(96)
35
+ self.spec_cover.set_fps(0)
36
+ self.spec_cover.set_format((".png",))
37
+
38
+ self.webp_spec = copy.deepcopy(self.base_spec)
39
+ self.webp_spec.set_format((".webp",))
40
+ self.webp_spec.animated = None if self.opt_comp.fake_vid else True
41
+
42
+ self.png_spec = copy.deepcopy(self.base_spec)
43
+ self.png_spec.set_format((".png",))
44
+ self.png_spec.animated = False
45
+
46
+ self.opt_comp_merged = copy.deepcopy(self.opt_comp)
47
+ self.opt_comp_merged.merge(self.base_spec)
48
+
49
+ def compress_wastickers(self) -> Tuple[int, int, List[str]]:
50
+ urls: List[str] = []
51
+ title, author, _ = MetadataHandler.get_metadata(
52
+ self.opt_output.dir,
53
+ title=self.opt_output.title,
54
+ author=self.opt_output.author,
55
+ )
56
+ if not title:
57
+ self.cb.put(I("Title is required for compressing .wastickers"))
58
+ return 0, 0, urls
59
+ if not author:
60
+ self.cb.put(I("Author is required for compressing .wastickers"))
61
+ return 0, 0, urls
62
+ packs = MetadataHandler.split_sticker_packs(
63
+ self.opt_output.dir,
64
+ title=title,
65
+ file_per_pack=30,
66
+ separate_image_anim=not self.opt_comp.fake_vid,
67
+ )
68
+
69
+ stickers_total = 0
70
+ for pack_title, stickers in packs.items():
71
+ stickers_total += len(stickers)
72
+ out_f = Path(
73
+ self.opt_output.dir, sanitize_filename(pack_title + ".wastickers")
74
+ ).as_posix()
75
+
76
+ MetadataHandler.set_metadata(
77
+ self.opt_output.dir, author=author, title=title, newline=True
78
+ )
79
+ with zipfile.ZipFile(out_f, "w", zipfile.ZIP_DEFLATED) as zipf:
80
+ cover_opt_comp_merged = copy.deepcopy(self.opt_comp)
81
+ cover_opt_comp_merged.merge(self.spec_cover)
82
+
83
+ cover_path_old = MetadataHandler.get_cover(self.opt_output.dir)
84
+ cover_path_new = Path("bytes.png")
85
+ if cover_path_old is None:
86
+ # First image in the directory, extracting first frame
87
+ first_image = [
88
+ i
89
+ for i in sorted(self.opt_output.dir.iterdir())
90
+ if Path(self.opt_output.dir, i.name).is_file()
91
+ and i.suffix not in (".txt", ".m4a", ".wastickers")
92
+ ][0]
93
+ self.cb.put(I("Creating cover using {}").format(first_image.name))
94
+ success, _, cover_data, _ = StickerConvert.convert(
95
+ Path(self.opt_output.dir, first_image),
96
+ cover_path_new,
97
+ cover_opt_comp_merged,
98
+ self.cb,
99
+ self.cb_return,
100
+ )
101
+ if not success:
102
+ self.cb.put(
103
+ I(
104
+ "Warning: Cannot compress cover {}, unable to create .wastickers"
105
+ ).format(first_image.name)
106
+ )
107
+ continue
108
+ else:
109
+ if not FormatVerify.check_file(
110
+ cover_path_old, spec=self.spec_cover
111
+ ):
112
+ success, _, cover_data, _ = StickerConvert.convert(
113
+ cover_path_old,
114
+ cover_path_new,
115
+ cover_opt_comp_merged,
116
+ self.cb,
117
+ self.cb_return,
118
+ )
119
+ if not success:
120
+ self.cb.put(
121
+ I(
122
+ "Warning: Cannot compress cover {}, unable to create .wastickers"
123
+ ).format(cover_path_old.name)
124
+ )
125
+ continue
126
+ else:
127
+ with open(cover_path_old, "rb") as f:
128
+ cover_data = f.read()
129
+
130
+ assert isinstance(cover_data, bytes)
131
+ zipf.writestr("tray.png", cover_data)
132
+ zipf.write(Path(self.opt_output.dir, "author.txt"), "author.txt")
133
+ zipf.write(Path(self.opt_output.dir, "title.txt"), "title.txt")
134
+
135
+ for num, src in enumerate(stickers):
136
+ self.cb.put(
137
+ I("Verifying {} for compressing into .wastickers").format(src)
138
+ )
139
+
140
+ if self.opt_comp.fake_vid or CodecInfo.is_anim(src):
141
+ ext = ".webp"
142
+ else:
143
+ ext = ".png"
144
+ dst = f"bytes{ext}"
145
+
146
+ if not (
147
+ FormatVerify.check_file(src, spec=self.webp_spec)
148
+ or FormatVerify.check_file(src, spec=self.png_spec)
149
+ ):
150
+ success, _, image_data, _ = StickerConvert.convert(
151
+ Path(src),
152
+ Path(dst),
153
+ self.opt_comp_merged,
154
+ self.cb,
155
+ self.cb_return,
156
+ )
157
+ assert isinstance(image_data, bytes)
158
+ if not success:
159
+ self.cb.put(
160
+ I(
161
+ "Warning: Cannot compress file {}, skip this file..."
162
+ ).format(Path(src).name)
163
+ )
164
+ continue
165
+ else:
166
+ with open(src, "rb") as f:
167
+ image_data = f.read()
168
+
169
+ # Originally the Sticker Maker application name the files with int(time.time())
170
+ zipf.writestr(f"sticker_{num + 1}{ext}", image_data)
171
+
172
+ self.cb.put((out_f))
173
+ urls.append(out_f)
174
+
175
+ return stickers_total, stickers_total, urls
176
+
177
+ @staticmethod
178
+ def start(
179
+ opt_output: OutputOption,
180
+ opt_comp: CompOption,
181
+ opt_cred: CredOption,
182
+ cb: CallbackProtocol,
183
+ cb_return: CallbackReturn,
184
+ ) -> Tuple[int, int, List[str]]:
185
+ exporter = CompressWastickers(opt_output, opt_comp, opt_cred, cb, cb_return)
186
+ return exporter.compress_wastickers()
@@ -1,35 +1,44 @@
1
- #!/usr/bin/env python3
2
-
3
- from sticker_convert.job_option import CompOption, CredOption, OutputOption
4
- from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
5
-
6
-
7
- class UploadBase:
8
- def __init__(
9
- self,
10
- opt_output: OutputOption,
11
- opt_comp: CompOption,
12
- opt_cred: CredOption,
13
- cb: CallbackProtocol,
14
- cb_return: CallbackReturn,
15
- ) -> None:
16
- self.opt_output = opt_output
17
- self.opt_comp = opt_comp
18
- self.opt_cred = opt_cred
19
- self.cb = cb
20
- self.cb_return = cb_return
21
-
22
- self.base_spec = CompOption(
23
- fps_power=self.opt_comp.fps_power,
24
- res_power=self.opt_comp.res_power,
25
- quality_min=self.opt_comp.quality_min,
26
- quality_max=self.opt_comp.quality_max,
27
- quality_power=self.opt_comp.quality_power,
28
- color_min=self.opt_comp.color_min,
29
- color_max=self.opt_comp.color_max,
30
- color_power=self.opt_comp.color_power,
31
- quantize_method=self.opt_comp.quantize_method,
32
- scale_filter=self.opt_comp.scale_filter,
33
- steps=self.opt_comp.steps,
34
- cache_dir=self.opt_comp.cache_dir,
35
- )
1
+ #!/usr/bin/env python3
2
+ from sticker_convert.job_option import CompOption, CredOption, OutputOption
3
+ from sticker_convert.utils.callback import CallbackProtocol, CallbackReturn
4
+ from sticker_convert.utils.translate import I
5
+
6
+
7
+ def get_msg_emoji_txt_required():
8
+ return I(
9
+ "emoji.txt is required for uploading signal stickers\n"
10
+ "emoji.txt generated for you in {}\n"
11
+ "Default emoji is set to {}.\n"
12
+ "Please edit emoji.txt now, then continue"
13
+ )
14
+
15
+
16
+ class UploadBase:
17
+ def __init__(
18
+ self,
19
+ opt_output: OutputOption,
20
+ opt_comp: CompOption,
21
+ opt_cred: CredOption,
22
+ cb: CallbackProtocol,
23
+ cb_return: CallbackReturn,
24
+ ) -> None:
25
+ self.opt_output = opt_output
26
+ self.opt_comp = opt_comp
27
+ self.opt_cred = opt_cred
28
+ self.cb = cb
29
+ self.cb_return = cb_return
30
+
31
+ self.base_spec = CompOption(
32
+ fps_power=self.opt_comp.fps_power,
33
+ res_power=self.opt_comp.res_power,
34
+ quality_min=self.opt_comp.quality_min,
35
+ quality_max=self.opt_comp.quality_max,
36
+ quality_power=self.opt_comp.quality_power,
37
+ color_min=self.opt_comp.color_min,
38
+ color_max=self.opt_comp.color_max,
39
+ color_power=self.opt_comp.color_power,
40
+ quantize_method=self.opt_comp.quantize_method,
41
+ scale_filter=self.opt_comp.scale_filter,
42
+ steps=self.opt_comp.steps,
43
+ cache_dir=self.opt_comp.cache_dir,
44
+ )