- Added --filter option examples for repository imports
- Included practical filter patterns (posts/*/index.md, etc.)
- Removed experimental warning as feature is now tested
- Added real-world example with FOERBICO repository
- Added path_filter parameter to fetch_forgejo_repo_markdown_files()
- Filter supports wildcard patterns (e.g., 'posts/*/index.md')
- Fixed hardcoded base URL - now detects git.rpi-virtuell.de and other instances
- Added --filter command line option for repo mode
- Updated help text with filter examples
- Enables selective import of specific markdown files from repository
Usage: python workflow.py --repo <URL> [branch] --filter 'Website/content/posts/*/index.md'
Example: Imports only index.md files from posts subdirectories (59 files found)
- Changed default_status in direct URL mode from 'draft' to 'publish'
- Changed default_status in Forgejo repository mode from 'draft' to 'publish'
- Changed fallback in status determination from 'draft' to 'publish'
- Posts without creativeWorkStatus in frontmatter will now be published immediately
- Can still be overridden by setting creativeWorkStatus in frontmatter or status in YAML config
- Added update_post() method to WordPress API client
- Added _put() method for HTTP PUT requests
- Modified create_post() to call update_post() when duplicate is found
- Existing posts now get updated with latest content, tags, categories, dates, etc.
- Prevents manual deletion and re-creation workflow
- Added excerpt as explicit parameter to create_post()
- Debug output shows 'Aktualisiere...' message when updating
Example: Re-running import on existing post now updates all fields including newly added author tags
- Previously only first author from list was converted to tag
- Now collects all authors from all sources (author, #staticSiteGenerator.author, #commonMetadata.creator)
- Handles both single authors and author lists
- Removes duplicates if same author appears in multiple sources
- All authors are added as individual tags in Vorname_Nachname format
- Example: ['Florian Mayrhofer', 'Gina Buchwald-Chassée'] → tags 'Florian_Mayrhofer', 'Gina_Buchwald-Chassée'
- Added format_author_as_tag() function to convert author names to tag format
- Author names automatically added to tags with spaces replaced by underscores
- Example: 'Jörg Lohrer' → 'Jörg_Lohrer' tag
- Enables author filtering via WordPress tag taxonomy
- Updated documentation to reflect new author handling approach
- Version bump to 0.3.0
Hinzugefügt in README.md (prominent am Anfang):
- ⚠️ Bekannte Einschränkungen-Sektion
- Autor-Zuordnung: Aktuell nur zum importierenden User
- Forgejo-Batch: Noch nicht ausreichend getestet
- Empfehlung: Start mit einzelnen URLs
Aktualisiert in QUICKSTART.md:
- Hinweis auf Autor-Zuordnung
- Modus 3 (Forgejo) als 'Experimentell' markiert
- Empfehlung für Modus 1 (einzelne URL) hervorgehoben
Erweitert in CHANGELOG.md:
- Geplante Features nach Priorität sortiert
- Autor-Mapping als Hoch-Priorität
- Robuste Forgejo-API als Hoch-Priorität
- Neue Features: Dry-Run-Modus, Mehrsprachigkeit
Problem:
- Tags/Kategorien wurden als existierend erkannt, aber nicht dem Beitrag zugewiesen
- WordPress-API gibt bei 'term_exists'-Fehler die term_id in den Fehler-Daten zurück
- Diese term_id wurde nicht genutzt, stattdessen wurde nur erneut gesucht
Lösung:
- Extrahiere term_id direkt aus error_data['data']['term_id']
- Bei term_exists-Code: Nutze die zurückgegebene term_id
- Fallback: Suche erneut falls Extraktion fehlschlägt
- Gezielte Suche mit 'search'-Parameter für bessere Performance
Verbesserungen:
- get_tags() und get_categories() mit optionalem search-Parameter
- Debug-Ausgaben: '→ Tag gefunden' statt nur bei Erstellung
- Reduziert API-Calls durch gezielte Suche
Expected Output:
Tags aus Frontmatter: ['OER', 'OEP', ...]
→ Tag 'OER' gefunden (ID: 3866)
→ Tag 'OEP' existiert bereits (ID: 3867)
Gesamt Tag-IDs: [3866, 3867, ...]
Fixes:
- Unterstützung für flaches Frontmatter (wenn #commonMetadata: als Kommentar)
- creativeWorkStatus direkt im Frontmatter wird jetzt erkannt
- datePublished direkt im Frontmatter wird jetzt erkannt
- Status 'Published' wird zu 'publish' konvertiert (mit 'publish' in lowercase)
- date_gmt für explizite Datumskontrolle hinzugefügt
Debug-Ausgaben:
- Tag-Verarbeitung: Zeigt gefundene Tags und IDs
- Post-Erstellung: Zeigt gesendete Daten (Tags, Kategorien, Datum)
- WordPress-Response: Zeigt zurückgegebene Tags und Datum
- Verbesserte Erfolgsmeldung mit ✅
Getestet mit content/beispiel-beitrag.md:
✅ Status: publish
✅ Datum: 2025-09-02
✅ Tags: 6 Stück korrekt extrahiert
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