mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-25 07:21:36 +00:00
Implement iOS avatar #48
This commit is contained in:
@@ -53,20 +53,40 @@ def check_update():
|
||||
return 0
|
||||
|
||||
|
||||
def rendering(output_file_name, template, name, msgs, contact, w3css, next):
|
||||
def rendering(
|
||||
output_file_name,
|
||||
template,
|
||||
name,
|
||||
msgs,
|
||||
contact,
|
||||
w3css,
|
||||
next,
|
||||
my_avatar,
|
||||
their_avatar,
|
||||
their_avatar_thumb
|
||||
):
|
||||
if their_avatar_thumb is None and their_avatar is not None:
|
||||
their_avatar_thumb = their_avatar
|
||||
with open(output_file_name, "w", encoding="utf-8") as f:
|
||||
f.write(
|
||||
template.render(
|
||||
name=name,
|
||||
msgs=msgs,
|
||||
my_avatar=None,
|
||||
their_avatar=f"WhatsApp/Avatars/{contact}.j",
|
||||
my_avatar=my_avatar,
|
||||
their_avatar=their_avatar,
|
||||
their_avatar_thumb=their_avatar_thumb,
|
||||
w3css=w3css,
|
||||
next=next
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class Device(Enum):
|
||||
IOS = "ios"
|
||||
ANDROID = "android"
|
||||
EXPORTED = "exported"
|
||||
|
||||
|
||||
# Android Specific
|
||||
CRYPT14_OFFSETS = (
|
||||
{"iv": 67, "db": 191},
|
||||
|
||||
Reference in New Issue
Block a user