diff --git a/Whatsapp_Chat_Exporter/__main__.py b/Whatsapp_Chat_Exporter/__main__.py
index e20fff4..b038988 100644
--- a/Whatsapp_Chat_Exporter/__main__.py
+++ b/Whatsapp_Chat_Exporter/__main__.py
@@ -185,8 +185,8 @@ def setup_argument_parser() -> ArgumentParser:
help="Do not render avatar in HTML output"
)
html_group.add_argument(
- "--experimental-new-theme", dest="whatsapp_theme", default=False, action='store_true',
- help="Use the newly designed WhatsApp-alike theme"
+ "--old-theme", dest="telegram_theme", default=False, action='store_true',
+ help="Use the old Telegram-alike theme"
)
html_group.add_argument(
"--headline", dest="headline", default="Chat history with ??",
@@ -359,8 +359,8 @@ def validate_args(parser: ArgumentParser, args) -> None:
args.key = getpass("Enter your encryption key: ")
# Theme validation
- if args.whatsapp_theme:
- args.template = "whatsapp_new.html"
+ if args.telegram_theme:
+ args.template = "whatsapp_old.html"
# Chat filter validation
if args.filter_chat_include is not None and args.filter_chat_exclude is not None:
@@ -628,7 +628,7 @@ def create_output_files(args, data: ChatCollection) -> None:
args.offline,
args.size,
args.no_avatar,
- args.whatsapp_theme,
+ args.telegram_theme,
args.headline
)
@@ -713,7 +713,7 @@ def process_exported_chat(args, data: ChatCollection) -> None:
args.offline,
args.size,
args.no_avatar,
- args.whatsapp_theme,
+ args.telegram_theme,
args.headline
)
@@ -779,7 +779,7 @@ def main():
args.offline,
args.size,
args.no_avatar,
- args.whatsapp_theme,
+ args.telegram_theme,
args.headline
)
elif args.exported:
diff --git a/Whatsapp_Chat_Exporter/whatsapp.html b/Whatsapp_Chat_Exporter/whatsapp.html
index ae83b95..2aa2b7e 100644
--- a/Whatsapp_Chat_Exporter/whatsapp.html
+++ b/Whatsapp_Chat_Exporter/whatsapp.html
@@ -1,329 +1,467 @@
-
- Whatsapp - {{ name }}
-
-
-
-
-
-
-
- {{ headline }}
- {% if status is not none %}
-
- {{ status }}
- {% endif %}
-
-
-
- {% set last = {'last': 946688461.001} %}
- {% for msg in msgs -%}
-
- {% if determine_day(last.last, msg.timestamp) is not none %}
-
{{ determine_day(last.last, msg.timestamp) }}
- {% if last.update({'last': msg.timestamp}) %}{% endif %}
- {% endif %}
- {% if msg.from_me == true %}
-
-
- {% if not no_avatar and my_avatar is not none %}
-
- {% else %}
-
- {% endif %}
-
- {% if msg.reply is not none %}
-
- {% endif %}
- {% if msg.meta == true or msg.media == false and msg.data is none %}
-
- {% if msg.safe %}
-
{{ msg.data | safe or 'Not supported WhatsApp internal message' }}
- {% else %}
-
{{ msg.data or 'Not supported WhatsApp internal message' }}
- {% endif %}
-
- {% if msg.caption is not none %}
-
- {{ msg.caption | urlize(none, true, '_blank') }}
-
- {% endif %}
- {% else %}
- {% if msg.media == false %}
- {{ msg.data | sanitize_except() | urlize(none, true, '_blank') }}
- {% else %}
- {% if "image/" in msg.mime %}
-
-
-
- {% elif "audio/" in msg.mime %}
-
- {% elif "video/" in msg.mime %}
-
- {% elif "/" in msg.mime %}
-
-
The file cannot be displayed here, however it should be located at here
-
- {% else %}
- {% filter escape %}{{ msg.data }}{% endfilter %}
- {% endif %}
- {% if msg.caption is not none %}
-
- {{ msg.caption | urlize(none, true, '_blank') }}
-
- {% endif %}
- {% endif %}
- {% endif %}
-
-
- {% if not no_avatar and my_avatar is not none %}
-
- {% endif %}
-
- {% else %}
-
-
- {% if msg.sender is not none %}
- {{ msg.sender }}
- {% else %}
- {{ name }}
- {% endif %}
-
-
{{ msg.time }}
-
-
- {% if not no_avatar %}
-
- {% if their_avatar is not none %}
-

- {% else %}
-

