diff --git a/mute_sync.py b/mute_sync.py index dce97a5..2bef63a 100644 --- a/mute_sync.py +++ b/mute_sync.py @@ -135,6 +135,11 @@ class UserInstanceManager: if __name__ == '__main__': parser = argparse.ArgumentParser() + parser.add_argument( + '-v', '--verbose', + action='store_true', + help='display all mutes, blocks and domain blocks combined' + ) parser.add_argument( '-t', '--timeout', type=int, @@ -159,25 +164,34 @@ if __name__ == '__main__': for acct in accounts: all_mutes.update(acct.mutes) - print(f'all mutes ({len(all_mutes)} total):') - print(', '.join(all_mutes)) - print() + if args.verbose: + print(f'all mutes ({len(all_mutes)} total):') + print(', '.join(all_mutes)) + print() + else: + print(f'{len(all_mutes)} mutes, ', end='', flush=True) all_blocks = set() for acct in accounts: all_blocks.update(acct.blocks) - print(f'all blocks ({len(all_blocks)} total):') - print(', '.join(all_blocks)) - print() + if args.verbose: + print(f'all blocks ({len(all_blocks)} total):') + print(', '.join(all_blocks)) + print() + else: + print(f'{len(all_blocks)} blocks, ', end='', flush=True) all_domain_blocks = set() for acct in accounts: all_domain_blocks.update(acct.domain_blocks) - print(f'all domain blocks ({len(all_domain_blocks)} total):') - print(', '.join(all_domain_blocks)) - print() + if args.verbose: + print(f'all domain blocks ({len(all_domain_blocks)} total):') + print(', '.join(all_domain_blocks)) + print() + else: + print(f'{len(all_blocks)} domain blocks combined\n', flush=True) def flag(label: str, condition: bool) -> str: return label if condition else ' ' * len(label)