From d4ff4ca488f0105c5cc78f1c0d08e6445d3be12f Mon Sep 17 00:00:00 2001 From: benoit74 Date: Wed, 17 Jan 2024 14:19:35 +0100 Subject: [PATCH] Fix default publisher value + add missing publisher flags in some offliners --- .../backend/src/common/schemas/offliners/freecodecamp.py | 2 +- .../backend/src/common/schemas/offliners/kolibri.py | 2 +- .../backend/src/common/schemas/offliners/mwoffliner.py | 2 +- .../backend/src/common/schemas/offliners/nautilus.py | 8 ++++++++ .../backend/src/common/schemas/offliners/openedx.py | 7 +++++++ dispatcher/backend/src/common/schemas/offliners/sotoki.py | 2 +- dispatcher/backend/src/common/schemas/offliners/ted.py | 7 +++++++ .../backend/src/common/schemas/offliners/youtube.py | 7 +++++++ dispatcher/backend/src/common/schemas/offliners/zimit.py | 7 +++++++ 9 files changed, 40 insertions(+), 4 deletions(-) diff --git a/dispatcher/backend/src/common/schemas/offliners/freecodecamp.py b/dispatcher/backend/src/common/schemas/offliners/freecodecamp.py index c50949b8..2f398e9b 100644 --- a/dispatcher/backend/src/common/schemas/offliners/freecodecamp.py +++ b/dispatcher/backend/src/common/schemas/offliners/freecodecamp.py @@ -89,7 +89,7 @@ class Meta: publisher = String( metadata={ "label": "Publisher", - "description": "Custom publisher name (ZIM metadata). “OpenZIM” otherwise", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", } ) diff --git a/dispatcher/backend/src/common/schemas/offliners/kolibri.py b/dispatcher/backend/src/common/schemas/offliners/kolibri.py index c73b4ce9..7e64a9af 100644 --- a/dispatcher/backend/src/common/schemas/offliners/kolibri.py +++ b/dispatcher/backend/src/common/schemas/offliners/kolibri.py @@ -109,7 +109,7 @@ class Meta: publisher = String( metadata={ "label": "Publisher", - "description": "Custom publisher name (ZIM metadata). “OpenZIM” otherwise", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", } ) diff --git a/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py b/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py index c0ffe873..aa69209f 100644 --- a/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py +++ b/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py @@ -94,7 +94,7 @@ class Meta: publisher = String( metadata={ "label": "Publisher", - "description": "ZIM publisher metadata. `Kiwix` otherwise.", + "description": "ZIM publisher metadata. `openZIM` otherwise.", } ) filenamePrefix = String( diff --git a/dispatcher/backend/src/common/schemas/offliners/nautilus.py b/dispatcher/backend/src/common/schemas/offliners/nautilus.py index c24611b3..d2aa1130 100644 --- a/dispatcher/backend/src/common/schemas/offliners/nautilus.py +++ b/dispatcher/backend/src/common/schemas/offliners/nautilus.py @@ -113,6 +113,14 @@ class Meta: "description": "Name of content creator.", } ) + + publisher = String( + metadata={ + "label": "Publisher", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", + } + ) + tags = String( metadata={ "label": "ZIM Tags", diff --git a/dispatcher/backend/src/common/schemas/offliners/openedx.py b/dispatcher/backend/src/common/schemas/offliners/openedx.py index 0be71e56..a19a02cd 100644 --- a/dispatcher/backend/src/common/schemas/offliners/openedx.py +++ b/dispatcher/backend/src/common/schemas/offliners/openedx.py @@ -193,6 +193,13 @@ class Meta: data_key="creator", ) + publisher = String( + metadata={ + "label": "Publisher", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", + } + ) + tags = String( metadata={ "label": "ZIM Tags", diff --git a/dispatcher/backend/src/common/schemas/offliners/sotoki.py b/dispatcher/backend/src/common/schemas/offliners/sotoki.py index 8c6af97c..f1b56a9b 100644 --- a/dispatcher/backend/src/common/schemas/offliners/sotoki.py +++ b/dispatcher/backend/src/common/schemas/offliners/sotoki.py @@ -60,7 +60,7 @@ class Meta: publisher = String( metadata={ "label": "Publisher", - "description": "Custom publisher name (ZIM metadata). “OpenZIM” otherwise", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", }, ) diff --git a/dispatcher/backend/src/common/schemas/offliners/ted.py b/dispatcher/backend/src/common/schemas/offliners/ted.py index 13c1d247..d1ca8707 100644 --- a/dispatcher/backend/src/common/schemas/offliners/ted.py +++ b/dispatcher/backend/src/common/schemas/offliners/ted.py @@ -165,6 +165,13 @@ class Meta: } ) + publisher = String( + metadata={ + "label": "Publisher", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", + } + ) + tags = String( metadata={ "label": "ZIM Tags", diff --git a/dispatcher/backend/src/common/schemas/offliners/youtube.py b/dispatcher/backend/src/common/schemas/offliners/youtube.py index b16e28b9..83002c55 100644 --- a/dispatcher/backend/src/common/schemas/offliners/youtube.py +++ b/dispatcher/backend/src/common/schemas/offliners/youtube.py @@ -152,6 +152,13 @@ class Meta: } ) + publisher = String( + metadata={ + "label": "Publisher", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", + } + ) + tags = String( metadata={ "label": "ZIM Tags", diff --git a/dispatcher/backend/src/common/schemas/offliners/zimit.py b/dispatcher/backend/src/common/schemas/offliners/zimit.py index ce63d38a..b59187b5 100644 --- a/dispatcher/backend/src/common/schemas/offliners/zimit.py +++ b/dispatcher/backend/src/common/schemas/offliners/zimit.py @@ -207,6 +207,13 @@ class Meta: } ) + publisher = String( + metadata={ + "label": "Publisher", + "description": "Custom publisher name (ZIM metadata). “openZIM” otherwise", + } + ) + source = String( metadata={ "label": "Content Source",