Commit f0ba47fe authored by Jan Reimes's avatar Jan Reimes
Browse files

refactor: simplify LibreOfficeFormat StrEnum using enum.auto()

All 22 format members use auto() since values match lowercase names.
parent 23f48db7
Loading
Loading
Loading
Loading
+27 −27
Original line number Diff line number Diff line
@@ -2,38 +2,38 @@

from __future__ import annotations

from enum import StrEnum
from enum import StrEnum, auto


class LibreOfficeFormat(StrEnum):
    """Supported LibreOffice output formats."""

    ODT = "odt"
    DOC = "doc"
    DOCX = "docx"
    RTF = "rtf"
    PDF = "pdf"
    HTML = "html"
    XHTML = "xhtml"
    TXT = "txt"
    MD = "md"
    EPUB = "epub"
    FODT = "fodt"

    ODS = "ods"
    XLS = "xls"
    XLSX = "xlsx"
    CSV = "csv"
    FODS = "fods"

    ODP = "odp"
    PPT = "ppt"
    PPTX = "pptx"
    FODP = "fodp"

    ODG = "odg"
    SVG = "svg"
    FODG = "fodg"
    ODT = auto()
    DOC = auto()
    DOCX = auto()
    RTF = auto()
    PDF = auto()
    HTML = auto()
    XHTML = auto()
    TXT = auto()
    MD = auto()
    EPUB = auto()
    FODT = auto()

    ODS = auto()
    XLS = auto()
    XLSX = auto()
    CSV = auto()
    FODS = auto()

    ODP = auto()
    PPT = auto()
    PPTX = auto()
    FODP = auto()

    ODG = auto()
    SVG = auto()
    FODG = auto()


UNSUPPORTED_CONVERSIONS: frozenset[tuple[str, str]] = frozenset(