Skip to content

Commit c7df95c

Browse files
authored
Added terminal output so you know that the program is working when running and not just frozen
1 parent 8239932 commit c7df95c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

db_diff/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def cli(
9898
"tsv": "excel-tab",
9999
}
100100

101+
click.echo(f"Starting diff: '{previous}' vs '{current}'...")
102+
101103
# Set default output filename if needed
102104
if output == "jsonfile":
103105
if not output_file:
@@ -183,13 +185,16 @@ def load(filename, key):
183185

184186
if output == "json":
185187
print(std_json.dumps(diff, indent=4))
188+
click.echo("Finished. Output printed as JSON to terminal.")
186189
elif output == "jsonfile":
187190
with open(output_file, "w", encoding=encoding) as f:
188191
f.write(std_json.dumps(diff, indent=4))
192+
click.echo(f"Finished. Output saved to file: {output_file}")
189193
else:
190194
print(
191195
human_text(diff, key, current=current_data)
192196
)
197+
click.echo("Finished. Output printed in readable format to terminal.")
193198

194199
if show_time:
195200
end = time_module.time()

0 commit comments

Comments
 (0)