Bugfix: Tag-Duplikate, Post-Duplikate und Veröffentlichungsdatum
Fixes: - Tag/Kategorie-Erstellung: Bessere Fehlerbehandlung für bereits existierende Tags - Post-Duplikatsprüfung: Verbesserte Suche mit status='any' und case-insensitive Vergleich - Veröffentlichungsdatum: datePublished aus Frontmatter wird als WordPress-Datum gesetzt - Erweiterte Datumsextraktion aus verschiedenen Frontmatter-Strukturen Neue Datei: - USAGE_MODES.md: Übersicht der drei Verwendungsmodi
This commit is contained in:
parent
7a234be652
commit
9ba1aa7b10
4 changed files with 169 additions and 8 deletions
94
USAGE_MODES.md
Normal file
94
USAGE_MODES.md
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
# Verwendungs-Modi
|
||||
|
||||
## Modus 1: Einzelne URL (Empfohlen für Tests)
|
||||
|
||||
```bash
|
||||
python workflow.py "https://example.com/artikel.md"
|
||||
```
|
||||
|
||||
oder lokale Datei:
|
||||
|
||||
```bash
|
||||
python workflow.py "content/beispiel-beitrag.md"
|
||||
```
|
||||
|
||||
**Vorteile:**
|
||||
- Schnellster Weg zum Testen
|
||||
- Keine YAML-Konfiguration nötig
|
||||
- Alle Metadaten aus Frontmatter
|
||||
|
||||
## Modus 2: YAML-Batch (Für kuratierte Listen)
|
||||
|
||||
Erstellen Sie `posts.yaml`:
|
||||
|
||||
```yaml
|
||||
posts:
|
||||
- url: "https://example.com/artikel1.md"
|
||||
- url: "https://example.com/artikel2.md"
|
||||
- file: "content/artikel3.md"
|
||||
|
||||
settings:
|
||||
default_status: "draft"
|
||||
```
|
||||
|
||||
Dann:
|
||||
|
||||
```bash
|
||||
python workflow.py posts.yaml
|
||||
```
|
||||
|
||||
**Vorteile:**
|
||||
- Kontrollierte Liste von Beiträgen
|
||||
- Metadaten können überschrieben werden
|
||||
- Wiederverwendbar
|
||||
|
||||
## Modus 3: Forgejo-Repository (Für Bulk-Import)
|
||||
|
||||
```bash
|
||||
python workflow.py --repo "https://codeberg.org/user/repo" main
|
||||
```
|
||||
|
||||
**Vorteile:**
|
||||
- Alle Markdown-Dateien eines Repos auf einmal
|
||||
- Perfekt für bestehende Dokumentationen
|
||||
- Automatische Erkennung aller .md-Dateien
|
||||
|
||||
## Kombinationen
|
||||
|
||||
### Test → Produktion Workflow
|
||||
|
||||
1. **Einzelne URL testen:**
|
||||
```bash
|
||||
python workflow.py "https://example.com/test-artikel.md"
|
||||
```
|
||||
|
||||
2. **Bei Erfolg: YAML für mehrere erstellen**
|
||||
3. **Bei Erfolg: Status auf "publish" setzen**
|
||||
|
||||
### Repository → Kuratierte Liste
|
||||
|
||||
1. **Repository scannen:**
|
||||
```bash
|
||||
python workflow.py --repo "https://codeberg.org/user/repo" main
|
||||
```
|
||||
|
||||
2. **Prüfen welche Beiträge erstellt wurden**
|
||||
3. **Gewünschte in YAML übertragen für Feinabstimmung**
|
||||
|
||||
## Empfohlener Workflow
|
||||
|
||||
1. ✅ Test mit Beispiel-Beitrag:
|
||||
```bash
|
||||
python workflow.py "content/beispiel-beitrag.md"
|
||||
```
|
||||
|
||||
2. ✅ Test mit eigener URL:
|
||||
```bash
|
||||
python workflow.py "https://ihre-url.de/artikel.md"
|
||||
```
|
||||
|
||||
3. ✅ Bei Erfolg: Batch oder Repo-Import
|
||||
|
||||
4. ✅ In WordPress überprüfen
|
||||
|
||||
5. ✅ Status auf "publish" setzen (in .yaml oder Frontmatter)
|
||||
Loading…
Add table
Add a link
Reference in a new issue