rename project to fhdhview

This commit is contained in:
dreamer committed 2026-10-19 16:01:27 +02:00
1 parent c4d3b6b292
commit 6755875938
51 files changed
+39 -39

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2026 Filmhuis Den Haag
# SPDX-License-Identifier: AGPL-3.0-or-later
from xml.etree import ElementTree as ET
from pydantic import ValidationError
from fhdhview.services.screenwriter.schema import AAMPos
class XmlParseError(Exception):
"""Raised when an XML is malformed or violates the ScreenWriter schema."""
def parse_screenwriter_xml(content: bytes | str) -> AAMPos:
"""Parser raw ScreenWriter XML into validated Pydantic models."""
try:
return AAMPos.from_xml(content)
except (ValidationError, ET.ParseError) as e:
raise XmlParseError(f"Failed to parse ScreenWriter XML: {e}") from e