Initial commit: Astro 6 static blog site
All checks were successful
Deploy / deploy (push) Successful in 49s
All checks were successful
Deploy / deploy (push) Successful in 49s
- German (default) and English i18n support - Categories and tags - Blog posts with hero images - Dark/light theme switcher - View Transitions removed to fix reload ghost images - Webmentions integration - RSS feeds per locale Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
commit
5bb63bacf5
95 changed files with 12199 additions and 0 deletions
76
scripts/VISION.md
Normal file
76
scripts/VISION.md
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# Vision Script
|
||||
|
||||
Generiert Metadaten-Sidecars (JSON) fuer Foto-Kollektionen mithilfe von EXIF-Daten und einer Vision-AI (Anthropic oder OpenAI).
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
- `exiftool` installiert (`brew install exiftool`)
|
||||
- `ANTHROPIC_API_KEY` oder `OPENAI_API_KEY` in `.env.local` gesetzt (je nach Provider)
|
||||
|
||||
## Aufruf
|
||||
|
||||
```bash
|
||||
pnpm run vision [optionen] [verzeichnis]
|
||||
```
|
||||
|
||||
Ohne Verzeichnis wird der Standard `content/fotos` verwendet.
|
||||
|
||||
## Optionen
|
||||
|
||||
| Option | Beschreibung |
|
||||
|---|---|
|
||||
| `--provider=anthropic\|openai` | Vision-API Provider (Standard: `anthropic`). Anthropic nutzt `claude-opus-4-6`, OpenAI nutzt `gpt-4o-mini`. |
|
||||
| `--refresh` | Alle Sidecars neu generieren (EXIF + AI). Ueberschreibt vorhandene Dateien. |
|
||||
| `--exif-only` | Nur EXIF-Daten in bestehenden Sidecars aktualisieren. AI-Felder (Titel, Alt, Tags) bleiben erhalten. |
|
||||
| `--concurrency=N` | Anzahl paralleler Vision-API-Anfragen (Standard: 2) |
|
||||
| `--retries=N` | Maximale Wiederholungsversuche bei Rate-Limits (Standard: 8) |
|
||||
| `--backoff-ms=N` | Basis-Wartezeit in ms fuer exponentielles Backoff (Standard: 1500) |
|
||||
|
||||
## Umgebungsvariablen
|
||||
|
||||
Alternativ zu den CLI-Optionen koennen diese Werte auch per Umgebungsvariable gesetzt werden:
|
||||
|
||||
| Variable | Entspricht |
|
||||
|---|---|
|
||||
| `VISION_PROVIDER` | `--provider` |
|
||||
| `VISION_CONCURRENCY` | `--concurrency` |
|
||||
| `VISION_MAX_RETRIES` | `--retries` |
|
||||
| `VISION_BASE_BACKOFF_MS` | `--backoff-ms` |
|
||||
|
||||
CLI-Optionen haben Vorrang vor Umgebungsvariablen.
|
||||
|
||||
## Beispiele
|
||||
|
||||
```bash
|
||||
# Neue Bilder ohne Sidecar verarbeiten (Anthropic)
|
||||
pnpm run vision
|
||||
|
||||
# Mit OpenAI statt Anthropic
|
||||
pnpm run vision --provider=openai
|
||||
|
||||
# Alle Sidecars in einem bestimmten Ordner neu generieren
|
||||
pnpm run vision --refresh --provider=openai content/fotos/kollektionen/reisen/asien/thailand
|
||||
|
||||
# Nur EXIF-Daten aktualisieren (z.B. nach erneutem Lightroom-Export)
|
||||
pnpm run vision --exif-only
|
||||
|
||||
# Mit hoeherer Parallelitaet
|
||||
pnpm run vision --refresh --concurrency=4
|
||||
```
|
||||
|
||||
## Ausgabe
|
||||
|
||||
Pro Bild wird eine JSON-Sidecar-Datei mit folgendem Inhalt erstellt:
|
||||
|
||||
- `title` - 5 Titelvorschlaege (deutsch, via AI)
|
||||
- `alt` - Bildbeschreibung / Alt-Text (deutsch, via AI)
|
||||
- `tags` - 5 thematische Tags (deutsch, via AI)
|
||||
- `date` - Aufnahmedatum (aus EXIF)
|
||||
- `location` - GPS-Koordinaten (aus EXIF, falls vorhanden)
|
||||
- `locationName` - Aufgeloester Ortsname via Nominatim (falls GPS vorhanden)
|
||||
- `exif` - Kamera, Objektiv, Blende, ISO, Brennweite, Belichtungszeit
|
||||
|
||||
|
||||
# Fix
|
||||
bei OPENAI rate-limit mit einem gerigem Tier-Level
|
||||
pnpm run vision --refresh --provider=openai --concurrency=1 content/fotos/kollektionen/reisen/asien/malaysia
|
||||
Loading…
Add table
Add a link
Reference in a new issue