Skip to content

Commit

Permalink
Merge pull request #992 from openzim/mwoffliner_1_14
Browse files Browse the repository at this point in the history
Adapt mwoffliner configuration for 1.14
  • Loading branch information
benoit74 authored Jul 17, 2024
2 parents 75d0f4a + 7c33d39 commit e1eb555
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
28 changes: 27 additions & 1 deletion dispatcher/backend/src/common/schemas/offliners/mwoffliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,18 @@ class Meta:
"description": "Mediawiki wiki base path. Otherwise `/wiki/`.",
}
)
mwApiPath = String(
mwActionApiPath = String(
metadata={
"label": "API Path",
"description": "Mediawiki API path. Otherwise `/w/api.php`.",
}
)
mwRestApiPath = String(
metadata={
"label": "REST API Path",
"description": "Mediawiki REST API path. Otherwise `/w/rest.php`.",
}
)
mwModulePath = String(
metadata={
"label": "Module Path",
Expand Down Expand Up @@ -270,3 +276,23 @@ class Meta:
"description": "Convert images to Webp",
},
)

forceRender = String(
metadata={
"label": "Force Render",
"description": "Force the usage of a specific API end-point/render, "
"automatically chosen otherwise",
},
validate=validate.OneOf(
["VisualEditor", "WikimediaDesktop", "WikimediaMobile"]
),
)

insecure = fields.Boolean(
truthy=[True],
falsy=[False],
metadata={
"label": "Insecure",
"description": "Skip HTTPS server authenticity verification step",
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_valid(self):
"format": ["nopic", "novid", "nodet,nopic"],
"keepEmptyParagraphs": False,
"mwWikiPath": "/wiki",
"mwApiPath": "/w/api.php",
"mwActionApiPath": "/w/api.php",
"mwModulePath": "/w/load.php",
"mwDomain": "en.wikipedia.org",
"mwUsername": "ausername",
Expand Down Expand Up @@ -122,7 +122,7 @@ def test_extra_key(self):
{"format": ["pic", 123]},
{"keepEmptyParagraphs": "True"},
{"mwWikiPath": 123},
{"mwApiPath": 123},
{"mwActionApiPath": 123},
{"mwModulePath": 123},
{"mwDomain": 123},
{"mwUsername": 123},
Expand Down

0 comments on commit e1eb555

Please sign in to comment.