#!/usr/bin/env python3 """ Clean up assets/slike/ - move everything to proper locations """ import shutil from pathlib import Path REPO = Path("/Users/davidkotnik/repos/novafarma") SLIKE = REPO / "assets/slike" # Anomalous zones (should be in root, but visible) ANOMALOUS = [ "amazonas", "arctic_zone", "atlantis", "bamboo_forest", "catacombs", "chernobyl", "crystal_caves", "deep_ocean", "dinozavri", "egyptian_desert", "endless_forest", "floating_islands", "loch_ness", "mushroom_forest", "mythical_highlands", "shadow_realm", "volcanic_zone", "wasteland" ] # Numbered biomes (should be in biomi/) NUMBERED_BIOMES = [ "01_dolina_farm", "02_temni_gozd", "03_zapusceno_mesto", "04_zapuscena_tovarna", "05_nuklearna_cona", "06_podzemni_kompleks", "07_ledena_divjina", "08_vulkanska_oblast", "09_gost_gozd" ] print("="*70) print("๐Ÿงน CLEANUP - Moving items to proper folders") print("="*70) # Check if biomi/ exists, check content biomi_folder = SLIKE / "biomi" if biomi_folder.exists(): print(f"\nโœ… biomi/ exists") numbered = list(biomi_folder.glob("*/")) print(f" Contains: {len(numbered)} folders") for f in numbered: print(f" - {f.name}") # Move old hladno/strelno into orozje/ hladno = SLIKE / "hladno" strelno = SLIKE / "strelno" orozje = SLIKE / "orozje" if hladno.exists(): print(f"\n๐Ÿ“ฆ Moving hladno/ โ†’ orozje/hladno/") dest = orozje / "hladno" if not dest.exists(): shutil.move(str(hladno), str(dest)) print(f" โœ… Moved") else: print(f" โš ๏ธ Destination exists, merging...") for item in hladno.glob("*"): if not (dest / item.name).exists(): shutil.move(str(item), str(dest / item.name)) hladno.rmdir() print(f" โœ… Merged & removed") if strelno.exists(): print(f"\n๐Ÿ“ฆ Moving strelno/ โ†’ orozje/strelno/") dest = orozje / "strelno" if not dest.exists(): shutil.move(str(strelno), str(dest)) print(f" โœ… Moved") else: print(f" โš ๏ธ Destination exists, merging...") for item in strelno.glob("*"): if not (dest / item.name).exists(): shutil.move(str(item), str(dest / item.name)) strelno.rmdir() print(f" โœ… Merged & removed") # Move drevesa/ into rastline/ drevesa = SLIKE / "drevesa" rastline = SLIKE / "rastline" if drevesa.exists(): print(f"\n๐Ÿ“ฆ Moving drevesa/ โ†’ rastline/drevesa/") dest = rastline / "drevesa" if not dest.exists(): shutil.move(str(drevesa), str(dest)) print(f" โœ… Moved") else: print(f" โš ๏ธ Destination exists, merging...") for item in drevesa.glob("*"): if not (dest / item.name).exists(): shutil.move(str(item), str(dest / item.name)) drevesa.rmdir() print(f" โœ… Merged & removed") # Check biomes/ (old folder) biomes_old = SLIKE / "biomes" if biomes_old.exists(): print(f"\n๐Ÿ“ฆ Old biomes/ folder found") content = list(biomes_old.glob("*")) if len(content) > 0: print(f" Moving content to biomi/...") for item in content: dest = biomi_folder / item.name if not dest.exists(): shutil.move(str(item), str(dest)) print(f" โœ… {item.name}") # Remove if empty if len(list(biomes_old.glob("*"))) == 0: biomes_old.rmdir() print(f" โœ… Removed empty biomes/") print("\n" + "="*70) print("โœ… CLEANUP COMPLETE!") print("="*70) # Final structure print("\n๐Ÿ“‚ FINAL STRUCTURE:") print(f"\nMain folders (should be visible in assets/slike/):") print(f" โœ… liki/ - characters") print(f" โœ… predmeti/ - items") print(f" โœ… orozje/ - weapons") print(f" โœ… rastline/ - plants") print(f" โœ… efekti/ - effects") print(f" โœ… sovrazniki/ - enemies") print(f" โœ… biomi/ - numbered biomes") print(f" โœ… zgradbe/ - buildings") print(f" โœ… ui/ - UI elements") print(f" โœ… cutscenes/ - cutscenes") print(f"\nAnomalous zones (18 folders):") for zone in ANOMALOUS: zone_path = SLIKE / zone status = "โœ…" if zone_path.exists() else "โŒ" print(f" {status} {zone}/") print(f"\nFolder count: {len(list(SLIKE.glob('*/')))} total")