Skip to content

Commit

Permalink
Removed the old version from the code
Browse files Browse the repository at this point in the history
  • Loading branch information
niradar committed Jun 11, 2024
1 parent 82ca362 commit f5942f4
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 558 deletions.
13 changes: 4 additions & 9 deletions df_finder3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from duplicate_files_in_folders.duplicates_finder import find_duplicates_files_v3, process_duplicates, \
clean_scan_dir_duplications
from duplicate_files_in_folders.logging_config import setup_logging
from duplicate_files_in_folders.old_duplicates_finder import find_and_process_duplicates
from duplicate_files_in_folders.utils import parse_arguments, setup_hash_manager, setup_file_manager
from duplicate_files_in_folders.utils_io import display_initial_config, output_results, confirm_script_execution

Expand All @@ -15,16 +14,12 @@ def main(args):
display_initial_config(args)
confirm_script_execution(args)
hash_manager = setup_hash_manager(args)
if args.old_script is True:
(files_moved, files_created, unique_scan_duplicate_files_found, duplicate_scan_files_moved) = (
find_and_process_duplicates(args))
scan_stats = ref_stats = []
else:
duplicates, scan_stats, ref_stats = find_duplicates_files_v3(args, args.scan_dir, args.reference_dir)
files_moved, files_created = process_duplicates(duplicates, args)
duplicate_scan_files_moved = clean_scan_dir_duplications(args, duplicates)

duplicates, scan_stats, ref_stats = find_duplicates_files_v3(args, args.scan_dir, args.reference_dir)
files_moved, files_created = process_duplicates(duplicates, args)
duplicate_scan_files_moved = clean_scan_dir_duplications(args, duplicates)
deleted_scan_folders = fm.delete_empty_folders_in_tree(args.scan_dir, True) if args.delete_empty_folders else 0

hash_manager.save_data()
output_results(args, files_moved, files_created, deleted_scan_folders, duplicate_scan_files_moved,
scan_stats, ref_stats)
Expand Down
176 changes: 0 additions & 176 deletions duplicate_files_in_folders/old_duplicates_finder.py

This file was deleted.

1 change: 0 additions & 1 deletion duplicate_files_in_folders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def parse_arguments(cust_args=None, check_folders=True):
parser.set_defaults(delete_empty_folders=True)
parser.add_argument('--clear_cache', action='store_true', help=argparse.SUPPRESS) # for testing
parser.add_argument('--extra_logging', action='store_true', help=argparse.SUPPRESS) # for testing
parser.add_argument('--old_script', action='store_true', help=argparse.SUPPRESS) # for testing
args = parser.parse_args(cust_args if cust_args else None)

# Validate the folders given in the arguments
Expand Down
1 change: 0 additions & 1 deletion tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_parse_arguments():
assert args.whitelist_ext is None
assert args.blacklist_ext is None
assert args.full_hash is False
assert args.old_script is False

# Test case 3: Many arguments provided
args = parse_arguments(['--scan', scan_dir, '--reference_dir', reference_dir, '--move_to', move_to_folder,
Expand Down
Loading

0 comments on commit f5942f4

Please sign in to comment.