mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-18 00:44:59 +00:00
Just coding style
This commit is contained in:
@@ -538,11 +538,13 @@ def create_html(
|
|||||||
template_dir = os.path.dirname(template)
|
template_dir = os.path.dirname(template)
|
||||||
template_file = os.path.basename(template)
|
template_file = os.path.basename(template)
|
||||||
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
|
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
|
||||||
templateEnv = jinja2.Environment(loader=templateLoader)
|
template_env = jinja2.Environment(loader=templateLoader)
|
||||||
templateEnv.globals.update(determine_day=determine_day)
|
template_env.globals.update(
|
||||||
templateEnv.globals.update(no_avatar=no_avatar)
|
determine_day=determine_day,
|
||||||
templateEnv.filters['sanitize_except'] = sanitize_except
|
no_avatar=no_avatar
|
||||||
template = templateEnv.get_template(template_file)
|
)
|
||||||
|
template_env.filters['sanitize_except'] = sanitize_except
|
||||||
|
template = template_env.get_template(template_file)
|
||||||
|
|
||||||
total_row_number = len(data)
|
total_row_number = len(data)
|
||||||
print(f"\nGenerating chats...(0/{total_row_number})", end="\r")
|
print(f"\nGenerating chats...(0/{total_row_number})", end="\r")
|
||||||
|
|||||||
@@ -263,11 +263,13 @@ def create_html(
|
|||||||
template_dir = os.path.dirname(template)
|
template_dir = os.path.dirname(template)
|
||||||
template_file = os.path.basename(template)
|
template_file = os.path.basename(template)
|
||||||
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
|
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
|
||||||
templateEnv = jinja2.Environment(loader=templateLoader)
|
template_env = jinja2.Environment(loader=templateLoader)
|
||||||
templateEnv.globals.update(determine_day=determine_day)
|
template_env.globals.update(
|
||||||
templateEnv.globals.update(no_avatar=no_avatar)
|
determine_day=determine_day,
|
||||||
templateEnv.filters['sanitize_except'] = sanitize_except
|
no_avatar=no_avatar
|
||||||
template = templateEnv.get_template(template_file)
|
)
|
||||||
|
template_env.filters['sanitize_except'] = sanitize_except
|
||||||
|
template = template_env.get_template(template_file)
|
||||||
|
|
||||||
total_row_number = len(data)
|
total_row_number = len(data)
|
||||||
print(f"\nGenerating chats...(0/{total_row_number})", end="\r")
|
print(f"\nGenerating chats...(0/{total_row_number})", end="\r")
|
||||||
|
|||||||
Reference in New Issue
Block a user