-
Notifications
You must be signed in to change notification settings - Fork 0
/
document.json
369 lines (369 loc) · 15.1 KB
/
document.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "AUAUST-TOOLS-InDesign-Schemas-Document",
"title": "AUAUST TOOLS — InDesign — Document schema",
"description": "A .aajson file formatted as JSON containing the settings for a generated InDesign document.",
"type": "object",
"additionalProperties": false,
"definitions": {
"unit": {
"anyOf": [
{
"type": "number",
"description": "When set to a number without an unit, the unit used is the one set in the general `document.aajson` config. If it isn't there, it fallbacks to `um`."
},
{
"type": "string",
"pattern": "^-?[0-9]+(?:\\.[0-9]+)?(?:pt|mm|cm|in|i|um|)$"
}
]
},
"renderingIntents": {
"anyOf": [
{
"const": "ABSOLUTE_COLORIMETRIC",
"description": "Maintains color accuracy at the expense of preserving relationships between colors; most suitable for previewing how paper color affects printed colors."
},
{
"const": "PERCEPTUAL",
"description": "Preserves the visual relationship between colors at the expense of actual color values; most suitable for photographic images with high percentages of out-of-gamut colors."
},
{
"const": "RELATIVE_COLORIMETRIC",
"description": "Compares the extreme highlight of the source color space to that of the desination color space and shifts all colors accordingly; out-of-gamut colors are shifted to the closest reproducible color in the destination color space."
},
{
"const": "SATURATION",
"description": "Produces vivid colors at the expense of color accuracy; most suitable for business graphics such as graphs or charts."
},
{
"const": "USE_COLOR_SETTINGS",
"description": "Uses the current color settings."
}
]
},
"id": { "type": "string", "pattern": "^[a-zA-Z0-9_.-]+$" }
},
"properties": {
"file": {
"type": "object",
"description": "The file settings.",
"additionalProperties": false,
"required": ["project"],
"properties": {
"name": {
"type": "string",
"markdownDescription": "The name of the generated InDesign document. Used for the file name and the metadata title. \n\nA few useful placeholders are available, such as: \n`{project}` (the project name specified in the `file.project` key), `{script}` (the script name, which is probably 'GENERATE'), and dates such as `{YYYY}`, `{YY}`, `{MM}`, `{mm}`, `{ss}` etc. \n\n__Note__: Do not include the file extension."
},
"project": {
"type": "string",
"minLength": 1,
"description": "The project name. Is used to determine the value of the {project} placeholder.\n\nUpper case letters are recoomended."
},
"intent": {
"type": "string",
"markdownDescription": "The final intent of the document. \nEither it's for `WEB`, `MOBILE` or `PRINT`.",
"enum": ["WEB", "MOBILE", "PRINT"]
},
"save": {
"type": "boolean",
"markdownDescription": "Whether or not to save the generated InDesign document automatically. \n\n__Note__: The main change is that you won't be prompted to select a folder twice, but you'll need to save the file later.",
"default": true
},
"debug": {
"type": "boolean",
"markdownDescription": "Whether or not to show debug information. \n\n__Note__: Setting it to false disables all feedbacks, including helpful information. There's very little reason to set it to false.",
"default": true
},
"colors": {
"type": "object",
"description": "The colors management settings.",
"additionalProperties": false,
"properties": {
"transparency": {
"type": "string",
"markdownDescription": "The color mode for handling transparencies. \nEither it's `CMYK` or `RGB`.",
"enum": ["CMYK", "RGB"]
},
"profiles": {
"type": "object",
"description": "The color profiles settings.",
"additionalProperties": false,
"properties": {
"CMYK": {
"type": "string",
"markdownDescription": "The CMYK color profile to use. \nYou can use the wildcard `*` to allow any character(s) at that place, if you don't know the exact name. \n\n__Note__: The color profile must be installed on the system."
},
"RGB": {
"type": "string",
"markdownDescription": "The RGB color profile to use. \nYou can use the wildcard `*` to allow any character(s) at that place, if you don't know the exact name. \n\n__Note__: The color profile must be installed on the system."
}
}
},
"policies": {
"type": "object",
"description": "The color policies settings.",
"additionalProperties": false,
"properties": {
"CMYK": {
"description": "The CMYK color policies settings. \nThey describe how imported and embedded colors should be handled, when using images for exemple.",
"anyOf": [
{
"const": "OFF",
"description": "Turns off color management for documents whose profiles do not match the working space. For imported colors, numeric values override color appearance."
},
{
"const": "PRESERVE_AND_SAFE_CMYK",
"description": "Preserves raw color numbers and ignores embedded color profiles."
},
{
"const": "CONVERT_TO_WORKING_SPACE",
"description": "Converts newly opened documents to the current working space. For imported colors, color appearance overrides numeric values."
},
{
"const": "PRESERVE_EMBEDDED_PROFILES",
"description": "Preserves embedded color profiles in newly opened documents."
}
]
},
"RGB": {
"description": "The RGB color policies settings. \nThey describe how imported and embedded colors should be handled, when using images for exemple.",
"anyOf": [
{
"const": "OFF",
"description": "Turns off color management for documents whose profiles do not match the working space. For imported colors, numeric values override color appearance."
},
{
"const": "PRESERVE_AND_SAFE_RGB",
"description": "Preserves raw color numbers and ignores embedded color profiles."
},
{
"const": "CONVERT_TO_WORKING_SPACE",
"description": "Converts newly opened documents to the current working space. For imported colors, color appearance overrides numeric values."
},
{
"const": "PRESERVE_EMBEDDED_PROFILES",
"description": "Preserves embedded color profiles in newly opened documents."
}
]
}
}
},
"intents": {
"type": "object",
"description": "The color intents settings.",
"additionalProperties": false,
"properties": {
"afterBlending": {
"description": "The rendering intent for colors that result from transparency interactions on the page after blending.",
"$ref": "#/definitions/renderingIntents"
},
"images": {
"description": "The rendering intent for bitmap (non-vector) images.",
"$ref": "#/definitions/renderingIntents"
},
"vector": {
"description": "The rendering intent for all vector art (areas of solid color) in native objects.",
"$ref": "#/definitions/renderingIntents"
}
}
}
}
}
}
},
"document": {
"type": "object",
"description": "The document's overall layout settings.",
"additionalProperties": false,
"properties": {
"language": {
"type": "string",
"definition": "The document's language, used for hyphenation and other language-specific features if not otherwise specified (for exemple in paragraph styles).",
"$ref": "https://raw.githubusercontent.com/AUAUST/tools-indesign-schemas/main/styles.json#/definitions/language"
},
"defaultUnit": {
"type": "string",
"markdownDescription": "The default unit to use for measurements. \nEither it's `POINTS`, `MM`, `CM`, `INCHES`, or, obviously, `UM`. \n\nIt is used for unit set a numbers, but can easily be overridden in specific places by specifying the unit in the string.",
"enum": [
"mm",
"millimeters",
"cm",
"centimeters",
"points",
"pt",
"inches",
"i",
"in",
"um",
"unité minimale",
"MM",
"CM",
"POINTS",
"PT",
"INCHES",
"I",
"IN",
"UM"
]
},
"pages": {
"type": "object",
"description": "The document's pages settings.",
"additionalProperties": false,
"properties": {
"facing": {
"type": "boolean",
"description": "If true, the document has facing pages."
},
"from": {
"type": "integer",
"description": "The starting page number for a document. This is the same as the starting page number for the first section of a document.",
"default": 1,
"minimum": 1,
"maximum": 999999
},
"count": {
"type": "integer",
"description": "The number of pages in the document.",
"default": 1,
"minimum": 1,
"maximum": 9999
}
}
},
"dimensions": {
"type": "object",
"description": "The document's dimensions settings.",
"additionalProperties": false,
"properties": {
"width": {
"definition": "The document's width.",
"$ref": "#/definitions/unit"
},
"height": {
"definition": "The document's height.",
"$ref": "#/definitions/unit"
}
}
},
"margins": {
"type": "object",
"description": "The document's margins settings.",
"additionalProperties": false,
"properties": {
"top": {
"description": "The document's top margin.",
"$ref": "#/definitions/unit"
},
"inner": {
"description": "The document's inner margin, or left margin if it hasn't facing pages.",
"$ref": "#/definitions/unit"
},
"outer": {
"description": "The document's outer margin, or right margin if it hasn't facing pages.",
"$ref": "#/definitions/unit"
},
"bottom": {
"description": "The document's bottom margin.",
"$ref": "#/definitions/unit"
}
}
},
"bleed": {
"type": "object",
"description": "The document's bleed settings.",
"additionalProperties": false,
"properties": {
"top": {
"description": "The document's top bleed.",
"$ref": "#/definitions/unit"
},
"inner": {
"description": "The document's left bleed, or inner bleed if it has facing pages.",
"$ref": "#/definitions/unit"
},
"outer": {
"description": "The document's right bleed, or outer bleed if it has facing pages.",
"$ref": "#/definitions/unit"
},
"bottom": {
"description": "The document's bottom bleed.",
"$ref": "#/definitions/unit"
}
}
},
"grid": {
"type": "object",
"description": "The document's grid settings, including baseline grid, columns and gutters.",
"additionalProperties": false,
"properties": {
"columns": {
"type": "integer",
"description": "The number of columns in the document.",
"default": 1,
"minimum": 1,
"maximum": 216
},
"gutter": {
"description": "The document's gutter.",
"$ref": "#/definitions/unit"
},
"visible": {
"type": "boolean",
"description": "If true, the document's baseline grid is visible.",
"default": false
},
"startAt": {
"type": "integer",
"description": "The amount to offset the baseline grid from the zero point.",
"default": 1,
"minimum": 1,
"maximum": 216
},
"relativeTo": {
"description": "The zero point for the baseline grid offset.",
"anyOf": [
{
"const": "MARGIN",
"description": "The baseline grid offset zero point is at the top page margin."
},
{
"const": "PAGE",
"description": "The baseline grid offset zero point is at the top of the page."
}
]
},
"lineHeight": {
"description": "The amount of space between baseline grid lines.",
"$ref": "#/definitions/unit"
},
"color": {
"description": "The color of the baseline grid.",
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"minItems": 3,
"maxItems": 3
},
"threshold": {
"type": "integer",
"description": "The magnification (as a percentage of the document view) less than which ruler guides do not appear.",
"default": 75,
"minimum": 5,
"maximum": 4000
},
"snapTo": {
"type": "boolean",
"description": "If true, an object snaps to the nearest grid line when the object is created, moved, or resized.",
"default": false
}
}
}
}
}
}
}