Initial commit: auto-video-cut project

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-04-06 21:51:01 +02:00
commit 267070ad52
15 changed files with 2635 additions and 0 deletions

63
setup.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# setup.sh — Abhängigkeiten für auto-video-cut installieren (Linux)
set -euo pipefail
echo "=== auto-video-cut Setup ==="
echo ""
# --- ffmpeg prüfen / installieren ---
if ! command -v ffmpeg &>/dev/null; then
echo "[1/3] ffmpeg nicht gefunden — installiere via apt..."
sudo apt-get update -qq
sudo apt-get install -y ffmpeg
else
echo "[1/3] ffmpeg bereits installiert: $(ffmpeg -version 2>&1 | head -1)"
fi
# --- Python prüfen ---
echo ""
PYTHON=""
for candidate in python3 python; do
if command -v "$candidate" &>/dev/null; then
version=$("$candidate" -c "import sys; print(sys.version_info[:2])")
if "$candidate" -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" 2>/dev/null; then
PYTHON="$candidate"
echo "[2/3] Python gefunden: $("$candidate" --version)"
break
fi
fi
done
if [ -z "$PYTHON" ]; then
echo "[2/3] Python >= 3.10 nicht gefunden — installiere via apt..."
sudo apt-get update -qq
sudo apt-get install -y python3 python3-pip python3-venv
PYTHON=python3
fi
# --- Virtuelle Umgebung ---
echo ""
echo "[3/3] Python-Paket installieren..."
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ ! -d "$SCRIPT_DIR/.venv" ]; then
echo " Erstelle virtuelle Umgebung in .venv/ ..."
"$PYTHON" -m venv "$SCRIPT_DIR/.venv"
fi
# venv aktivieren
source "$SCRIPT_DIR/.venv/bin/activate"
pip install --upgrade pip -q
pip install -e "$SCRIPT_DIR" -q
echo ""
echo "=== Fertig ==="
echo ""
echo "Starten:"
echo " source .venv/bin/activate"
echo " video-cut --help"
echo ""
echo "Oder direkt (ohne Aktivierung):"
echo " .venv/bin/video-cut --help"