Export-Metadaten: Umlaut-Fix, xmpMM:VersionID + History

- dc:rights und xmpRights:UsageTerms: Empfaenger -> Empfänger (echte Umlaute)
- Scope-Labels: Vollstaendiger Bericht -> Vollständiger Bericht (zwei Stellen)
- DOCX-Fallback-Text: verfuegbar -> verfügbar
- xmpMM:VersionID: Snapshot-Count der Lage (Proxy fuer Berichts-Revision).
  Router laedt COUNT(*) FROM incident_snapshots und reicht es durch.
- xmpMM:History: Audit-Event pro Export als rdf:Seq-Eintrag mit Timestamp,
  softwareAgent, InstanceID, Scope und Version. Single-Event-Format aus
  pragmatischem Grund (pikepdf-API unterstuetzt keine nativen stEvt-
  Strukturen; Raw-XML-Injection waere dafuer noetig).
Dieser Commit ist enthalten in:
claude-dev
2026-04-20 19:33:18 +00:00
Ursprung 5add8d9d59
Commit 285df86c7b
2 geänderte Dateien mit 31 neuen und 6 gelöschten Zeilen

Datei anzeigen

@@ -1009,6 +1009,13 @@ async def export_incident(
)
top_locations = [r["location_name"] for r in await cursor.fetchall() if r["location_name"]]
# Snapshot-Count (als xmpMM:VersionID im PDF)
cursor = await db.execute(
"SELECT COUNT(*) AS cnt FROM incident_snapshots WHERE incident_id = ?",
(incident_id,),
)
snapshot_count = (await cursor.fetchone())["cnt"] or 0
# Artikel
cursor = await db.execute(
"SELECT * FROM articles WHERE incident_id = ? ORDER BY collected_at DESC",
@@ -1063,6 +1070,7 @@ async def export_incident(
sections=sections_set,
organization_name=organization_name,
top_locations=top_locations,
snapshot_count=snapshot_count,
)
filename = f"{slug}_{scope_labels_key}_{date_str}.pdf"
return StreamingResponse(
@@ -1076,6 +1084,7 @@ async def export_incident(
sections=sections_set,
organization_name=organization_name,
top_locations=top_locations,
snapshot_count=snapshot_count,
)
filename = f"{slug}_{scope_labels_key}_{date_str}.docx"
return StreamingResponse(