sticker-convert 2.13.2.2__py3-none-any.whl → 2.14.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.
@@ -29,6 +29,8 @@
29
29
  "res_h_min": "Set minimum height.",
30
30
  "res_h_max": "Set maximum height.",
31
31
  "res_power": "Between -1 and positive infinity.\nPower lower = More importance of the parameter,\ntry harder to keep higher and not sacrifice.",
32
+ "res_snap_pow2": "Snap resolution to nearest power of 2 (1,2,4,8,16,...).\nIgnored if no power of 2 present between minimum and maximum resolutions",
33
+ "no_res_snap_pow2": "Disable res_snap_pow2",
32
34
  "quality": "Quality higher = Clearer but larger size.",
33
35
  "quality_min": "Set minimum quality.",
34
36
  "quality_max": "Set maximum quality.",
@@ -49,8 +51,9 @@
49
51
  "vid_format": "Set file format if input is animated.",
50
52
  "img_format": "Set file format if input is static.",
51
53
  "fake_vid": "Convert (faking) image to video.\nUseful if:\n(1) Size limit for video is larger than image;\n(2) Mix image and video into same pack.",
54
+ "no_fake_vid": "Disable fake_vid",
52
55
  "scale_filter": "Set scale filter. Default as bicubic. Valid options are:\n- nearest = Use nearest neighbour (Suitable for pixel art)\n- box = Similar to nearest, but better downscaling\n- bilinear = Linear interpolation\n- hamming = Similar to bilinear, but better downscaling\n- bicubic = Cubic spline interpolation\n- lanczos = A high-quality downsampling filter",
53
- "quantize_method": "Set method for quantizing image. Default as imagequant. Valid options are:\n- imagequant = Best quality but slow\n- fastoctree = Fast but image looks chunky\n- none = No image quantizing, large image size as result",
56
+ "quantize_method": "Set method for quantizing image. Default as imagequant. Valid options are:\n- imagequant = Speed+ Compression+ Quality++++ RGBA Supported\n- fastoctree = Speed++, Compression++++ Quality+ RGBA Supported\n- maxcoverage = Speed+++, Compression+++ Quality++ RGBA unsupported\n- mediancut = Speed++++ Compression++ Quality+++ RGBA unsupported\n- none = No image quantizing, large image size as result\nLower quality would make image chunky",
54
57
  "cache_dir": "Set custom cache directory.\nUseful for debugging, or speed up conversion if cache_dir is on RAM disk.",
55
58
  "chromium_path": "Set Chromium(-based)/Chrome browser path.\nRequired for converting from SVG files.\nLeave blank to auto detect",
56
59
  "default_emoji": "Set the default emoji for uploading Signal and Telegram sticker packs."
@@ -63,13 +66,15 @@
63
66
  "telegram_userid": "Set Telegram user_id (From real account, not bot account). Required for uploading Telegram stickers.",
64
67
  "telethon_setup": "Setup Telethon",
65
68
  "kakao_auth_token": "Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx",
66
- "kakao_get_auth": "Generate Kakao auth_token by simulating login. Kakao username, password, country code and phone number are also required.",
67
- "kakao_get_auth_desktop": "Get Kakao auth_token from Kakao Desktop application.",
69
+ "kakao_get_auth_android_login": "Get Kakao auth_token by simulating login from Android. Kakao username, password, country code and phone number required.",
70
+ "kakao_get_auth_desktop_memdump": "Get Kakao auth_token from installed Kakao Desktop application with memdump.",
71
+ "kakao_get_auth_desktop_login": "Get Kakao auth_token by simulating login from Desktop application. Kakao username and password required.",
68
72
  "kakao_bin_path": "Set Kakao Desktop application path for launching and getting auth_token.\nUseful for portable installation.",
