🎨 Project organization - Dolina Smrti
- Reorganized 4513 images into 8 categories in Slike_za_Tiled/ - Integrated 330 DLC images into main categories - Renamed project from novafarma to dolinasmrti - Added README.md files for documentation - Created 2 base TSX tilesets for Tiled - Created template map (_template_base.tmx) - All assets ready for Tiled Map Editor Categories created: - 01_characters/ (zombies, npcs, players) - 02_creatures/ (animals, monsters, slimes, dinosaurs) - 03_terrain/ (ground, fences, mine) - 04_buildings/ (houses, ruins, structures) - 05_objects/ (tools, items, farming) - 06_vegetation/ (trees, plants) - 08_misc/ (1257 files for manual review)
This commit is contained in:
75
tools/move_dlc.py
Normal file
75
tools/move_dlc.py
Normal file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Premakne DLC vsebino nazaj v glavne kategorije
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
BASE_DIR = Path("/Users/davidkotnik/Desktop/novafarma/Slike_za_Tiled")
|
||||
|
||||
def move_dlc_content():
|
||||
"""Premakne DLC content v glavne kategorije"""
|
||||
print("🔄 Premikami DLC vsebino v glavne kategorije...\n")
|
||||
|
||||
dlc_dir = BASE_DIR / "07_dlc_content"
|
||||
|
||||
if not dlc_dir.exists():
|
||||
print("❌ DLC mapa ne obstaja!")
|
||||
return
|
||||
|
||||
moved_count = 0
|
||||
|
||||
# Amazon -> creatures/monsters
|
||||
for file in (dlc_dir / "amazon").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "02_creatures/monsters" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Atlantis -> buildings/structures
|
||||
for file in (dlc_dir / "atlantis").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "04_buildings/structures" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Catacombs -> creatures/monsters
|
||||
for file in (dlc_dir / "catacombs").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "02_creatures/monsters" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Chernobyl -> creatures/monsters
|
||||
for file in (dlc_dir / "chernobyl").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "02_creatures/monsters" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Desert/Egypt -> buildings/structures
|
||||
for file in (dlc_dir / "desert_egypt").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "04_buildings/structures" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Lochness -> creatures/monsters
|
||||
for file in (dlc_dir / "lochness").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "02_creatures/monsters" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Mythical -> creatures/monsters
|
||||
for file in (dlc_dir / "mythical").glob("*.png"):
|
||||
shutil.move(str(file), str(BASE_DIR / "02_creatures/monsters" / file.name))
|
||||
moved_count += 1
|
||||
|
||||
# Pobriši prazne DLC mape
|
||||
shutil.rmtree(dlc_dir)
|
||||
|
||||
print(f"✅ Premaknjenih {moved_count} DLC datotek")
|
||||
print("✅ Mapa 07_dlc_content izbrisana\n")
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("=" * 60)
|
||||
print(" REORGANIZACIJA DLC VSEBINE")
|
||||
print("=" * 60)
|
||||
print()
|
||||
|
||||
move_dlc_content()
|
||||
|
||||
print("=" * 60)
|
||||
print(" KONČANO!")
|
||||
print("=" * 60)
|
||||
121
tools/organize_images.py
Executable file
121
tools/organize_images.py
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Organizira slike v Slike_za_Tiled/ mapi v kategorije
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
# Bazna mapa
|
||||
BASE_DIR = Path("/Users/davidkotnik/Desktop/novafarma/Slike_za_Tiled")
|
||||
|
||||
# Definicije kategorij (ključne besede -> ciljna mapa)
|
||||
CATEGORIES = {
|
||||
"01_characters/zombies": ["zombie"],
|
||||
"01_characters/npcs": ["npc", "trader", "blacksmith", "merchant", "baker", "farmer", "doctor", "ivan", "jakob", "marija", "lena", "sonya", "romance"],
|
||||
"01_characters/players": ["kai_character", "ana_character", "character_customization"],
|
||||
"02_creatures/animals": ["animal", "cow", "chicken", "dog", "livestock", "donkey", "horse"],
|
||||
"02_creatures/monsters": ["troll", "creature", "anomalous", "cryptid", "mythical_creatures"],
|
||||
"02_creatures/slimes": ["slime"],
|
||||
"02_creatures/dinosaurs": ["dinosaur", "dino"],
|
||||
"03_terrain/ground": ["grass", "soil", "tileset", "ground", "terrain"],
|
||||
"03_terrain/fences": ["fence"],
|
||||
"03_terrain/mine": ["mine_tileset", "mine_interior", "mine_entrance"],
|
||||
"04_buildings/houses": ["house", "farmhouse", "barn"],
|
||||
"04_buildings/ruins": ["ruin", "buildings_ruins"],
|
||||
"04_buildings/structures": ["building", "town_buildings", "structure", "blacksmith_workshop", "bridge", "wall", "city", "portal", "minting"],
|
||||
"05_objects/tools": ["tool", "weapon", "bow", "arrow", "firearms"],
|
||||
"05_objects/furniture": ["furniture", "bathroom", "bedroom", "kitchen", "living_room"],
|
||||
"05_objects/items": ["items_pack", "backpack", "chest", "grave", "spawner", "objects_pack"],
|
||||
"05_objects/farming": ["sprinkler", "seed", "crop"],
|
||||
"06_vegetation/trees": ["tree", "sequoia", "birch", "vegetation"],
|
||||
"06_vegetation/plants": ["flower", "plant", "leaf"],
|
||||
"07_dlc_content/amazon": ["amazon"],
|
||||
"07_dlc_content/atlantis": ["atlantis"],
|
||||
"07_dlc_content/catacombs": ["catacombs"],
|
||||
"07_dlc_content/chernobyl": ["chernobyl"],
|
||||
"07_dlc_content/desert_egypt": ["egyptian", "egypt", "pyramid", "sphinx"],
|
||||
"07_dlc_content/lochness": ["lochness"],
|
||||
"07_dlc_content/mythical": ["mythical_pack"],
|
||||
}
|
||||
|
||||
def create_directories():
|
||||
"""Ustvari vse potrebne direktorije"""
|
||||
print("🔨 Ustvarjam direktorije...")
|
||||
for category in CATEGORIES.keys():
|
||||
dir_path = BASE_DIR / category
|
||||
dir_path.mkdir(parents=True, exist_ok=True)
|
||||
print(f" ✓ {category}")
|
||||
|
||||
# Tudi misc
|
||||
(BASE_DIR / "08_misc").mkdir(parents=True, exist_ok=True)
|
||||
print(f" ✓ 08_misc")
|
||||
print()
|
||||
|
||||
def organize_images():
|
||||
"""Organizira slike v kategorije"""
|
||||
print("📦 Organiziram slike...")
|
||||
|
||||
# Pridobi vse PNG slike v baznem direktoriju (samo top-level)
|
||||
png_files = list(BASE_DIR.glob("*.png"))
|
||||
|
||||
total_files = len(png_files)
|
||||
moved_files = 0
|
||||
|
||||
print(f"Najdenih {total_files} PNG datotek\n")
|
||||
|
||||
# Slovar za sledenje premikom
|
||||
moved_to_category = {}
|
||||
|
||||
for png_file in png_files:
|
||||
filename = png_file.name.lower()
|
||||
moved = False
|
||||
|
||||
# Preveri vsako kategorijo
|
||||
for category, keywords in CATEGORIES.items():
|
||||
if any(keyword in filename for keyword in keywords):
|
||||
target_dir = BASE_DIR / category
|
||||
target_file = target_dir / png_file.name
|
||||
|
||||
# Premakni datoteko
|
||||
shutil.move(str(png_file), str(target_file))
|
||||
|
||||
if category not in moved_to_category:
|
||||
moved_to_category[category] = 0
|
||||
moved_to_category[category] += 1
|
||||
|
||||
moved_files += 1
|
||||
moved = True
|
||||
break
|
||||
|
||||
# Če ni ujemanja, premakni v misc
|
||||
if not moved:
|
||||
target_dir = BASE_DIR / "08_misc"
|
||||
target_file = target_dir / png_file.name
|
||||
shutil.move(str(png_file), str(target_file))
|
||||
|
||||
if "08_misc" not in moved_to_category:
|
||||
moved_to_category["08_misc"] = 0
|
||||
moved_to_category["08_misc"] += 1
|
||||
moved_files += 1
|
||||
|
||||
print("\n✅ Organizacija končana!\n")
|
||||
print("📊 Statistika premikov:")
|
||||
for category, count in sorted(moved_to_category.items()):
|
||||
print(f" {category}: {count} datotek")
|
||||
|
||||
print(f"\n🎉 Skupaj premaknjenih: {moved_files} / {total_files}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("=" * 60)
|
||||
print(" ORGANIZACIJA SLIK - NovaFarma")
|
||||
print("=" * 60)
|
||||
print()
|
||||
|
||||
create_directories()
|
||||
organize_images()
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print(" KONČANO!")
|
||||
print("=" * 60)
|
||||
Reference in New Issue
Block a user