sticker-convert 2.14.0.0__py3-none-any.whl → 2.15.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.
- sticker_convert/auth/__init__.py +0 -0
- sticker_convert/auth/auth_base.py +19 -0
- sticker_convert/{utils/auth/get_discord_auth.py → auth/auth_discord.py} +40 -13
- sticker_convert/{utils/auth/get_kakao_auth_android_login.py → auth/auth_kakao_android_login.py} +80 -84
- sticker_convert/{utils/auth/get_kakao_auth_desktop_login.py → auth/auth_kakao_desktop_login.py} +69 -28
- sticker_convert/{utils/auth/get_kakao_auth_desktop_memdump.py → auth/auth_kakao_desktop_memdump.py} +31 -24
- sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +21 -6
- sticker_convert/{utils/auth/get_signal_auth.py → auth/auth_signal.py} +18 -20
- sticker_convert/auth/auth_telethon.py +151 -0
- sticker_convert/{utils/auth/get_viber_auth.py → auth/auth_viber.py} +19 -11
- sticker_convert/{utils/auth → auth}/telegram_api.py +4 -13
- sticker_convert/cli.py +44 -70
- sticker_convert/downloaders/download_line.py +2 -2
- sticker_convert/downloaders/download_telegram.py +1 -1
- sticker_convert/gui.py +15 -100
- sticker_convert/gui_components/frames/comp_frame.py +12 -4
- sticker_convert/gui_components/frames/config_frame.py +14 -6
- sticker_convert/gui_components/frames/control_frame.py +1 -1
- sticker_convert/gui_components/frames/cred_frame.py +6 -8
- sticker_convert/gui_components/windows/advanced_compression_window.py +3 -4
- sticker_convert/gui_components/windows/base_window.py +7 -2
- sticker_convert/gui_components/windows/discord_get_auth_window.py +3 -7
- sticker_convert/gui_components/windows/kakao_get_auth_window.py +79 -51
- sticker_convert/gui_components/windows/line_get_auth_window.py +5 -14
- sticker_convert/gui_components/windows/signal_get_auth_window.py +4 -12
- sticker_convert/gui_components/windows/viber_get_auth_window.py +8 -11
- sticker_convert/job.py +16 -32
- sticker_convert/uploaders/upload_telegram.py +1 -1
- sticker_convert/utils/callback.py +238 -6
- sticker_convert/version.py +1 -1
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/METADATA +5 -5
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/RECORD +36 -34
- sticker_convert/utils/auth/telethon_setup.py +0 -97
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/WHEEL +0 -0
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/licenses/LICENSE +0 -0
- {sticker_convert-2.14.0.0.dist-info → sticker_convert-2.15.0.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
+
from functools import partial
|
3
|
+
from getpass import getpass
|
2
4
|
from multiprocessing import Event, Manager
|
3
5
|
from multiprocessing.managers import ListProxy, SyncManager
|
4
6
|
from queue import Queue
|
@@ -19,6 +21,9 @@ if TYPE_CHECKING:
|
|
19
21
|
ResponseListType = ListProxy[ResponseItemType] # type: ignore
|
20
22
|
CbQueueType = Queue[CbQueueItemType] # type: ignore
|
21
23
|
WorkQueueType = Queue[WorkQueueItemType] # type: ignore
|
24
|
+
from ttkbootstrap import Toplevel # type: ignore
|
25
|
+
|
26
|
+
from sticker_convert.gui import GUI # type: ignore
|
22
27
|
else:
|
23
28
|
ResultsListType = List[Any]
|
24
29
|
ResponseListType = List[ResponseItemType]
|
@@ -51,12 +56,13 @@ class CallbackProtocol(Protocol):
|
|
51
56
|
def put(self, i: Union[CbQueueItemType, str]) -> Any: ...
|
52
57
|
|
53
58
|
|
54
|
-
class
|
59
|
+
class CallbackCli(CallbackProtocol):
|
55
60
|
def __init__(
|
56
61
|
self,
|
57
62
|
msg: Optional[Callable[..., None]] = None,
|
58
63
|
bar: Optional[Callable[..., None]] = None,
|
59
64
|
msg_block: Optional[Callable[..., None]] = None,
|
65
|
+
msg_dynamic: Optional[Callable[..., bool]] = None,
|
60
66
|
ask_bool: Optional[Callable[..., bool]] = None,
|
61
67
|
ask_str: Optional[Callable[..., str]] = None,
|
62
68
|
silent: bool = False,
|
@@ -80,6 +86,11 @@ class Callback(CallbackProtocol):
|
|
80
86
|
else:
|
81
87
|
self.msg_block = self.cb_msg_block
|
82
88
|
|
89
|
+
if msg_dynamic:
|
90
|
+
self.msg_dynamic = msg_dynamic
|
91
|
+
else:
|
92
|
+
self.msg_dynamic = self.cb_msg_dynamic
|
93
|
+
|
83
94
|
if ask_bool:
|
84
95
|
self.ask_bool = ask_bool
|
85
96
|
else:
|
@@ -136,6 +147,16 @@ class Callback(CallbackProtocol):
|
|
136
147
|
if not self.no_confirm:
|
137
148
|
input("Press Enter to continue...")
|
138
149
|
|
150
|
+
def cb_msg_dynamic(self, *args: Any) -> bool:
|
151
|
+
message = args[0]
|
152
|
+
|
153
|
+
if message is None:
|
154
|
+
print()
|
155
|
+
else:
|
156
|
+
print(message, end="\r", flush=True)
|
157
|
+
|
158
|
+
return True
|
159
|
+
|
139
160
|
def cb_ask_bool(self, *args: Any, **kwargs: Any) -> bool:
|
140
161
|
question = args[0]
|
141
162
|
|
@@ -158,17 +179,23 @@ class Callback(CallbackProtocol):
|
|
158
179
|
|
159
180
|
def cb_ask_str(
|
160
181
|
self,
|
161
|
-
|
182
|
+
question: Optional[str] = None,
|
162
183
|
initialvalue: Optional[str] = None,
|
163
184
|
cli_show_initialvalue: bool = True,
|
185
|
+
password: bool = False,
|
164
186
|
) -> str:
|
165
|
-
self.msg(
|
187
|
+
self.msg(question)
|
166
188
|
|
167
189
|
hint = ""
|
168
190
|
if cli_show_initialvalue and initialvalue:
|
169
191
|
hint = f" [Default: {initialvalue}]"
|
170
192
|
|
171
|
-
|
193
|
+
if password is True:
|
194
|
+
if question is None:
|
195
|
+
question = "Password: "
|
196
|
+
response = getpass(question)
|
197
|
+
else:
|
198
|
+
response = input(f"Enter your response and press enter{hint} > ")
|
172
199
|
|
173
200
|
if initialvalue and not response:
|
174
201
|
response = initialvalue
|
@@ -179,7 +206,210 @@ class Callback(CallbackProtocol):
|
|
179
206
|
if isinstance(i, tuple):
|
180
207
|
action = i[0]
|
181
208
|
if len(i) >= 2:
|
182
|
-
args: Tuple[
|
209
|
+
args: Tuple[Any, ...] = i[1] if i[1] else tuple()
|
210
|
+
else:
|
211
|
+
args = tuple()
|
212
|
+
if len(i) >= 3:
|
213
|
+
kwargs: Dict[str, Any] = i[2] if i[2] else {}
|
214
|
+
else:
|
215
|
+
kwargs = {}
|
216
|
+
else:
|
217
|
+
action = i
|
218
|
+
args = tuple()
|
219
|
+
kwargs = {}
|
220
|
+
|
221
|
+
# Fake implementation for Queue.put()
|
222
|
+
if action is None:
|
223
|
+
return None
|
224
|
+
if action == "msg":
|
225
|
+
self.msg(*args, **kwargs)
|
226
|
+
elif action == "bar":
|
227
|
+
self.bar(**kwargs)
|
228
|
+
elif action == "update_bar":
|
229
|
+
self.bar(update_bar=1)
|
230
|
+
elif action == "msg_block":
|
231
|
+
return self.msg_block(*args, **kwargs)
|
232
|
+
elif action == "msg_dynamic":
|
233
|
+
return self.msg_dynamic(*args, **kwargs)
|
234
|
+
elif action == "ask_bool":
|
235
|
+
return self.ask_bool(*args, **kwargs)
|
236
|
+
elif action == "ask_str":
|
237
|
+
return self.ask_str(*args, **kwargs)
|
238
|
+
else:
|
239
|
+
self.msg(action)
|
240
|
+
return None
|
241
|
+
|
242
|
+
|
243
|
+
class CallbackGui(CallbackProtocol):
|
244
|
+
def __init__(self, gui: "GUI"):
|
245
|
+
from ttkbootstrap import Label, Progressbar, StringVar # type: ignore
|
246
|
+
|
247
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
248
|
+
from sticker_convert.job import Job
|
249
|
+
|
250
|
+
self.gui = gui
|
251
|
+
self.job: Optional[Job] = None
|
252
|
+
self.msg_dynamic_window: Optional[BaseWindow] = None
|
253
|
+
self.message_var = StringVar(self.gui)
|
254
|
+
self.msg_dynamic_label: Optional[Label] = None
|
255
|
+
self.msg_dynamic_bar: Optional[Progressbar] = None
|
256
|
+
|
257
|
+
self.ask_str = self.cb_ask_str
|
258
|
+
self.ask_bool = self.cb_ask_bool
|
259
|
+
self.msg = self.cb_msg
|
260
|
+
self.msg_block = self.cb_msg_block
|
261
|
+
self.msg_dynamic = self.cb_msg_dynamic
|
262
|
+
self.bar = self.cb_bar
|
263
|
+
|
264
|
+
def cb_ask_str(
|
265
|
+
self,
|
266
|
+
question: str,
|
267
|
+
initialvalue: Optional[str] = None,
|
268
|
+
cli_show_initialvalue: bool = True,
|
269
|
+
password: bool = False,
|
270
|
+
parent: Optional[object] = None,
|
271
|
+
) -> str:
|
272
|
+
from ttkbootstrap import Querybox # type: ignore
|
273
|
+
|
274
|
+
self.gui.action = partial(
|
275
|
+
Querybox.get_string, # type: ignore
|
276
|
+
question,
|
277
|
+
title="sticker-convert",
|
278
|
+
initialvalue=initialvalue,
|
279
|
+
parent=parent,
|
280
|
+
)
|
281
|
+
self.gui.event_generate("<<exec_in_main>>")
|
282
|
+
self.gui.response_event.wait()
|
283
|
+
self.gui.response_event.clear()
|
284
|
+
|
285
|
+
if self.gui.response is None:
|
286
|
+
return ""
|
287
|
+
elif isinstance(self.gui.response, str):
|
288
|
+
return self.gui.response
|
289
|
+
else:
|
290
|
+
raise RuntimeError(f"Invalid response in cb_ask_str: {self.gui.response}")
|
291
|
+
|
292
|
+
def cb_ask_bool(self, question: str, parent: Optional["Toplevel"] = None) -> bool:
|
293
|
+
from ttkbootstrap.dialogs import Messagebox # type: ignore
|
294
|
+
|
295
|
+
self.gui.action = partial(
|
296
|
+
Messagebox.yesno, # type: ignore
|
297
|
+
question,
|
298
|
+
title="sticker-convert",
|
299
|
+
parent=parent,
|
300
|
+
)
|
301
|
+
self.gui.event_generate("<<exec_in_main>>")
|
302
|
+
self.gui.response_event.wait()
|
303
|
+
self.gui.response_event.clear()
|
304
|
+
|
305
|
+
if self.gui.response == "Yes":
|
306
|
+
return True
|
307
|
+
return False
|
308
|
+
|
309
|
+
def cb_msg(self, *args: Any, **kwargs: Any) -> None:
|
310
|
+
self.gui.progress_frame.update_message_box(*args, **kwargs)
|
311
|
+
|
312
|
+
def cb_msg_block(
|
313
|
+
self,
|
314
|
+
message: Optional[str] = None,
|
315
|
+
parent: Optional[object] = None,
|
316
|
+
**_kwargs: Any,
|
317
|
+
) -> Any:
|
318
|
+
from ttkbootstrap.dialogs import Messagebox # type: ignore
|
319
|
+
|
320
|
+
self.gui.action = partial(
|
321
|
+
Messagebox.show_info, # type: ignore
|
322
|
+
message,
|
323
|
+
title="sticker-convert",
|
324
|
+
parent=parent,
|
325
|
+
)
|
326
|
+
self.gui.event_generate("<<exec_in_main>>")
|
327
|
+
self.gui.response_event.wait()
|
328
|
+
self.gui.response_event.clear()
|
329
|
+
|
330
|
+
return self.gui.response
|
331
|
+
|
332
|
+
def cb_msg_dynamic(
|
333
|
+
self,
|
334
|
+
message: Optional[str] = None,
|
335
|
+
parent: Optional["Toplevel"] = None,
|
336
|
+
**_kwargs: Any,
|
337
|
+
) -> bool:
|
338
|
+
from ttkbootstrap import Label, Progressbar # type: ignore
|
339
|
+
|
340
|
+
from sticker_convert.gui_components.gui_utils import GUIUtils
|
341
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
342
|
+
|
343
|
+
self.gui.action = None
|
344
|
+
if self.msg_dynamic_window is None:
|
345
|
+
if message is not None:
|
346
|
+
self.msg_dynamic_window = BaseWindow(self.gui, parent)
|
347
|
+
self.msg_dynamic_window.wm_title("sticker-convert")
|
348
|
+
self.message_var.set(message)
|
349
|
+
self.msg_dynamic_label = Label(
|
350
|
+
self.msg_dynamic_window.scrollable_frame,
|
351
|
+
textvariable=self.message_var,
|
352
|
+
)
|
353
|
+
self.msg_dynamic_bar = Progressbar(
|
354
|
+
self.msg_dynamic_window.scrollable_frame,
|
355
|
+
orient="horizontal",
|
356
|
+
mode="indeterminate",
|
357
|
+
)
|
358
|
+
self.msg_dynamic_bar.start(50)
|
359
|
+
self.msg_dynamic_label.pack()
|
360
|
+
self.msg_dynamic_bar.pack(fill="x")
|
361
|
+
self.gui.action = partial(
|
362
|
+
GUIUtils.finalize_window, self.msg_dynamic_window
|
363
|
+
)
|
364
|
+
print(message, end="\r", flush=True)
|
365
|
+
ret = True
|
366
|
+
else:
|
367
|
+
print()
|
368
|
+
ret = False
|
369
|
+
elif self.msg_dynamic_window.winfo_exists() == 0:
|
370
|
+
self.msg_dynamic_window = None
|
371
|
+
print()
|
372
|
+
ret = False
|
373
|
+
else:
|
374
|
+
if message is None:
|
375
|
+
|
376
|
+
def _action():
|
377
|
+
assert self.msg_dynamic_window is not None
|
378
|
+
self.msg_dynamic_window.destroy()
|
379
|
+
self.msg_dynamic_window = None
|
380
|
+
|
381
|
+
self.gui.action = _action
|
382
|
+
print()
|
383
|
+
ret = False
|
384
|
+
else:
|
385
|
+
self.gui.action = partial(self.message_var.set, message)
|
386
|
+
print(message, end="\r", flush=True)
|
387
|
+
ret = True
|
388
|
+
|
389
|
+
if self.gui.action is not None:
|
390
|
+
self.gui.event_generate("<<exec_in_main>>")
|
391
|
+
self.gui.response_event.wait()
|
392
|
+
self.gui.response_event.clear()
|
393
|
+
|
394
|
+
return ret
|
395
|
+
|
396
|
+
def cb_bar(
|
397
|
+
self,
|
398
|
+
set_progress_mode: Optional[str] = None,
|
399
|
+
steps: int = 0,
|
400
|
+
update_bar: int = 0,
|
401
|
+
*args: Any,
|
402
|
+
**kwargs: Any,
|
403
|
+
) -> None:
|
404
|
+
self.gui.progress_frame.update_progress_bar(
|
405
|
+
set_progress_mode, steps, update_bar, *args, **kwargs
|
406
|
+
)
|
407
|
+
|
408
|
+
def put(self, i: Union[CbQueueItemType, str]) -> Union[str, bool, None]:
|
409
|
+
if isinstance(i, tuple):
|
410
|
+
action = i[0]
|
411
|
+
if len(i) >= 2:
|
412
|
+
args: Tuple[Any, ...] = i[1] if i[1] else tuple()
|
183
413
|
else:
|
184
414
|
args = tuple()
|
185
415
|
if len(i) >= 3:
|
@@ -202,10 +432,12 @@ class Callback(CallbackProtocol):
|
|
202
432
|
self.bar(update_bar=1)
|
203
433
|
elif action == "msg_block":
|
204
434
|
return self.msg_block(*args, **kwargs)
|
435
|
+
elif action == "msg_dynamic":
|
436
|
+
return self.msg_dynamic(*args, **kwargs)
|
205
437
|
elif action == "ask_bool":
|
206
438
|
return self.ask_bool(*args, **kwargs)
|
207
439
|
elif action == "ask_str":
|
208
|
-
return self.ask_str(**kwargs)
|
440
|
+
return self.ask_str(*args, **kwargs)
|
209
441
|
else:
|
210
442
|
self.msg(action)
|
211
443
|
return None
|
sticker_convert/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.15.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,10 +364,10 @@ 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.
|
367
|
+
Requires-Dist: anyio~=4.11.0
|
368
368
|
Requires-Dist: apngasm_python~=1.3.2
|
369
369
|
Requires-Dist: av<15,>=13.1.0
|
370
|
-
Requires-Dist: beautifulsoup4~=4.
|
370
|
+
Requires-Dist: beautifulsoup4~=4.14.2
|
371
371
|
Requires-Dist: cryptg~=0.5.1
|
372
372
|
Requires-Dist: cryptography~=46.0.1
|
373
373
|
Requires-Dist: rookiepy~=0.5.6
|
@@ -378,8 +378,8 @@ Requires-Dist: mergedeep~=1.3.4
|
|
378
378
|
Requires-Dist: numpy>=1.22.4
|
379
379
|
Requires-Dist: Pillow~=11.3.0
|
380
380
|
Requires-Dist: pyoxipng~=9.1.1
|
381
|
-
Requires-Dist: python-telegram-bot~=22.
|
382
|
-
Requires-Dist: psutil~=7.
|
381
|
+
Requires-Dist: python-telegram-bot~=22.5
|
382
|
+
Requires-Dist: psutil~=7.1.0
|
383
383
|
Requires-Dist: PyMemoryEditor~=1.5.24
|
384
384
|
Requires-Dist: requests~=2.32.4
|
385
385
|
Requires-Dist: rlottie_python~=1.3.8
|
@@ -1,41 +1,52 @@
|
|
1
1
|
sticker_convert/__init__.py,sha256=iQnv6UOOA69c3soAn7ZOnAIubTIQSUxtq1Uhh8xRWvU,102
|
2
2
|
sticker_convert/__main__.py,sha256=elDCMvU27letiYs8jPUpxaCq5puURnvcDuqGsAAb6_w,592
|
3
|
-
sticker_convert/cli.py,sha256=
|
3
|
+
sticker_convert/cli.py,sha256=pSgVK4IFWIYaHeZIQ1P2ojvNynNH_AMPvrqWU7_CGw0,22646
|
4
4
|
sticker_convert/converter.py,sha256=7-XQbBUAqfc9mLuLTIkjjMeO-UTInldeRD32suFgNJo,41141
|
5
5
|
sticker_convert/definitions.py,sha256=BqROmOvqIqw8ANaqZXIxJAXGD0HgjAvCfFouQ4SaWHc,2254
|
6
|
-
sticker_convert/gui.py,sha256=
|
7
|
-
sticker_convert/job.py,sha256=
|
6
|
+
sticker_convert/gui.py,sha256=6TCe2rHdE4mBUjFzv-uuvFJ6izuNB0U4a0s1rHMgT3A,32171
|
7
|
+
sticker_convert/job.py,sha256=LXUlUs3ok7YaIal3bE1_nzjVq75WkpmJ3AuJEZ3EUzg,28153
|
8
8
|
sticker_convert/job_option.py,sha256=unG8kt2cCK-Rmg45xkhD4JFt5ubx6P6JEvLvDeOeX_I,8222
|
9
|
-
sticker_convert/version.py,sha256=
|
9
|
+
sticker_convert/version.py,sha256=dgMTvKQecYT-RaM2bavGbGWnHYbjUimyFXvIIvJ0lXc,49
|
10
|
+
sticker_convert/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
+
sticker_convert/auth/auth_base.py,sha256=WujBjMjHBC_6nfO4p4gZz8mEKs-ODt72KHkwvc0t3n4,482
|
12
|
+
sticker_convert/auth/auth_discord.py,sha256=024YBlea91I16vQqcq0WYudLBh7YnVbdMXiQxdEirrE,5385
|
13
|
+
sticker_convert/auth/auth_kakao_android_login.py,sha256=-7ysyXoglJKotQKrUsvZurGdPs2Si7pdNEZg59P6E70,11364
|
14
|
+
sticker_convert/auth/auth_kakao_desktop_login.py,sha256=LzHV3TvyHE0bBNG5nr9nkn6eH6uXoCISqOEKLb6USX0,12442
|
15
|
+
sticker_convert/auth/auth_kakao_desktop_memdump.py,sha256=nL2q7Cr_YuOU4xqJcwgVdq4UV5ElTlxxFr4qiQuJS00,9137
|
16
|
+
sticker_convert/auth/auth_line.py,sha256=I9zFqgYm5sh8WGI-ZBymZtVJB5hBTOw-2f99l4JmGaM,2758
|
17
|
+
sticker_convert/auth/auth_signal.py,sha256=SQagPgD5T8MKplHuSvxaTPAc9rhbRG40t1w0V7PpULY,4741
|
18
|
+
sticker_convert/auth/auth_telethon.py,sha256=Yq8HpSHB4npTE77eBF-Hbk6n5IGpUtWx9mfwnwhKnLc,5237
|
19
|
+
sticker_convert/auth/auth_viber.py,sha256=XipGCvyjpvKBHTDlO8VdemMm377D6cSG0MRt0G-Kbho,8396
|
20
|
+
sticker_convert/auth/telegram_api.py,sha256=RstISgrYwAU_s6QQSTLthInfRm4Q1qZSAb-7vtmAvbk,24071
|
10
21
|
sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
22
|
sticker_convert/downloaders/download_band.py,sha256=JPjwwdxbMXPBM9TXF76wT9mtoDCLssYnrm1iS2C6uVM,3629
|
12
23
|
sticker_convert/downloaders/download_base.py,sha256=MI5pCT_tkfoaFlrD1oNynDj1Rv1CK0APuNVElTEAEis,5110
|
13
24
|
sticker_convert/downloaders/download_discord.py,sha256=6AFpLAYL2hRvVcsqUtzDUC31U66U02ZcnKXDnZRi2jk,3496
|
14
25
|
sticker_convert/downloaders/download_kakao.py,sha256=lRmpEcYjHizIRM0uFBDvjMqNEpur0VmOTKAmiir9eB0,15181
|
15
|
-
sticker_convert/downloaders/download_line.py,sha256=
|
26
|
+
sticker_convert/downloaders/download_line.py,sha256=XVhW65I_59EtoeXhsLPMvuq-ZTPjezngcKo11eJr-6E,18110
|
16
27
|
sticker_convert/downloaders/download_ogq.py,sha256=-iSTQaCUlROfY7a9EFhJGq6fenY48AZEevfQLT9-pAk,2951
|
17
28
|
sticker_convert/downloaders/download_signal.py,sha256=3wv-BLd4qggly4AdtwV8f3vUpCVZ-8GnoPLoWngY3Pk,3728
|
18
|
-
sticker_convert/downloaders/download_telegram.py,sha256=
|
29
|
+
sticker_convert/downloaders/download_telegram.py,sha256=WU9C53ePH_-Pp36AQ3suMoBjInydkP3v5-uuwltusWk,2022
|
19
30
|
sticker_convert/downloaders/download_viber.py,sha256=SFnyaVEd_33J1KvRhcHDJqnLKGsbLMeA2NomVHm2ulM,4226
|
20
31
|
sticker_convert/gui_components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
32
|
sticker_convert/gui_components/gui_utils.py,sha256=okho2cA1Scem_m6rPiYifreFzpFrM21-yUkiAv64EUI,3431
|
22
33
|
sticker_convert/gui_components/frames/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
-
sticker_convert/gui_components/frames/comp_frame.py,sha256=
|
24
|
-
sticker_convert/gui_components/frames/config_frame.py,sha256=
|
25
|
-
sticker_convert/gui_components/frames/control_frame.py,sha256=
|
26
|
-
sticker_convert/gui_components/frames/cred_frame.py,sha256=
|
34
|
+
sticker_convert/gui_components/frames/comp_frame.py,sha256=OTMp5vf2IELFe9947aYNfJtGjzn8xv4oHPNqOIk2n5U,7528
|
35
|
+
sticker_convert/gui_components/frames/config_frame.py,sha256=rq1HgOJMj31iRVrAakcSaDH6hRJFjzmm0WPebBDDuGQ,4507
|
36
|
+
sticker_convert/gui_components/frames/control_frame.py,sha256=vaJK3X1maKkSC-oFupvKzPiW8hkQpsxOifpC47ZidR4,835
|
37
|
+
sticker_convert/gui_components/frames/cred_frame.py,sha256=M26e57CwetvdUEpI7DrBCgLXS1s7dX4c5NE0AeHWrzA,9571
|
27
38
|
sticker_convert/gui_components/frames/input_frame.py,sha256=5Vz1d6J1jkofvvzm43DxeIW_CjWfxa2QPYFnkAAiAfM,5040
|
28
39
|
sticker_convert/gui_components/frames/output_frame.py,sha256=n2WLk22h61DoZli8WbFhd-h2CqWAebDXnBa051JBuOc,4260
|
29
40
|
sticker_convert/gui_components/frames/progress_frame.py,sha256=LWUZg_iL7iiNTfu7N5Ct_pklZdghxihENi7DP9YozOE,4915
|
30
41
|
sticker_convert/gui_components/frames/right_clicker.py,sha256=dGIvSzEChrkguR80pzUemBNJ39uzJjVJQKeDNUoW3Gk,721
|
31
42
|
sticker_convert/gui_components/windows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
-
sticker_convert/gui_components/windows/advanced_compression_window.py,sha256=
|
33
|
-
sticker_convert/gui_components/windows/base_window.py,sha256=
|
34
|
-
sticker_convert/gui_components/windows/discord_get_auth_window.py,sha256=
|
35
|
-
sticker_convert/gui_components/windows/kakao_get_auth_window.py,sha256=
|
36
|
-
sticker_convert/gui_components/windows/line_get_auth_window.py,sha256=
|
37
|
-
sticker_convert/gui_components/windows/signal_get_auth_window.py,sha256=
|
38
|
-
sticker_convert/gui_components/windows/viber_get_auth_window.py,sha256=
|
43
|
+
sticker_convert/gui_components/windows/advanced_compression_window.py,sha256=0y-3CfMQhUJ8I3ybV3PK9RKGgUXOjIgO-m2OOVeKtkI,33707
|
44
|
+
sticker_convert/gui_components/windows/base_window.py,sha256=nCbIGRdhoXVrTXh9dBAEmemB-C03_VwS9hvpDXiaWgY,1258
|
45
|
+
sticker_convert/gui_components/windows/discord_get_auth_window.py,sha256=1-XdEUJjjbD6sMfVobuAa2viuZQMlWrtvibMU_5tkGE,2637
|
46
|
+
sticker_convert/gui_components/windows/kakao_get_auth_window.py,sha256=1ezF9YVamtKsLxt4nEAjCfTW_weCWGgRC-QjlzyrJMU,18364
|
47
|
+
sticker_convert/gui_components/windows/line_get_auth_window.py,sha256=1QO8W6nJtMXnk1qDCLF71X-IOZz_hR0914gMvV0j8vc,3180
|
48
|
+
sticker_convert/gui_components/windows/signal_get_auth_window.py,sha256=Ko8iML7MCWvdneUTYWhVevrdGGJbfUYyer3cVOEoZ0g,2778
|
49
|
+
sticker_convert/gui_components/windows/viber_get_auth_window.py,sha256=JFWk18WtPthVWMIFOwNqIC36OpMfOqiZwRCAEXcmZs0,5729
|
39
50
|
sticker_convert/ios-message-stickers-template/.gitignore,sha256=4uuTph_9eHfqXHUavLOmGOji6aIHOif2bUEU_hCBn4Y,9
|
40
51
|
sticker_convert/ios-message-stickers-template/README.md,sha256=oN0FvJkCWWjSZ3PMrCvY3T1zCsdkZYFgGHAoFh0Kmt8,467
|
41
52
|
sticker_convert/ios-message-stickers-template/.github/FUNDING.yml,sha256=3LlmdSAGDsBA2o_C1iBYTNLwkABnyZuN0zxgPPyd-f8,70
|
@@ -83,24 +94,15 @@ sticker_convert/uploaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
83
94
|
sticker_convert/uploaders/compress_wastickers.py,sha256=Rgl3WzIDJn7oa00nNqeBFDqIHP-cWvgQqET2-kDbf9c,7417
|
84
95
|
sticker_convert/uploaders/upload_base.py,sha256=uQupPn6r4zrlAzpKzzX7CgvZb69ATyrwPKahWOQj0ds,1203
|
85
96
|
sticker_convert/uploaders/upload_signal.py,sha256=k9XS6oU0gYCXEph-LzWvUP3IDINAVaQzzzNgDRp_YNM,7443
|
86
|
-
sticker_convert/uploaders/upload_telegram.py,sha256=
|
97
|
+
sticker_convert/uploaders/upload_telegram.py,sha256=QeD_bYmE8E_oHNiepsr6jn03sPc4KPvkfCQBZfTr_b0,12856
|
87
98
|
sticker_convert/uploaders/upload_viber.py,sha256=_vOK0UgP7V7ZeFG6pR3sVf3A744Q6J19qzO-2hDvt5w,6583
|
88
99
|
sticker_convert/uploaders/xcode_imessage.py,sha256=iTTT8gDYOTNkKqXeSWUBuWfxu7xeE418t2Z1YQFR5L0,11365
|
89
|
-
sticker_convert/utils/callback.py,sha256=
|
100
|
+
sticker_convert/utils/callback.py,sha256=rj-ygdHbf9cpsDiIMXykfI55bxYOWpF2T5_dy1ebR3k,13855
|
90
101
|
sticker_convert/utils/chrome_remotedebug.py,sha256=moFj-Uz_bBy4-wXFET80sdwkzNC4PW8LMwwrU8yKOg8,6642
|
91
102
|
sticker_convert/utils/emoji.py,sha256=AqB26JY-PkYzNwPLReSnqLiQKe-bR9UXnLclAbgubJ8,367
|
92
103
|
sticker_convert/utils/process.py,sha256=y_W-D9zkxAEfPvYJZTKxNtNHxmuK0NldpDXu-OdGR1M,5704
|
93
104
|
sticker_convert/utils/singletons.py,sha256=SiV374FxU68DpysGoj_ytU1ErINkeOBbP4s9QTcexeY,357
|
94
105
|
sticker_convert/utils/url_detect.py,sha256=_wmI28hUyngq8TVz1bw7YM90qPLd3bIynawVlbr_lcI,939
|
95
|
-
sticker_convert/utils/auth/get_discord_auth.py,sha256=8H9Z0c7pl6JjzkP8lo0-lCFnBAT5Eql-LYc6M92FY_k,4283
|
96
|
-
sticker_convert/utils/auth/get_kakao_auth_android_login.py,sha256=YOyzNvPBUseoZBD8o3IoJsDA207G_sJGfZU3x1aUwTA,10772
|
97
|
-
sticker_convert/utils/auth/get_kakao_auth_desktop_login.py,sha256=Lf_AzTzRW-NwYrayL7hwXIfQUYZxc03cnFB8WcyBwuE,10680
|
98
|
-
sticker_convert/utils/auth/get_kakao_auth_desktop_memdump.py,sha256=GE4rjVx32zHmQbX8tuO8V_ZhBCcXv-sHdeqHEG5H6HI,8911
|
99
|
-
sticker_convert/utils/auth/get_line_auth.py,sha256=8l8ha2vQmk3rHGvDE7PkcxQXbH3oe62LKbI3qVUtvqc,2196
|
100
|
-
sticker_convert/utils/auth/get_signal_auth.py,sha256=I6od2aj8yl1eLV8S2TtNQEPM77DC7FpkRKex0pXY2II,4580
|
101
|
-
sticker_convert/utils/auth/get_viber_auth.py,sha256=aQiv1JI2RKiPVoo_JjbjcWwsUr2OK2FXMsFLPb3TtGU,8123
|
102
|
-
sticker_convert/utils/auth/telegram_api.py,sha256=_DAtxE1vP5eChKyQ53WIdDzojH6YY4hza_LJPF5NZZQ,24368
|
103
|
-
sticker_convert/utils/auth/telethon_setup.py,sha256=7VtsSM3n8qrN_VXV8hBaNSmApxgIPCa84Z08fRr43eQ,3309
|
104
106
|
sticker_convert/utils/chromiums/linux.py,sha256=voWOxQVNy2icGDQfnZEa-2Nwrv-Qmuvt0v1L65hKnY8,1719
|
105
107
|
sticker_convert/utils/chromiums/osx.py,sha256=ET6_uWZDbPCIN-GihMmjNcva0-WAyn0fA2-SzNn5wcU,3255
|
106
108
|
sticker_convert/utils/chromiums/windows.py,sha256=wOyEQIQNV3_Nb2m44aFJh6QJj16cDpNmD1NxnVNlkrk,2188
|
@@ -114,9 +116,9 @@ sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE
|
|
114
116
|
sticker_convert/utils/media/codec_info.py,sha256=HwA6eVh7cLhOlUoR_K9d_wyBRJ_ocGtB3GAyne_iZAU,16483
|
115
117
|
sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
|
116
118
|
sticker_convert/utils/media/format_verify.py,sha256=oM32P186tWe9YxvBQRPr8D3FEmBN3b2rEe_2S_MwxyQ,6236
|
117
|
-
sticker_convert-2.
|
118
|
-
sticker_convert-2.
|
119
|
-
sticker_convert-2.
|
120
|
-
sticker_convert-2.
|
121
|
-
sticker_convert-2.
|
122
|
-
sticker_convert-2.
|
119
|
+
sticker_convert-2.15.0.0.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
120
|
+
sticker_convert-2.15.0.0.dist-info/METADATA,sha256=wFGcTf7ZX5KLVE-Xi85Et9PfNIIy4JLSK7q5j94PbhA,56527
|
121
|
+
sticker_convert-2.15.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
122
|
+
sticker_convert-2.15.0.0.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
123
|
+
sticker_convert-2.15.0.0.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
124
|
+
sticker_convert-2.15.0.0.dist-info/RECORD,,
|
@@ -1,97 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
from typing import Callable, Optional, Tuple
|
3
|
-
|
4
|
-
import anyio
|
5
|
-
from telethon import TelegramClient # type: ignore
|
6
|
-
from telethon.errors import SessionPasswordNeededError # type: ignore
|
7
|
-
|
8
|
-
from sticker_convert.definitions import CONFIG_DIR
|
9
|
-
from sticker_convert.job_option import CredOption
|
10
|
-
|
11
|
-
GUIDE_MSG = """1. Visit https://my.telegram.org
|
12
|
-
2. Login using your phone number
|
13
|
-
3. Go to "API development tools"
|
14
|
-
4. Fill form
|
15
|
-
- App title: sticker-convert
|
16
|
-
- Short name: sticker-convert
|
17
|
-
- URL: www.telegram.org
|
18
|
-
- Platform: Desktop
|
19
|
-
- Description: sticker-convert
|
20
|
-
5. Note down api_id and api_hash
|
21
|
-
Continue when done"""
|
22
|
-
|
23
|
-
|
24
|
-
class TelethonSetup:
|
25
|
-
def __init__(
|
26
|
-
self, opt_cred: CredOption, cb_ask_str: Callable[..., str] = input
|
27
|
-
) -> None:
|
28
|
-
self.cb_ask_str = cb_ask_str
|
29
|
-
self.opt_cred = opt_cred
|
30
|
-
|
31
|
-
async def signin_async(self) -> Tuple[bool, TelegramClient, int, str]:
|
32
|
-
client = TelegramClient(
|
33
|
-
CONFIG_DIR / f"telethon-{self.opt_cred.telethon_api_id}.session",
|
34
|
-
self.opt_cred.telethon_api_id,
|
35
|
-
self.opt_cred.telethon_api_hash,
|
36
|
-
)
|
37
|
-
|
38
|
-
await client.connect()
|
39
|
-
authed = await client.is_user_authorized()
|
40
|
-
if authed is False:
|
41
|
-
phone_number = self.cb_ask_str("Enter phone number: ")
|
42
|
-
await client.send_code_request(phone_number)
|
43
|
-
code = self.cb_ask_str("Enter code: ")
|
44
|
-
try:
|
45
|
-
await client.sign_in(phone_number, code)
|
46
|
-
except SessionPasswordNeededError:
|
47
|
-
password = self.cb_ask_str("Enter password: ")
|
48
|
-
await client.sign_in(password=password)
|
49
|
-
authed = await client.is_user_authorized()
|
50
|
-
|
51
|
-
return (
|
52
|
-
authed,
|
53
|
-
client,
|
54
|
-
self.opt_cred.telethon_api_id,
|
55
|
-
self.opt_cred.telethon_api_hash,
|
56
|
-
)
|
57
|
-
|
58
|
-
def guide(self) -> None:
|
59
|
-
self.cb_ask_str(GUIDE_MSG)
|
60
|
-
|
61
|
-
def get_api_info(self) -> bool:
|
62
|
-
api_id_ask = "Enter api_id: "
|
63
|
-
wrong_hint = ""
|
64
|
-
|
65
|
-
while True:
|
66
|
-
telethon_api_id = self.cb_ask_str(wrong_hint + api_id_ask)
|
67
|
-
if telethon_api_id == "":
|
68
|
-
return False
|
69
|
-
elif telethon_api_id.isnumeric():
|
70
|
-
self.opt_cred.telethon_api_id = int(telethon_api_id)
|
71
|
-
break
|
72
|
-
else:
|
73
|
-
wrong_hint = "Error: api_id should be numeric\n"
|
74
|
-
|
75
|
-
self.opt_cred.telethon_api_hash = self.cb_ask_str("Enter api_hash: ")
|
76
|
-
if self.opt_cred.telethon_api_hash == "":
|
77
|
-
return False
|
78
|
-
return True
|
79
|
-
|
80
|
-
def signin(self) -> Tuple[bool, TelegramClient, int, str]:
|
81
|
-
return anyio.run(self.signin_async)
|
82
|
-
|
83
|
-
def start(self) -> Tuple[bool, Optional[TelegramClient], int, str]:
|
84
|
-
cred_valid = False
|
85
|
-
if self.opt_cred.telethon_api_id == 0 or self.opt_cred.telethon_api_hash == "":
|
86
|
-
self.guide()
|
87
|
-
cred_valid = self.get_api_info()
|
88
|
-
if cred_valid:
|
89
|
-
return self.signin()
|
90
|
-
else:
|
91
|
-
return False, None, 0, ""
|
92
|
-
|
93
|
-
async def start_async(self) -> Tuple[bool, Optional[TelegramClient], int, str]:
|
94
|
-
if self.opt_cred.telethon_api_id == 0 or self.opt_cred.telethon_api_hash == "":
|
95
|
-
self.guide()
|
96
|
-
self.get_api_info()
|
97
|
-
return await self.signin_async()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|