69
- "kakao_username": "Set Kakao username, which is email or phone number used for signing up Kakao account\nExample: +447700900142\nRequired for generating Kakao auth_token.",
70
- "kakao_password": "Set Kakao password (Password of Kakao account).\nRequired for generating Kakao auth_token.",
71
- "kakao_country_code": "Set Kakao country code of phone.\nExample: 82 (For korea), 44 (For UK), 1 (For USA).\nRequired for generating Kakao auth_token.",
72
- "kakao_phone_number": "Set Kakao phone number (Phone number associated with your Kakao account)\nDo NOT enter country code\nExample: 7700900142\nUsed for send / receive verification code via SMS.\nRequired for generating Kakao auth_token.",
73
+ "kakao_username": "Set Kakao username, which is email or phone number used for signing up Kakao account\nExample: +447700900142\nRequired for getting Kakao auth_token by simulating android/desktop login.",
74
+ "kakao_password": "Set Kakao password (Password of Kakao account).\nRequired for getting Kakao auth_token by simulating android/desktop login.",
75
+ "kakao_country_code": "Set Kakao country code of phone.\nExample: 82 (For korea), 44 (For UK), 1 (For USA).\nRequired for getting Kakao auth_token by simulating android login.",
76
+ "kakao_phone_number": "Set Kakao phone number (Phone number associated with your Kakao account)\nDo NOT enter country code\nExample: 7700900142\nUsed for send / receive verification code via SMS.\nRequired for getting Kakao auth_token by simulating android login.",
77
+ "kakao_device_uuid": "Set Kakao device uuid for desktop login. Defaults to real device uuid.\nOptional for getting Kakao auth_token by simulating desktop login",
73
78
  "line_get_auth": "Get Line cookies from browser, which is required to create custom message stickers.",
74
79
  "line_cookies": "Set Line cookies, which is required to create custom message stickers.",
75
80
  "viber_auth": "Set Viber authentication data.\nRequired for uploading Viber stickers.",
@@ -11,7 +11,7 @@ from bs4 import BeautifulSoup
11
11
  from sticker_convert.job_option import CredOption
12
12
 
13
13
 
