diff --git a/mastodon_blocklist_deploy/cli.py b/mastodon_blocklist_deploy/cli.py index 6c87248..c0e9053 100644 --- a/mastodon_blocklist_deploy/cli.py +++ b/mastodon_blocklist_deploy/cli.py @@ -65,6 +65,9 @@ def exporter(blocklist, output=None, format: str = "toml", private: bool = False def merge(input_file, merge_target, format: str = "toml", private: bool = False, overwrite=False): + """Shows a table in the CLI comparing the local and remote blocklist""" + from rich.table import Table + from rich.console import Console input_blocklist = load_blocklist_file(input_file) merge_target_blocklist = load_blocklist_file(merge_target) for input_instance in input_blocklist: @@ -78,7 +81,7 @@ def merge(input_file, merge_target, format: str = "toml", private: bool = False, key_input = "" while key_input not in ("i", "O"): print(f"Different settings for {input_instance.domain} detected.") - print(f"In the input blocklist the setting is\n{input_instance} whereas it's {merge_target_instance} in the merge target") + Instance.show_diff(input_instance, merge_target_instance) key_input = input("Keep input (i) or original (o) [i/O]") elif key_input == "i": merge_target_blocklist.append(merge_target_instance)