feat(arg): add directory argument

Add an argument which allows the user to specify which directory should
be scanned for duplicates, rather than hard-code the directory into the
script. This makes the script portable and easier-to-use.
This commit is contained in:
inference 2025-06-25 21:48:13 +00:00
parent 86d6740302
commit 326577e5ca
Signed by: inference
SSH Key Fingerprint: SHA256:/O3c09/4f1lh4zrhFs2qvQEDda6dZbTwG9xEcj8OfWo

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# Duplicate Check
# Version: 0.12.0
# Version: 0.13.0
# Copyright 2025 Jake Winters
# SPDX-License-Identifier: BSD-3-Clause
@ -14,6 +14,7 @@ import argparse
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.')
parser.add_argument('directory', type=str, help='The directory to scan for duplicate files.')
def hash_file(file_path):