diff --git a/Whatsapp_Chat_Exporter/__main__.py b/Whatsapp_Chat_Exporter/__main__.py index 14a3b54..3dfa995 100644 --- a/Whatsapp_Chat_Exporter/__main__.py +++ b/Whatsapp_Chat_Exporter/__main__.py @@ -78,6 +78,13 @@ def main(): dest="template", default=None, help="Path to custom HTML template") + parser.add_option( + "-e", + "--embedded", + dest="embedded", + default=False, + action='store_true', + help="Embed media into HTML file") (options, args) = parser.parse_args() if options.android and options.iphone: diff --git a/Whatsapp_Chat_Exporter/extract.py b/Whatsapp_Chat_Exporter/extract.py index 6a94dd2..b32501a 100644 --- a/Whatsapp_Chat_Exporter/extract.py +++ b/Whatsapp_Chat_Exporter/extract.py @@ -427,7 +427,7 @@ def vcard(db, data): print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r") -def create_html(data, output_folder, template=None): +def create_html(data, output_folder, template=None, embedded=False): if template is None: template_dir = os.path.dirname(__file__) template_file = "whatsapp.html" diff --git a/Whatsapp_Chat_Exporter/extract_iphone.py b/Whatsapp_Chat_Exporter/extract_iphone.py index 66bbfc7..546be23 100644 --- a/Whatsapp_Chat_Exporter/extract_iphone.py +++ b/Whatsapp_Chat_Exporter/extract_iphone.py @@ -230,7 +230,7 @@ def vcard(db, data): print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r") -def create_html(data, output_folder, template=None): +def create_html(data, output_folder, template=None, embedded=False): if template is None: template_dir = os.path.dirname(__file__) template_file = "whatsapp.html"