14
- class GetKakaoAuth:
14
+ class GetKakaoAuthAndroidLogin:
15
15
  def __init__(
16
16
  self,
17
17
  opt_cred: CredOption,
@@ -0,0 +1,282 @@
1
+ #!/usr/bin/env python3
2
+ import base64
3
+ import hashlib
4
+ import json
5
+ import os
6
+ import platform
7
+ import shutil
8
+ import socket
9
+ import subprocess
10
+ import time
11
+ import uuid
12
+ from typing import Any, Callable, Optional, Tuple
13
+
14
+ import requests
15
+ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
16
+
17
+ from sticker_convert.job_option import CredOption
18
+
19
+
20
+ class GetKakaoAuthDesktopLogin:
21
+ def __init__(
22
+ self,
23
+ opt_cred: CredOption,
24
+ cb_msg: Callable[..., None] = print,
25
+ cb_msg_block: Callable[..., Any] = input,
26
+ cb_ask_str: Callable[..., str] = input,
27
+ ) -> None:
28
+ self.opt_cred = opt_cred
29
+ self.username = opt_cred.kakao_username
30
+ self.password = opt_cred.kakao_password
31
+
32
+ self.cb_msg = cb_msg
33
+ self.cb_msg_block = cb_msg_block
34
+ self.cb_ask_str = cb_ask_str
35
+
36
+ if platform.system() == "Darwin":
37
+ self.plat = "mac"
38
+ user_agent_os = "Mc"
39
+ self.os_version = platform.mac_ver()[0]
40
+ version = "25.2.0"
41
+ else:
42
+ self.plat = "win32"
43
+ user_agent_os = "Wd"
44
+ if platform.system() == "Windows":
45
+ self.os_version = platform.uname().version
46
+ else:
47
+ self.os_version = "10.0"
48
+ version = "25.7.7"
49
+
50
+ user_agent = f"KT/{version} {user_agent_os}/{self.os_version} en"
51
+ self.headers = {
52
+ "user-agent": user_agent,
53
+ "a": f"{self.plat}/{version}/en",
54
+ "accept": "*/*",
55
+ "accept-encoding": "gzip, deflate, br",
56
+ "accept-language": "en",
57
+ "host": "katalk.kakao.com",
58
+ "Connection": "close",
59
+ }
60
+
61
+ self.device_name = socket.gethostname()
62
+ self.device_uuid = self.get_device_uuid()
63
+
64
+ hash = hashlib.sha512(
65
+ f"KLEAL|{self.username}|{self.device_uuid}|LCNUE|{user_agent}".encode(
66
+ "utf-8"
67
+ )
68
+ ).hexdigest()
69
+ xvc = hash[:16]
70
+
71
+ self.headers_login = self.headers.copy()
72
+ self.headers_login["x-vc"] = xvc
73
+
74
+ def pkcs7_pad(self, m: str) -> str:
75
+ return m + chr(16 - len(m) % 16) * (16 - len(m) % 16)
76
+
77
+ def windows_get_pragma(self, use_wine: bool = False) -> Optional[str]:
78
+ sys_uuid = None
79
+ hdd_model = None
80
+ hdd_serial = None
81
+
82
+ if use_wine and shutil.which("wine") is None:
83
+ return None
84
+
85
+ regkey = "HKEY_CURRENT_USER\\Software\\Kakao\\KakaoTalk\\DeviceInfo"
86
+ wine = "wine " if use_wine else ""
87
+ cmd = f"{wine}reg query '{regkey}' /v Last"
88
+ last_device_info = subprocess.run(
89
+ cmd, stdout=subprocess.PIPE, shell=True
90
+ ).stdout.decode()
91
+ if "REG_SZ" not in last_device_info:
92
+ return None
93
+ last_device_info = last_device_info.split("\n")[2].split()[2]
94
+
95
+ if self.opt_cred.kakao_device_uuid:
96
+ sys_uuid = self.opt_cred.kakao_device_uuid
97
+ else:
98
+ cmd = f"{wine}reg query '{regkey}\\{last_device_info}' /v sys_uuid"
99
+ sys_uuid = subprocess.run(
100
+ cmd, stdout=subprocess.PIPE, shell=True
101
+ ).stdout.decode()
102
+ if "REG_SZ" in sys_uuid:
103
+ sys_uuid = sys_uuid.split("\n")[2].split()[2]
104
+
105
+ cmd = f"{wine}reg query '{regkey}\\{last_device_info}' /v hdd_model"
106
+ hdd_model = subprocess.run(
107
+ cmd, stdout=subprocess.PIPE, shell=True
108
+ ).stdout.decode()
109
+ if "REG_SZ" in hdd_model:
110
+ hdd_model = hdd_model.split("\n")[2].split()[2]
111
+
112
+ cmd = f"{wine}reg query '{regkey}\\{last_device_info}' /v hdd_serial"
113
+ hdd_serial = subprocess.run(
114
+ cmd, stdout=subprocess.PIPE, shell=True
115
+ ).stdout.decode()
116
+ if "REG_SZ" in hdd_serial:
117
+ hdd_serial = hdd_serial.split("\n")[2].split()[2]
118
+
119
+ if sys_uuid and hdd_model and hdd_serial:
120
+ return f"{sys_uuid}|{hdd_model}|{hdd_serial}"
121
+ else:
122
+ return None
123
+
124
+ def get_device_uuid(self) -> str:
125
+ if platform.system() == "Darwin":
126
+ cmd = "ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID | awk '{print $3}'"
127
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True, check=True)
128
+ hwid = result.stdout.decode().strip().replace('"', "")
129
+
130
+ hwid_sha1 = bytes.fromhex(hashlib.sha1(hwid.encode()).hexdigest())
131
+ hwid_sha256 = bytes.fromhex(hashlib.sha256(hwid.encode()).hexdigest())
132
+
133
+ return base64.b64encode(hwid_sha1 + hwid_sha256).decode()
134
+ else:
135
+ use_wine = True if platform.system != "Windows" else False
136
+ pragma = self.windows_get_pragma(use_wine=use_wine)
137
+ if pragma is None:
138
+ if platform.system == "Windows":
139
+ if self.opt_cred.kakao_device_uuid:
140
+ sys_uuid = self.opt_cred.kakao_device_uuid
141
+ else:
142
+ cmd = "wmic csproduct get uuid"
143
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True)
144
+ sys_uuid = result.stdout.decode().split("\n")[1].strip()
145
+ cmd = "wmic diskdrive get Model"
146
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True)
147
+ hdd_model = result.stdout.decode().split("\n")[1].strip()
148
+ cmd = "wmic diskdrive get SerialNumber"
149
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True)
150
+ hdd_serial = result.stdout.decode().split("\n")[1].strip()
151
+ else:
152
+ if self.opt_cred.kakao_device_uuid:
153
+ sys_uuid = self.opt_cred.kakao_device_uuid
154
+ else:
155
+ product_uuid_path = "/sys/devices/virtual/dmi/id/product_uuid"
156
+ sys_uuid = None
157
+ if os.access(product_uuid_path, os.R_OK):
158
+ cmd = f"cat {product_uuid_path}"
159
+ result = subprocess.run(
160
+ cmd, stdout=subprocess.PIPE, shell=True
161
+ )
162
+ if result.returncode == 0:
163
+ sys_uuid = result.stdout.decode().strip()
164
+ if sys_uuid is None:
165
+ sys_uuid = str(uuid.uuid4()).upper()
166
+ self.opt_cred.kakao_device_uuid = sys_uuid
167
+ hdd_model = "Wine Disk Drive"
168
+ hdd_serial = ""
169
+ pragma = f"{sys_uuid}|{hdd_model}|{hdd_serial}"
170
+
171
+ aes_key = bytes.fromhex("9FBAE3118FDE5DEAEB8279D08F1D4C79")
172
+ aes_iv = bytes.fromhex("00000000000000000000000000000000")
173
+
174
+ cipher = Cipher(algorithms.AES(aes_key), modes.CBC(aes_iv))
175
+ encryptor = cipher.encryptor()
176
+ padded = self.pkcs7_pad(pragma).encode()
177
+ encrypted_pragma = encryptor.update(padded) + encryptor.finalize()
178
+ pragma_hash = hashlib.sha512(encrypted_pragma).digest()
179
+
180
+ return base64.b64encode(pragma_hash).decode()
181
+
182
+ def login(self, forced: bool = False):
183
+ data = {
184
+ "device_name": self.device_name,
185
+ "device_uuid": self.device_uuid,
186
+ "email": self.username,
187
+ "os_version": self.os_version,
188
+ "password": self.password,
189
+ "permanent": "1",
190
+ }
191
+
192
+ if forced:
193
+ data["forced"] = "1"
194
+
195
+ headers = self.headers_login.copy()
196
+ headers["content-type"] = "application/x-www-form-urlencoded"
197
+ response = requests.post(
198
+ f"https://katalk.kakao.com/{self.plat}/account/login.json",
199
+ headers=headers,
200
+ data=data,
201
+ )
202
+
203
+ return json.loads(response.text)
204
+
205
+ def generate_passcode(self):
206
+ data = {
207
+ "password": self.password,
208
+ "permanent": True,
209
+ "device": {
210
+ "name": self.device_name,
211
+ "osVersion": self.os_version,
212
+ "uuid": self.device_uuid,
213
+ },
214
+ "email": self.username,
215
+ }
216
+
217
+ if platform.system() == "Darwin":
218
+ cmd = "sysctl -n hw.model"
219
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True, check=True)
220
+ data["device"]["model"] = result.stdout.decode().strip() # type: ignore
221
+
222
+ headers = self.headers_login.copy()
223
+ headers["content-type"] = "application/json"
224
+ response = requests.post(
225
+ f"https://katalk.kakao.com/{self.plat}/account/passcodeLogin/generate",
226
+ headers=headers,
227
+ json=data,
228
+ )
229
+
230
+ return json.loads(response.text)
231
+
232
+ def register_device(self):
233
+ data = {
234
+ "device": {"uuid": self.device_uuid},
235
+ "email": self.username,
236
+ "password": self.password,
237
+ }
238
+
239
+ headers = self.headers_login.copy()
240
+ headers["content-type"] = "application/json"
241
+ response = None
242
+
243
+ response = requests.post(
244
+ f"https://katalk.kakao.com/{self.plat}/account/passcodeLogin/registerDevice",
245
+ headers=headers,
246
+ json=data,
247
+ )
248
+ return json.loads(response.text)
249
+
250
+ def get_cred(self) -> Tuple[Optional[str], str]:
251
+ self.cb_msg("Get authorization token")
252
+ rjson = self.login()
253
+ access_token = rjson.get("access_token")
254
+ if access_token is not None:
255
+ auth_token = access_token + "-" + self.device_uuid
256
+ return auth_token, f"Login successful, auth_token: {auth_token}"
257
+
258
+ rjson = self.generate_passcode()
259
+ if rjson.get("status") != 0:
260
+ return None, f"Failed to generate passcode: {rjson}"
261
+ passcode = rjson["passcode"]
262
+
263
+ start_time = time.time()
264
+ register_success = False
265
+ while time.time() - start_time < 60:
266
+ self.cb_ask_str(f"Please enter passcode within 1 minute: {passcode}")
267
+ rjson = self.register_device()
268
+ if rjson["status"] == 0:
269
+ register_success = True
270
+ break
271
+ if register_success is False:
272
+ return None, f"Failed to register device: {rjson}"
273
+
274
+ rjson = self.login()
275
+ if rjson.get("status") == -101:
276
+ rjson = self.login(forced=True)
277
+ access_token = rjson.get("access_token")
278
+ if access_token is None:
279
+ return None, f"Failed to login after registering device: {rjson}"
280
+
281
+ auth_token = access_token + "-" + self.device_uuid
282
+ return auth_token, f"Login successful, auth_token: {auth_token}"
@@ -26,9 +26,13 @@ MSG_LAUNCH_FAIL = "Failed to launch Kakao"
26
26
  MSG_PERMISSION_ERROR = "Failed to read Kakao process memory"