- {% endif %}
-
-
- {% else %}
-
- {% endif %}
-
- {% if msg.reply is not none %}
-
- {% endif %}
- {% if msg.meta == true or msg.media == false and msg.data is none %}
-
- {% if msg.safe %}
-
{{ msg.data | safe or 'Not supported WhatsApp internal message' }}
- {% else %}
-
{{ msg.data or 'Not supported WhatsApp internal message' }}
- {% endif %}
-
- {% if msg.caption is not none %}
-
- {{ msg.caption | urlize(none, true, '_blank') }}
-
- {% endif %}
- {% else %}
- {% if msg.media == false %}
- {{ msg.data | sanitize_except() | urlize(none, true, '_blank') }}
- {% else %}
- {% if "image/" in msg.mime %}
-
-
-
- {% elif "audio/" in msg.mime %}
-
- {% elif "video/" in msg.mime %}
-
- {% elif "/" in msg.mime %}
-
-
The file cannot be displayed here, however it should be located at here
-
- {% else %}
- {% filter escape %}{{ msg.data }}{% endfilter %}
- {% endif %}
- {% if msg.caption is not none %}
-
- {{ msg.caption | urlize(none, true, '_blank') }}
-
- {% endif %}
- {% endif %}
- {% endif %}
-
-
-
- {% endif %}
-
- {% endfor %}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {% if not no_avatar %}
+
+ {% if their_avatar is not none %}
+

+ {% else %}
+

+ {% endif %}
+
+ {% endif %}
+
+
{{ headline }}
+ {% if status is not none %}
{{ status }}
{% endif %}
+
+
+
+
+
+ {% if previous %}
+
+
+
+ {% endif %}
+ {% if next %}
+
+
+
+ {% endif %}
+
+
+
+
+
+
+
+
+ {% set last = {'last': 946688461.001} %}
+ {% for msg in msgs -%}
+ {% if determine_day(last.last, msg.timestamp) is not none %}
+
+
+ {{ determine_day(last.last, msg.timestamp) }}
+
+
+ {% if last.update({'last': msg.timestamp}) %}{% endif %}
+ {% endif %}
+
+ {% if msg.from_me == true %}
+
+
+
+ {% if msg.reply is not none %}
+
+
+
Replying to
+
+ {% if msg.quoted_data is not none %}
+ "{{msg.quoted_data}}"
+ {% else %}
+ this message
+ {% endif %}
+
+
+
+ {% endif %}
+
+ {% if msg.meta == true or msg.media == false and msg.data is none %}
+
+
+ {% if msg.safe %}
+ {{ msg.data | safe or 'Not supported WhatsApp internal message' }}
+ {% else %}
+ {{ msg.data or 'Not supported WhatsApp internal message' }}
+ {% endif %}
+
+
+ {% if msg.caption is not none %}
+
{{ msg.caption | urlize(none, true, '_blank') }}
+ {% endif %}
+ {% else %}
+ {% if msg.media == false %}
+ {{ msg.data | sanitize_except() | urlize(none, true, '_blank') }}
+ {% else %}
+ {% if "image/" in msg.mime %}
+
+
+
+ {% elif "audio/" in msg.mime %}
+
+ {% elif "video/" in msg.mime %}
+
+ {% elif "/" in msg.mime %}
+ The file cannot be displayed here, however it should be located at
here
+ {% else %}
+ {% filter escape %}{{ msg.data }}{% endfilter %}
+ {% endif %}
+ {% if msg.caption is not none %}
+ {{ msg.caption | urlize(none, true, '_blank') }}
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+
{{ msg.time }}
+
+
+ {% else %}
+
+
+ {% if msg.reply is not none %}
+
+
+
Replying to
+
+ {% if msg.quoted_data is not none %}
+ {{msg.quoted_data}}
+ {% else %}
+ this message
+ {% endif %}
+
+
+
+ {% endif %}
+
+ {% if msg.meta == true or msg.media == false and msg.data is none %}
+
+
+ {% if msg.safe %}
+ {{ msg.data | safe or 'Not supported WhatsApp internal message' }}
+ {% else %}
+ {{ msg.data or 'Not supported WhatsApp internal message' }}
+ {% endif %}
+
+
+ {% if msg.caption is not none %}
+
{{ msg.caption | urlize(none, true, '_blank') }}
+ {% endif %}
+ {% else %}
+ {% if msg.media == false %}
+ {{ msg.data | sanitize_except() | urlize(none, true, '_blank') }}
+ {% else %}
+ {% if "image/" in msg.mime %}
+
+
+
+ {% elif "audio/" in msg.mime %}
+
+ {% elif "video/" in msg.mime %}
+
+ {% elif "/" in msg.mime %}
+ The file cannot be displayed here, however it should be located at
here
+ {% else %}
+ {% filter escape %}{{ msg.data }}{% endfilter %}
+ {% endif %}
+ {% if msg.caption is not none %}
+ {{ msg.caption | urlize(none, true, '_blank') }}
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+
+
+ {% if msg.sender is not none %}
+ {{ msg.sender }}
+ {% endif %}
+
+
+ {{ msg.time }}
+
+
+
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+
+
-
-
+ // Event listeners
+ searchButton.addEventListener('click', showSearch);
+ closeMainSearch.addEventListener('click', hideSearch);
+
+ // Handle ESC key
+ document.addEventListener('keydown', (event) => {
+ if (event.key === 'Escape' && mainSearchInput.classList.contains('active')) {
+ hideSearch();
+ }
+ });
+
+
+