From d95b075ac0172047bc97263e53e723e8cb41e93c Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Sat, 13 Jul 2024 18:57:16 +0800 Subject: [PATCH] Invert the --dont-filter-empty option to provide clarity --- Whatsapp_Chat_Exporter/__main__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Whatsapp_Chat_Exporter/__main__.py b/Whatsapp_Chat_Exporter/__main__.py index 922a210..4447a46 100644 --- a/Whatsapp_Chat_Exporter/__main__.py +++ b/Whatsapp_Chat_Exporter/__main__.py @@ -262,9 +262,9 @@ def main(): ) parser.add_argument( "--dont-filter-empty", - dest="filter_empty", - default=False, - action='store_true', + dest="disable_filter_empty", + default=True, + action='store_false', help="By default, the exporter will not render chats with no valid message. Setting this flag will cause the exporter to render those." ) parser.add_argument( @@ -494,7 +494,7 @@ def main(): args.offline, args.size, args.no_avatar, - not args.filter_empty + args.disable_filter_empty ) else: print( @@ -531,7 +531,7 @@ def main(): args.offline, args.size, args.no_avatar, - not args.filter_empty + args.disable_filter_empty ) for file in glob.glob(r'*.*'): shutil.copy(file, args.output) @@ -545,11 +545,11 @@ def main(): args.offline, args.size, args.no_avatar, - not args.filter_empty + args.disable_filter_empty ) if args.json and not args.import_json: - if not args.filter_empty: + if args.disable_filter_empty: data = {k: v for k, v in data.items() if not chat_is_empty(v)} if contact_store.is_empty():