Files
novafarma/scripts/copy_dinos.py

42 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""
Copy and organize dino assets from brain to production
"""
import os
import shutil
import re
from pathlib import Path
# Paths
BRAIN_DIR = Path("/Users/davidkotnik/.gemini/antigravity/brain/d13ac847-bed9-4953-875e-30ca30bddc59/")
TARGET_DIR = Path("/Users/davidkotnik/repos/novafarma/assets/slike/dinozavri")
# Create target
TARGET_DIR.mkdir(parents=True, exist_ok=True)
# Find all dino images
dino_files = list(BRAIN_DIR.glob("dino_*.png"))
print(f"🦖 Found {len(dino_files)} dinosaur images!")
print("=" * 60)
copied = 0
for file in dino_files:
# Remove timestamp from filename
# Pattern: dino_name_1767150491467.png -> dino_name.png
clean_name = re.sub(r'_\d{13}', '', file.name)
dest = TARGET_DIR / clean_name
try:
shutil.copy2(file, dest)
copied += 1
print(f"{clean_name}")
except Exception as e:
print(f"❌ Error copying {file.name}: {e}")
print("=" * 60)
print(f"✅ Copied {copied} dinosaur images to assets/slike/dinozavri/")
print(f"📁 Location: {TARGET_DIR}")