# HG changeset patch # User Florent Aide <florent.aide@gmail.com> # Date 1740173003 -3600 # Fri Feb 21 22:23:23 2025 +0100 # Branch 17.0 # Node ID 49576071aca787e8e908f772b9d717671b6e2327 # Parent ab2425c8701f190adb6bc1c790998bda73ee312d add more export formats diff --git a/NEWS.rst b/NEWS.rst --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,11 @@ Changelog ========= +17.0.1.10.0 +---------- + +Add more export formats from Typst + 17.0.1.9.0 ---------- diff --git a/__manifest__.py b/__manifest__.py --- a/__manifest__.py +++ b/__manifest__.py @@ -21,7 +21,7 @@ { "name": "Redner", "license": "AGPL-3", - "version": "17.0.1.9.0", + "version": "17.0.1.10.0", "category": "Reporting", "author": "XCG Consulting", "website": "https://orbeet.io/", diff --git a/utils/formats.py b/utils/formats.py --- a/utils/formats.py +++ b/utils/formats.py @@ -29,6 +29,9 @@ FORMAT_ODS = "ods" FORMAT_XLS = "xls" FORMAT_DOCX = "docx" +FORMAT_PNG = "png" +FORMAT_SVG = "svg" +FORMAT_TYPST = "typst" class UnkownFormatException(Exception): @@ -86,6 +89,14 @@ "application/vnd.openxmlformats-officedocument" ".wordprocessingml.document", ), + FORMAT_PNG: Format(FORMAT_PNG, "PNG", "image/png"), + FORMAT_SVG: Format(FORMAT_SVG, "SVG", "image/svg+xml"), + FORMAT_TYPST: Format( + FORMAT_TYPST, + "Typst", + "application/typst", + native=True, + ), } def get_format(self, name):