Project-Image-Uploader/scripts/examples.sh
matthias.lotz 40aa546498 chore: Improve release script with tag-based commit detection
- Add helpful warning when no previous tag exists
- Show which tag is being used for commit range
- Provide tip for creating retroactive tags
- Fix typo in git log command (--online -> --oneline)
2025-11-29 16:52:19 +01:00

68 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
"""
Beispiel-Verwendung des Batch-Uploaders
======================================
Dieses Skript zeigt verschiedene Anwendungsfälle des batch_uploader.py
"""
echo "🚀 Batch Uploader Beispiele"
echo "=========================="
# Backend Status prüfen
echo -e "\n1. Backend Status prüfen:"
echo "curl http://localhost:5000/api/groups"
# Beispiel 1: Einfacher Upload
echo -e "\n2. Einfacher Upload:"
echo "python batch_uploader.py ./test_images --titel \"Test Sammlung\" --user admin --password 'SehrSicher123!'"
# Beispiel 2: Erweiterte Optionen
echo -e "\n3. Mit allen Optionen:"
echo "python batch_uploader.py /home/user/photos --titel \"Urlaubsbilder 2024\" --name \"Max Mustermann\" --backend http://localhost:5000 --user admin --password 'SehrSicher123!' --social-media-consents consents.json --verbose"
# Beispiel 3: Dry Run
echo -e "\n4. Dry Run (Analyse ohne Upload):"
echo "python batch_uploader.py ./images --dry-run --verbose"
# Beispiel 4: Große Sammlung
echo -e "\n5. Große Sammlung optimiert:"
echo "python batch_uploader.py /massive/photo/archive --titel \"Foto Archiv\" --user admin --password 'SehrSicher123!' --verbose"
# Test-Verzeichnis erstellen
echo -e "\n6. Test-Verzeichnis erstellen:"
echo "mkdir -p test_images/2024_Urlaub/Strand"
echo "mkdir -p test_images/2023_Familie"
echo "# Kopiere einige Testbilder in diese Verzeichnisse"
echo -e "\n✅ Bereit für Tests!"
# Interaktiver Modus
if [ "$1" = "--interactive" ]; then
echo -e "\n🎯 Interaktiver Test-Modus"
# Backend prüfen
echo -e "\nPrüfe Backend-Verbindung..."
if curl -s http://localhost:5000/api/groups > /dev/null; then
echo "✅ Backend läuft"
else
echo "❌ Backend nicht erreichbar - starte mit ./prod.sh"
exit 1
fi
# Test-Verzeichnis mit Beispiel-Struktur erstellen
echo -e "\nErstelle Test-Struktur..."
mkdir -p test_images/2024_Urlaub/{Strand,Stadt}
mkdir -p test_images/2023_Familie
echo "📁 Test-Struktur erstellt:"
echo "test_images/"
echo "├── 2024_Urlaub/"
echo "│ ├── Strand/"
echo "│ └── Stadt/"
echo "└── 2023_Familie/"
echo ""
echo "💡 Kopiere jetzt Testbilder in diese Verzeichnisse"
echo "💡 Dann teste mit: python batch_uploader.py test_images --dry-run"
fi