Repository navigation
Expand file tree
/
Copy pathoffliner-definition.json
More file actions
367 lines (367 loc) · 12 KB
/
Copy pathoffliner-definition.json
File metadata and controls
367 lines (367 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
{
"offliner_id": "mwoffliner",
"stdOutput": "outputDirectory",
"stdStats": false,
"flags": {
"mwUrl": {
"type": "url",
"required": true,
"title": "Wiki URL",
"description": "The URL of the mediawiki to scrape"
},
"adminEmail": {
"type": "email",
"required": true,
"title": "Admin Email",
"description": "Email of the mwoffliner user which will be put in the HTTP user-agent string"
},
"userAgent": {
"type": "string",
"required": false,
"title": "User Agent",
"description": "Custom User-Agent header for all HTTP requests. Defaults to 'MWOffliner/<version> (<adminEmail>)'"
},
"pageList": {
"type": "blob",
"kind": "txt",
"required": false,
"title": "Page List",
"description": "List of pages to include. Comma separated list of titles or HTTP(S) URL to a file with one title (in UTF8) per line",
"allowRemoteUrl": true
},
"pageListToIgnore": {
"type": "blob",
"kind": "txt",
"required": false,
"title": "Page List to ignore",
"description": "List of pages to ignore. Comma separated list of titles or HTTP(S) URL to a file with one title (in UTF8) per line",
"allowRemoteUrl": true
},
"customMainPage": {
"type": "string",
"required": false,
"title": "Main Page",
"description": "Custom page to be used as welcome page."
},
"customZimTitle": {
"type": "string",
"required": false,
"title": "ZIM Title",
"description": "ZIM custom title metadata.",
"minGraphemes": 1,
"maxGraphemes": 30
},
"customZimDescription": {
"type": "string",
"required": false,
"title": "ZIM custom description",
"description": "Max length is 80 chars",
"minGraphemes": 1,
"maxGraphemes": 80
},
"customZimLongDescription": {
"type": "string",
"required": false,
"title": "ZIM custom long description",
"description": "Max length is 4000 chars",
"minGraphemes": 1,
"maxGraphemes": 4000
},
"customZimFavicon": {
"type": "blob",
"kind": "image",
"required": false,
"title": "ZIM favicon",
"description": "URL to a PNG to use as favicon. Will be resized to 48x48px."
},
"customZimTags": {
"type": "string",
"required": false,
"title": "ZIM Tags",
"description": "Semi-colon separated list of ZIM tags"
},
"customZimLanguage": {
"type": "string",
"required": false,
"title": "ZIM Language Metadata",
"description": "Custom ISO-639-3 language code for the ZIM",
"pattern": "^[a-z]{3}(,[a-z]{3})*$",
"customValidator": "language_code"
},
"customZimName": {
"type": "string",
"required": false,
"title": "ZIM Name",
"description": "Custom ZIM Name template. Placeholders: {domain}, {lang}, {lang_or_variant}, {selection}."
},
"customZimFilename": {
"type": "string",
"required": false,
"title": "ZIM filename",
"description": "Custom ZIM filename template, with the .zim extension. Placeholders: {zim_name}, {domain}, {lang}, {lang_or_variant}, {selection}, {flavour}, {period}."
},
"publisher": {
"type": "string",
"required": false,
"title": "Publisher",
"isPublisher": true,
"description": "ZIM publisher metadata. `openZIM` otherwise."
},
"formats": {
"type": "list-of-string-enum",
"required": false,
"title": "Formats",
"description": "Which flavours to build. Empty option will scrape all page contents, including videos ('full' flavour).",
"alias": "format",
"choices": [
{ "title": "mini: no page details or pictures or videos", "value": "nodet,nopic:mini" },
{ "title": "nopic: no page pictures or videos", "value": "nopic:nopic" },
{ "title": "maxi: all except page videos", "value": "novid:maxi" },
{ "title": "all: everything including videos", "value": "" }
]
},
"optimisationCacheUrl": {
"type": "url",
"required": false,
"title": "Optimisation Cache URL",
"description": "Object Storage URL (including credentials and bucket name) to cache optimised media files.",
"secret": true
},
"addNamespaces": {
"type": "string",
"required": false,
"title": "Add Namespaces",
"description": "Force additional namespaces (comma separated numbers)"
},
"addContentModels": {
"type": "string",
"required": false,
"title": "Add Content Models",
"description": "Include additional content models besides wikitext (comma separated, e.g 'Scribunto,json'). By default, only wikitext pages are scraped."
},
"onlyNamespaces": {
"type": "string",
"required": false,
"title": "Only Namespaces",
"description": "Include only pages of provided namespaces (comma separated numbers)"
},
"getCategories": {
"type": "boolean",
"required": false,
"title": "Add categories",
"description": "Download category pages"
},
"categoriesPageSize": {
"type": "integer",
"required": false,
"title": "Categories page size",
"description": "Number of items (subcategories, pages, files) to display per page on category pages (default is 200)",
"min": 1
},
"keepEmptySections": {
"type": "boolean",
"required": false,
"title": "Keep empty sections",
"description": "Keep all sections, even empty ones typically used as placeholders in wikis to outline expected page structure."
},
"minifyHtml": {
"type": "boolean",
"required": false,
"title": "Minify HTML",
"description": "Try to reduce the size of the HTML"
},
"mwActionApiPath": {
"type": "string",
"required": false,
"title": "API Path",
"description": "Mediawiki API path. (by default `/w/api.php`)."
},
"mwModulePath": {
"type": "string",
"required": false,
"title": "Module Path",
"description": "MediaWiki module load path ($wgLoadScript), automatically chosen based on script path otherwise."
},
"mwDomain": {
"type": "string",
"required": false,
"title": "User Domain",
"description": "Mediawiki user domain (for private wikis)"
},
"mwUsername": {
"type": "string",
"required": false,
"title": "Username",
"description": "Mediawiki username (for private wikis)"
},
"mwPassword": {
"type": "string",
"required": false,
"title": "Password",
"description": "Mediawiki user password (for private wikis)",
"secret": true
},
"osTmpDir": {
"type": "string",
"required": false,
"title": "OS Temp Dir",
"description": "Override default operating system temporary directory path environnement variable"
},
"outputDirectory": {
"type": "string",
"required": false,
"title": "Output folder",
"description": "Output folder for ZIM file or build folder. Leave it as `/output`",
"pattern": "^/output$"
},
"requestTimeout": {
"type": "integer",
"required": false,
"title": "Request Timeout",
"description": "Request timeout in seconds (default is 120s)",
"min": 1
},
"speed": {
"type": "float",
"title": "Speed",
"required": false,
"description": "Controls scraping speed. 1 is the default, 0.1 makes it ten times slower, 10 makes it ten times faster. Values above 1 must be integers (number of parallel workers)."
},
"withoutZimFullTextIndex": {
"type": "boolean",
"title": "Without ZIM Full Text Index",
"required": false,
"description": "Don't include a fulltext search index to the ZIM"
},
"logLevel": {
"type": "string-enum",
"required": false,
"title": "Verbose",
"description": "Set the log level. One of: \"debug\", \"info\", \"warn\", \"error\", \"silent\" (default: \"info\").",
"choices": [
{ "title": "DEBUG", "value": "debug " },
{ "title": "INFO", "value": "info" },
{ "title": "WARN", "value": "warn" },
{ "title": "ERROR", "value": "error" },
{ "title": "SILENT", "value": "silent" }
]
},
"webp": {
"type": "boolean",
"title": "Webp",
"description": "Convert all jpeg, png and gif images to webp format",
"required": false
},
"forceSkin": {
"type": "string",
"required": false,
"title": "Force Skin",
"description": "Force the usage of a skin (must be available on wiki), default skin automatically chosen otherwise"
},
"insecure": {
"type": "boolean",
"title": "Insecure",
"description": "Skip HTTPS server authenticity verification step",
"required": false
},
"langVariant": {
"type": "list-of-string",
"title": "Language Variants",
"description": "Use specific language variants, only for wikis supporting language conversion. Each variant will cause a new ZIM file to be created.",
"required": false
},
"javaScript": {
"type": "string-enum",
"title": "JavaScript",
"description": "Amount of JavaScript being allowed in pages (default: trusted)",
"required": false,
"choices": [
{ "title": "NONE", "value": "none" },
{ "title": "TRUSTED", "value": "trusted" },
{ "title": "ALL", "value": "all" }
]
},
"addModules": {
"type": "string",
"title": "Additional modules",
"description": "Add additional ResourceLoader modules for dynamic loading (comma separated list)",
"required": false
},
"customCss": {
"type": "blob",
"kind": "css",
"required": false,
"title": "Custom CSS",
"description": "Custom CSS to inject into all rendered pages ; remote value can be a comma-separated list of CSS URLs.",
"allowRemoteUrl": true
},
"customJs": {
"type": "blob",
"kind": "txt",
"required": false,
"title": "Custom JS",
"description": "Custom JS to inject into all rendered pages ; remote value can be a comma-separated list of JS URLs.",
"allowRemoteUrl": true
},
"mathJaxSource": {
"type": "url",
"required": false,
"title": "MathJax Source",
"description": "MathJax ZIP archive to extract and include in the ZIM. Pages needing MathJax are detected automatically from their JS module list."
},
"mathJaxConfig": {
"type": "blob",
"kind": "html",
"required": false,
"title": "MathJax Config",
"description": "MathJax configuration HTML <script>. Its content is injected inline in pages that need MathJax, before the MathJax library.",
"allowRemoteUrl": true
},
"mathJaxEntryPoint": {
"type": "string",
"required": false,
"title": "MathJax Entry Point",
"description": "Relative path inside the extracted MathJax archive to the main entry-point script. Defaults to MathJax.js (MathJax 2). For MathJax 3 use e.g. es5/tex-chtml.js."
},
"mathJaxAllPages": {
"type": "boolean",
"required": false,
"title": "MathJax On All Pages",
"description": "Inject MathJax config/entry-point scripts on all pages, instead of only on pages whose JS module list mentions MathJax. Useful for wikis which do not list MathJax in their page modules. Requires MathJax Source to also be set."
}
},
"zimMetadata": [
{
"metadata": "Name",
"flag": "customZimName"
},
{
"metadata": "Title",
"flag": "customZimTitle"
},
{
"metadata": "Description",
"flag": "customZimDescription"
},
{
"metadata": "LongDescription",
"flag": "customZimLongDescription"
},
{
"metadata": "Publisher",
"flag": "publisher"
},
{
"metadata": "Language",
"flag": "customZimLanguage"
},
{
"metadata": "Illustration",
"flag": "customZimFavicon"
},
{
"metadata": "Flavour",
"flag": "formats"
}
]
}