From 34f2cc291ac1cf296622ff366a80bc004103334b Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sun, 11 Jan 2026 20:31:15 +0000 Subject: [PATCH] stuff --- reorganize_structure.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/reorganize_structure.py b/reorganize_structure.py index 6cfea8a6..ac832c43 100644 --- a/reorganize_structure.py +++ b/reorganize_structure.py @@ -122,7 +122,7 @@ def propose_reorganization(analysis): 'other_pkgs': other_pkgs } -def execute_option1(): +def execute_option1(force=False): """Option 1: Move files to match their package declarations""" base_dir = '/home/rewrich/Documents/GitHub/tustu/app' @@ -173,10 +173,11 @@ def execute_option1(): print(f" {os.path.relpath(move['from'], base_dir)}") print(f" → {os.path.relpath(move['to'], base_dir)}") - response = input(f"\nProceed with moving {len(moves)} files? (yes/no): ") - if response.lower() != 'yes': - print("Cancelled.") - return + if not force: + response = input(f"\nProceed with moving {len(moves)} files? (yes/no): ") + if response.lower() != 'yes': + print("Cancelled.") + return # Execute moves moved_count = 0 @@ -235,8 +236,10 @@ def execute_option1(): def main(): import sys + force = '--force' in sys.argv + if '--execute-option-1' in sys.argv or '--option-1' in sys.argv: - execute_option1() + execute_option1(force=force) return analysis = analyze_current_structure()