#!/bin/bash

# Clean up temporary files and caches

echo "🧹 Cleaning up Sharey project..."

# Remove Python cache
echo "🐍 Removing Python cache..."
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
find . -name "*.pyo" -delete 2>/dev/null || true

# Remove temporary files
echo "🗑️ Removing temporary files..."
rm -f *.tmp *.temp debug_*.html test_*.ppm

# Remove old log files (keep recent ones)
echo "📜 Cleaning old logs..."
find logs/ -name "*.log" -mtime +7 -delete 2>/dev/null || true

# Remove backup files
echo "💾 Removing backup files..."
rm -f *.backup *.bak config.json.backup.*

echo "✅ Cleanup complete!"