27
27
 
28
28
 
29
- class GetKakaoDesktopAuth:
29
+ class GetKakaoAuthDesktopMemdump:
30
30
  def __init__(self, cb_ask_str: Callable[..., str] = input) -> None:
31
31
  self.cb_ask_str = cb_ask_str
32
+ if platform.system() == "Windows":
33
+ self.auth_token_length = 64
34
+ else:
35
+ self.auth_token_length = 52
32
36
 
33
37
  def launch_kakao(self, kakao_bin_path: str) -> None:
34
38
  if platform.system() == "Windows":
@@ -69,12 +73,11 @@ class GetKakaoDesktopAuth:
69
73
  ):
70
74
  auth_token_addr = cast(int, address) + 15
71
75
  auth_token_bytes = process.read_process_memory(
72
- auth_token_addr, bytes, 200
76
+ auth_token_addr, bytes, self.auth_token_length + 1
73
77
  )
74
- auth_token_term = auth_token_bytes.find(b"\x00")
75
- if auth_token_term == -1:
78
+ if auth_token_bytes[-1:] != b"\x00":
76
79
  continue
77
- auth_token_candidate = auth_token_bytes[:auth_token_term].decode(
80
+ auth_token_candidate = auth_token_bytes[:-1].decode(
78
81
  encoding="ascii"
79
82
  )
80
83
  if len(auth_token_candidate) > 150:
@@ -126,13 +129,12 @@ class GetKakaoDesktopAuth:
126
129
  for i in re.finditer(b"authorization: ", s):
127
130
  auth_token_addr = i.start() + 15
128
131
 
129
- auth_token_bytes = s[auth_token_addr : auth_token_addr + 200]
130
- auth_token_term = auth_token_bytes.find(b"\x00")
131
- if auth_token_term == -1:
132
+ auth_token_bytes = s[
133
+ auth_token_addr : auth_token_addr + self.auth_token_length + 1
134
+ ]
135
+ if auth_token_bytes[-1:] != b"\x00":
132
136
  return None, MSG_NO_AUTH
133
- auth_token_candidate = auth_token_bytes[:auth_token_term].decode(
134
- encoding="ascii"
135
- )
137
+ auth_token_candidate = auth_token_bytes[:-1].decode(encoding="ascii")
136
138
  if len(auth_token_candidate) > 150:
137
139
  auth_token = auth_token_candidate
138
140
  break
@@ -215,6 +217,10 @@ class GetKakaoDesktopAuth:
215
217
  kakao_bin_path = os.path.expandvars(
216
218
  "%programfiles(x86)%\\Kakao\\KakaoTalk\\KakaoTalk.exe"
217
219
  )
220
+ if Path(kakao_bin_path).exists() is False:
221
+ kakao_bin_path = os.path.expandvars(
222
+ "%programfiles%\\Kakao\\KakaoTalk\\KakaoTalk.exe"
223
+ )
218
224
  elif platform.system() == "Darwin":
219
225
  kakao_bin_path = "/Applications/KakaoTalk.app"
220
226
  else:
@@ -67,11 +67,12 @@ class BotAPI(TelegramAPI):
67
67
  self.cb.put("Token required for downloading from telegram")
68
68
  return False
69
69
 
70
- if opt_cred.telegram_userid.isnumeric():
71
- self.telegram_userid = int(opt_cred.telegram_userid)
72
- else:
73
- self.cb.put("Invalid userid, should contain numbers only")
74
- return False
70
+ if opt_cred.telegram_userid:
71
+ if opt_cred.telegram_userid.isnumeric():
72
+ self.telegram_userid = int(opt_cred.telegram_userid)
73
+ else:
74
+ self.cb.put("Invalid userid, should contain numbers only")
75
+ return False
75
76
 
76
77
  self.application = ( # type: ignore
77
78
  ApplicationBuilder()
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- __version__ = "2.13.2.2"
3
+ __version__ = "2.14.0.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sticker-convert
3
- Version: 2.13.2.2
3
+ Version: 2.14.0.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>
@@ -364,27 +364,28 @@ Requires-Python: >=3.9
364
364
  Description-Content-Type: text/markdown
365
365
  License-File: LICENSE
366
366
  Requires-Dist: aiolimiter~=1.2.1
367
- Requires-Dist: anyio~=4.9.0
367
+ Requires-Dist: anyio~=4.10.0
368
368
  Requires-Dist: apngasm_python~=1.3.2
369
- Requires-Dist: av>=13.1.0
370
- Requires-Dist: beautifulsoup4~=4.13.4
371
- Requires-Dist: cryptg~=0.5.0.post0
369
+ Requires-Dist: av<15,>=13.1.0
370
+ Requires-Dist: beautifulsoup4~=4.13.5
371
+ Requires-Dist: cryptg~=0.5.1
372
+ Requires-Dist: cryptography~=46.0.1
372
373
  Requires-Dist: rookiepy~=0.5.6
373
374
  Requires-Dist: httpx~=0.28.1
374
375
  Requires-Dist: imagequant~=1.1.4
375
376
  Requires-Dist: memory-tempfile~=2.2.3
376
377
  Requires-Dist: mergedeep~=1.3.4
377
378
  Requires-Dist: numpy>=1.22.4
378
- Requires-Dist: Pillow~=11.2.1
379
- Requires-Dist: pyoxipng~=9.1.0
380
- Requires-Dist: python-telegram-bot~=22.1
379
+ Requires-Dist: Pillow~=11.3.0
380
+ Requires-Dist: pyoxipng~=9.1.1
381
+ Requires-Dist: python-telegram-bot~=22.4
381
382
  Requires-Dist: psutil~=7.0.0
382
- Requires-Dist: PyMemoryEditor~=1.5.22
383
+ Requires-Dist: PyMemoryEditor~=1.5.24
383
384
  Requires-Dist: requests~=2.32.4
384
- Requires-Dist: rlottie_python~=1.3.7
385
+ Requires-Dist: rlottie_python~=1.3.8
385
386
  Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
386
387
  Requires-Dist: socksio~=1.0.0
387
- Requires-Dist: telethon~=1.40.0
388
+ Requires-Dist: telethon~=1.41.2
388
389
  Requires-Dist: tqdm~=4.67.1
389
390
  Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
390
391
  Requires-Dist: websocket_client~=1.8.0
@@ -504,20 +505,22 @@ usage: sticker-convert.py [-h] [--version] [--no-confirm] [--no-progress] [--cus
504
505
  [--no-compress]
505
506
  [--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,band,ogq,viber,discord,discord_emoji,imessage_small,imessage_medium,imessage_large,custom}]
506
507
  [--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX] [--fps-power FPS_POWER]
507
- [--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]
508
- [--res-h-max RES_H_MAX] [--res-power RES_POWER] [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX]
509
- [--quality-power QUALITY_POWER] [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
510
- [--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--padding-percent PADDING_PERCENT]
511
- [--bg-color BG_COLOR] [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
512
- [--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER] [--quantize-method QUANTIZE_METHOD]
513
- [--cache-dir CACHE_DIR] [--chromium-path CHROMIUM_PATH] [--default-emoji DEFAULT_EMOJI] [--signal-uuid SIGNAL_UUID]
514
- [--signal-password SIGNAL_PASSWORD] [--signal-get-auth] [--telegram-token TELEGRAM_TOKEN]
515
- [--telegram-userid TELEGRAM_USERID] [--telethon-setup] [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth]
516
- [--kakao-get-auth-desktop] [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
508
+ [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN] [--res-w-max RES_W_MAX]
509
+ [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER] [--res-snap-pow2]
510
+ [--no-res-snap-pow2] [--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX] [--quality-power QUALITY_POWER]
511
+ [--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER] [--duration-min DURATION_MIN]
512
+ [--duration-max DURATION_MAX] [--padding-percent PADDING_PERCENT] [--bg-color BG_COLOR]
513
+ [--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
514
+ [--img-format IMG_FORMAT] [--fake-vid] [--no-fake-vid] [--scale-filter SCALE_FILTER]
515
+ [--quantize-method QUANTIZE_METHOD] [--cache-dir CACHE_DIR] [--chromium-path CHROMIUM_PATH]
516
+ [--default-emoji DEFAULT_EMOJI] [--signal-uuid SIGNAL_UUID] [--signal-password SIGNAL_PASSWORD]
517
+ [--signal-get-auth] [--telegram-token TELEGRAM_TOKEN] [--telegram-userid TELEGRAM_USERID] [--telethon-setup]
518
+ [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth-android-login] [--kakao-get-auth-desktop-memdump]
519
+ [--kakao-get-auth-desktop-login] [--kakao-bin-path KAKAO_BIN_PATH] [--kakao-username KAKAO_USERNAME]
517
520
  [--kakao-password KAKAO_PASSWORD] [--kakao-country-code KAKAO_COUNTRY_CODE]
518
- [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth] [--line-cookies LINE_COOKIES] [--viber-auth VIBER_AUTH]
519
- [--viber-get-auth VIBER_GET_AUTH] [--viber-bin-path VIBER_BIN_PATH] [--discord-get-auth]
520
- [--discord-token DISCORD_TOKEN] [--save-cred]
521
+ [--kakao-phone-number KAKAO_PHONE_NUMBER] [--kakao-device-uuid KAKAO_DEVICE_UUID] [--line-get-auth]
522
+ [--line-cookies LINE_COOKIES] [--viber-auth VIBER_AUTH] [--viber-get-auth VIBER_GET_AUTH]
523
+ [--viber-bin-path VIBER_BIN_PATH] [--discord-get-auth] [--discord-token DISCORD_TOKEN] [--save-cred]
521
524
 
522
525
  CLI for stickers-convert
523
526
 
@@ -619,6 +622,9 @@ Compression options:
619
622
  Between -1 and positive infinity.
620
623
  Power lower = More importance of the parameter,
621
624
  try harder to keep higher and not sacrifice.
625
+ --res-snap-pow2 Snap resolution to nearest power of 2 (1,2,4,8,16,...).
626
+ Ignored if no power of 2 present between minimum and maximum resolutions
627
+ --no-res-snap-pow2 Disable res_snap_pow2
622
628
  --quality-min QUALITY_MIN
623
629
  Set minimum quality.
624
630
  --quality-max QUALITY_MAX
@@ -653,6 +659,7 @@ Compression options:
653
659
  Useful if:
654
660
  (1) Size limit for video is larger than image;
655
661
  (2) Mix image and video into same pack.
662
+ --no-fake-vid Disable fake_vid
656
663
  --scale-filter SCALE_FILTER
657
664
  Set scale filter. Default as bicubic. Valid options are:
658
665
  - nearest = Use nearest neighbour (Suitable for pixel art)
@@ -663,9 +670,12 @@ Compression options:
663
670
  - lanczos = A high-quality downsampling filter
664
671
  --quantize-method QUANTIZE_METHOD
665
672
  Set method for quantizing image. Default as imagequant. Valid options are:
666
- - imagequant = Best quality but slow
667
- - fastoctree = Fast but image looks chunky
673
+ - imagequant = Speed+ Compression+ Quality++++ RGBA Supported
674
+ - fastoctree = Speed++, Compression++++ Quality+ RGBA Supported
675
+ - maxcoverage = Speed+++, Compression+++ Quality++ RGBA unsupported
676
+ - mediancut = Speed++++ Compression++ Quality+++ RGBA unsupported
668
677
  - none = No image quantizing, large image size as result
678
+ Lower quality would make image chunky
669
679
  --cache-dir CACHE_DIR
670
680
  Set custom cache directory.
671
681
  Useful for debugging, or speed up conversion if cache_dir is on RAM disk.
@@ -689,29 +699,35 @@ Credentials options:
689
699
  --telethon-setup Setup Telethon
690
700
  --kakao-auth-token KAKAO_AUTH_TOKEN
691
701
  Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx
692
- --kakao-get-auth Generate Kakao auth_token by simulating login. Kakao username, password, country code and phone number are also required.
693
- --kakao-get-auth-desktop
694
- Get Kakao auth_token from Kakao Desktop application.
702
+ --kakao-get-auth-android-login
703
+ Get Kakao auth_token by simulating login from Android. Kakao username, password, country code and phone number required.
704
+ --kakao-get-auth-desktop-memdump
705
+ Get Kakao auth_token from installed Kakao Desktop application with memdump.
706
+ --kakao-get-auth-desktop-login
707
+ Get Kakao auth_token by simulating login from Desktop application. Kakao username and password required.
695
708
  --kakao-bin-path KAKAO_BIN_PATH
696
709
  Set Kakao Desktop application path for launching and getting auth_token.
697
710
  Useful for portable installation.
698
711
  --kakao-username KAKAO_USERNAME
699
712
  Set Kakao username, which is email or phone number used for signing up Kakao account
700
713
  Example: +447700900142
701
- Required for generating Kakao auth_token.
714
+ Required for getting Kakao auth_token by simulating android/desktop login.
702
715
  --kakao-password KAKAO_PASSWORD
703
716
  Set Kakao password (Password of Kakao account).
704
- Required for generating Kakao auth_token.
717
+ Required for getting Kakao auth_token by simulating android/desktop login.
705
718
  --kakao-country-code KAKAO_COUNTRY_CODE
706
719
  Set Kakao country code of phone.
707
720
  Example: 82 (For korea), 44 (For UK), 1 (For USA).
708
- Required for generating Kakao auth_token.
721
+ Required for getting Kakao auth_token by simulating android login.
709
722
  --kakao-phone-number KAKAO_PHONE_NUMBER
710
723
  Set Kakao phone number (Phone number associated with your Kakao account)
711
724
  Do NOT enter country code
712
725
  Example: 7700900142
713
726
  Used for send / receive verification code via SMS.
714
- Required for generating Kakao auth_token.
727
+ Required for getting Kakao auth_token by simulating android login.
728
+ --kakao-device-uuid KAKAO_DEVICE_UUID
729
+ Set Kakao device uuid for desktop login. Defaults to real device uuid.
730
+ Optional for getting Kakao auth_token by simulating desktop login
715
731
  --line-get-auth Get Line cookies from browser, which is required to create custom message stickers.
716
732
  --line-cookies LINE_COOKIES
717
733
  Set Line cookies, which is required to create custom message stickers.