feat(arg): add dry-run argument

Add a dry-run argument so the user can have the script detect duplicates
without deleting them. This is useful for informing the user of which
files would be deleted, should they run the script, normally.
This commit is contained in:
inference 2025-06-25 21:46:03 +00:00
parent 4c6112f0a7
commit 86d6740302
Signed by: inference
SSH Key Fingerprint: SHA256:/O3c09/4f1lh4zrhFs2qvQEDda6dZbTwG9xEcj8OfWo

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# Duplicate Check # Duplicate Check
# Version: 0.11.0 # Version: 0.12.0
# Copyright 2025 Jake Winters # Copyright 2025 Jake Winters
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@ -13,6 +13,7 @@ import argparse
parser = argparse.ArgumentParser(description='Scan directory for duplicate files and delete them.') parser = argparse.ArgumentParser(description='Scan directory for duplicate files and delete them.')
parser.add_argument('--dry-run', '-d', action='store_true', help='Detect duplicates without deletion.')
def hash_file(file_path): def hash_file(file_path):