Loading src/coliverter/documents/DocumentType.py +5 −4 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ from pandoc.types import Header, Pandoc, Str class DocumentType(StrEnum): MEETING_MINUTES = auto() OTHER = auto() MEETING_RESOLUTIONS = auto() STANDARD = auto() @classmethod def guess(cls, content: Pandoc) -> Self: Loading @@ -17,16 +18,16 @@ class DocumentType(StrEnum): if not headers: # No headers means we can't really guess anything return cls.OTHER return cls.STANDARD # Take first header level, attrs, content = headers[0] if not content: # No content in the header still leaves us quite at a loss return cls.OTHER return cls.STANDARD if content[0] == Str("Protokoll"): return cls.MEETING_MINUTES return cls.OTHER return cls.STANDARD Loading
src/coliverter/documents/DocumentType.py +5 −4 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ from pandoc.types import Header, Pandoc, Str class DocumentType(StrEnum): MEETING_MINUTES = auto() OTHER = auto() MEETING_RESOLUTIONS = auto() STANDARD = auto() @classmethod def guess(cls, content: Pandoc) -> Self: Loading @@ -17,16 +18,16 @@ class DocumentType(StrEnum): if not headers: # No headers means we can't really guess anything return cls.OTHER return cls.STANDARD # Take first header level, attrs, content = headers[0] if not content: # No content in the header still leaves us quite at a loss return cls.OTHER return cls.STANDARD if content[0] == Str("Protokoll"): return cls.MEETING_MINUTES return cls.OTHER return cls.STANDARD