-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
415 lines (415 loc) · 14.2 KB
/
config.schema.json
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
{
"$schema": "http://json-schema.org/schema",
"definitions": {
"timepoint": {
"description": "Definition of point in time",
"oneOf": [
{
"description": "Unix timestamp in miliseconds",
"type": "integer"
},
{
"description": "ISO datetime as string, for example 1970-01-01T01:23:45.832330",
"type": "string"
}
]
},
"entityLocator": {
"description": "Unique identification of an entity.",
"type": "object",
"oneOf": [
{
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
{
"required": [
"name"
],
"properties": {
"name": {
"description": "Pretty (displayed) name.",
"type": "string"
}
}
},
{
"required": [
"internalName"
],
"properties": {
"internalName": {
"description": "Internal name (used in API).",
"type": "string"
}
}
}
]
},
"channelPostOptions": {
"description": "Defines constraints on what channel contents should be downloaded. Can be defined on multiple levels (such as 'all channels' vs 'concrete channel', more specific options override more general ones.",
"type": "object",
"properties": {
"beforePost": {
"type": "string",
"description": "Only fetches posts up to and not including this post id."
},
"afterPost": {
"type": "string",
"description": "Only fetches posts after and not including this post id."
},
"afterTime": {
"description": "Only fetches post after before given timepoint.",
"$ref": "#/definitions/timepoint"
},
"beforeTime": {
"description": "Only fetches post created before given timepoint.",
"$ref": "#/definitions/timepoint"
},
"downloadFromOldest": {
"description": "Selects download direction, going from oldest to newest by default.",
"type": "boolean"
},
"maximumPostCount": {
"description": "There cannot be more than this amount of posts in the storage. Good as sanity check on large channels for bulk download. Unlimited if -1 or default.",
"type": "integer",
"minimum": -1
},
"sessionPostLimit": {
"description": "Download only up to given number of posts in one session. Unlimited if -1 or default.",
"type": "integer",
"minimum": -1
},
"onExistingCompatible": {
"description": "Selects how to treat previously downloaded archive if new archive is to be downloaded with compatible settings, so contents of previous archive could be simply updated.\nskip - nothing will be downloaded\nupdate - archive is appended (default)\nbackup - new download is made from scratch, old archive is kept as a backup\ndelete - new download is made from scratch, old archive is deleted",
"type": "string",
"enum": [
"backup",
"delete",
"update",
"skip"
]
},
"onExistingIncompatible": {
"description": "Selects how to treat previously downloaded archive if new download settings require to start from scratch.\nskip - nothing will be downloaded\nbackup - old archive is kept as a backup (default)\ndelete - old archive is deleted",
"type": "string",
"enum": [
"backup",
"delete",
"skip"
]
},
"attachments": {
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"download": {
"description": "Whether to download file attachments or not. Defaults to false.",
"type": "boolean"
},
"maxSize": {
"description": "Download only files that are up to and including given size in bytes.",
"type": "integer",
"minimum": 0
},
"allowedMimeTypes": {
"description": "Download only files of specified mime types. No limit if ommited.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"emojis": {
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"download": {
"description": "Whether to download used custom emojis or not (default).",
"type": "boolean"
},
"metadata": {
"description": "Whether to store metadata structures for stored emoji (default) or not. If not, custom emojis are retained only in text form.",
"type": "boolean"
}
}
},
"avatars": {
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"download": {
"description": "Whether to download user icons (avatars) or not (default).",
"type": "boolean"
}
}
}
}
}
},
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"required": [
"version"
],
"properties": {
"$schema": {
"type": "string"
},
"version": {
"description": "Version of the config file schema. Used for backward compatibilty and problem reporting.",
"type": "string",
"default": "0"
},
"connection": {
"description": "Contains all needed to set up a connection with the server.",
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"hostname": {
"description": "Mattermost server url used as prefix to api calls.",
"type": "string"
},
"usedApi": {
"description": "What version of Mattermost API to use. Currently, only v4 is supported, so this field mostly serves as additional forward compatibility check.",
"type": "number",
"const": 4
},
"username": {
"description": "Mattermost username to login as.",
"type": "string",
"minLength": 1
},
"password": {
"description": "Password for provided username. Not necessary if login happens through through alternative strategies (like providing authentication token).",
"type": "string"
},
"token": {
"description": "Mattermost authentication token used for logging in and also for all subsequent requests. Not required if password authentication is chosen instead. Note that tokens are typically temporary and need to be refreshed once the session expires. Creation of long term tokens is permitted, but not available for ordinary users by default.",
"type": "string"
}
}
},
"downloadTeamChannels": {
"description": "Should download team-based channels? (Ones explicitly specified in `teams` are treated separately)",
"type": "boolean"
},
"teams": {
"type": "array",
"items": {
"description": "Team scraping info. May also specify subset of data to be scraped",
"type": "object",
"required": [
"team"
],
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"team": {
"$ref": "#/definitions/entityLocator"
},
"downloadPublicChannels": {
"description": "Should download public channels (yes by default)? Ones explicitly specified in `publicChannels` are treated separately.",
"type": "boolean"
},
"publicChannels": {
"description": "Public (open) channels to save (all if ommited).",
"type": "array",
"items": {
"allOf": [
{
"description": "Channel unique identificators",
"$ref": "#/definitions/entityLocator"
},
{
"$ref": "#/definitions/channelPostOptions"
}
]
}
},
"downloadPrivateChannels": {
"description": "Should download private channels (yes by default)? Ones explicitly specified in `privateChannels` are treated separately.",
"type": "boolean"
},
"privateChannels": {
"description": "Private channels to save.",
"type": "array",
"items": {
"allOf": [
{
"description": "Channel unique identificators",
"$ref": "#/definitions/entityLocator"
},
{
"$ref": "#/definitions/channelPostOptions"
}
]
}
},
"defaultChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"publicChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"privateChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
}
}
}
},
"downloadUserChannels": {
"description": "Should download direct user to user channels (yes by default)? Ones explicitly specified in `users` are treated separately.",
"type": "boolean"
},
"users": {
"description": "List of users we want to save private conversations with.",
"type": "array",
"items": {
"anyOf": [
{
"description": "Identification of the user.",
"$ref": "#/definitions/entityLocator"
},
{
"$ref": "#/definitions/channelPostOptions"
}
]
}
},
"downloadGroupChannels": {
"description": "Should download group channels (yes by default)? Ones explicitly specified in `users` are treated separately.",
"type": "boolean"
},
"groups": {
"description": "List of groups we want to save conversations with.",
"type": "array",
"items": {
"description": "Group channel selector. Specify by id or list of users.",
"type": "object",
"required": ["group"],
"allOf": [
{
"properties": {
"group": {
"description": "Identification of a group channel. Either channel id or list of users.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/entityLocator"
}
}
]
}
}
},
{
"$ref": "#/definitions/channelPostOptions"
}
]
}
},
"downloadEmojis": {
"description": "Whether to download all custom emojis available, regardless of origin. To download only emojis used in posts being downloaded, use per-channel option.",
"type": "boolean"
},
"defaultChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"userChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"groupChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"privateChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"publicChannelOptions": {
"$ref": "#/definitions/channelPostOptions",
"additionalProperties": false,
"additionalPropertiesWarn": true
},
"throttling": {
"type": "object",
"properties": {
"loopDelay": {
"description": "Delay between bulk requests in ms.",
"type": "integer",
"minimum": 0
}
}
},
"output": {
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"directory": {
"type": "string"
},
"standalonePosts": {
"description": "Whether posts contain redundant information that makes them readable without looking up ids.",
"type": "boolean"
},
"humanFriendlyPosts": {
"description": "Drops unnecessary ids from posts (replacing userIds with userNames).",
"type": "boolean"
}
}
},
"report": {
"type": "object",
"additionalProperties": false,
"additionalPropertiesWarn": true,
"properties": {
"verbosity": {
"description": "Chooses level of information that program outputs.\n0 - quiet mode, only problems are shown\n1 - default mode, optimal for user facing interactive use\n2 - verbose mode with extra information, useful for debugging",
"type": "integer",
"minimum": 0,
"maximum": 2,
"default": 1
},
"showProgress": {
"description": "True if smart interactive download progress be reported along the way (deduced by stdout type by default).",
"type": ["boolean", "null"]
},
"progressInterval": {
"description": "Does not report progress updates more often than this interval in miliseconds (500ms by default). Not aplied in terminals supporting line editing.",
"type": "integer",
"default": 500
}
}
}
}
}