-
Notifications
You must be signed in to change notification settings - Fork 9
/
json-schema.json
352 lines (352 loc) · 11.3 KB
/
json-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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"description": "Title of the presentation",
"type": "string"
},
"presenter": {
"description": "Name of the presenter / author",
"type": "string"
},
"date": {
"description": "Date of the event",
"type": "string"
},
"conference": {
"description": "Conference name",
"type": "string"
},
"company": {
"description": "Company / Organization",
"type": "string"
},
"location": {
"description": "Event location",
"type": "string"
},
"twitter": {
"type": "object",
"description": "Twitter information about the presenter and event",
"properties": {
"presenter": {
"description": "Twitter handle of the presenter",
"type": "string"
},
"event": {
"description": "Twitter hashtag for the event",
"type": "string"
}
},
"required": ["presenter", "event"]
},
"frame": {
"type": "object",
"description": "Information shown around the frame for all slides",
"properties": {
"top": {
"description": "Information displayed at the top",
"type": "object",
"properties": {
"center": {
"type": "string",
"description": "Text displayed at the center top"
}
},
"default": {
"center": ""
},
"required": ["center"]
},
"bottom": {
"description": "Information displayed at the bottom. These can be references to other keys",
"type": "object",
"properties": {
"left": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "Text displayed at the bottom left corner"
},
"center": {
"type": "string",
"description": "Text disabled at the bottom center"
}
},
"default": {
"left": ["twitter.presenter", "twitter.event"],
"center": "company"
},
"required": ["left", "center"]
}
},
"required": ["top", "bottom"]
},
"slides": {
"type": "array",
"description": "The slides that should be rendered",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["code", "diagram", "list", "simple", "speaking", "split", "terminal", "title", "titleOnly"],
"description": "The type of slide"
}
},
"allOf": [
{
"if": { "properties": { "type": { "const": "code" } } },
"then": { "$ref": "#/definitions/codeSlide" }
},
{
"if": { "properties": { "type": { "const": "diagram" } } },
"then": { "$ref": "#/definitions/diagramSlide" }
},
{
"if": { "properties": { "type": { "const": "list" } } },
"then": { "$ref": "#/definitions/listSlide" }
},
{
"if": { "properties": { "type": { "const": "simple" } } },
"then": { "$ref": "#/definitions/simpleSlide" }
},
{
"if": { "properties": { "type": { "const": "speaking" } } },
"then": { "$ref": "#/definitions/speakingSlide" }
},
{
"if": { "properties": { "type": { "const": "split" } } },
"then": { "$ref": "#/definitions/splitSlide" }
},
{
"if": { "properties": { "type": { "const": "terminal" } } },
"then": { "$ref": "#/definitions/terminalSlide" }
},
{
"if": { "properties": { "type": { "const": "title" } } },
"then": { "$ref": "#/definitions/titleSlide" }
},
{
"if": { "properties": { "type": { "const": "titleOnly" } } },
"then": { "$ref": "#/definitions/titleOnlySlide" }
}
],
"required": ["type"]
}
}
},
"required": ["title", "presenter", "date", "conference", "location", "company", "twitter", "slides"],
"definitions": {
"codeSlide": {
"description": "A slide template to display code. Code can be displayed as a whole, line by line, or one highlighted section at a time.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title of this slide"
},
"multistep": {
"type": "boolean",
"default": false,
"description": "Whether this slide should show its content in multiple steps, advancing a step every time the enter key is pressed."
},
"multistepType": {
"type": "string",
"default": "highlight",
"enum": ["line", "highlight"],
"description": "Has no use when \"multistep\" is false. Determines if code should be highlighted per step, or all together. Recommended to use \"line\" when \"code\" is an array of strings, and \"highlight\" when \"code\" is a single \"string\""
},
"text": {
"type": "string",
"default": "",
"description": "Description of the code snippet, displayed over the box"
},
"code": {
"description": "The code snippet to be displayed in a code block. Use an array to display multiple lines of code.",
"oneOf": [
{
"type": "string",
"default": "",
"description": "The code snippet to be displayed, will be enclosed in a box."
},
{
"type": "array",
"items": {
"type": "string"
},
"default": [""],
"description": "The code snippet to be displayed, will be enclosed in a box and be shown in multiple lines."
}
]
},
"notes": {
"type": "string",
"default": "",
"description": "Adds some notes at the bottom of the slide."
}
},
"required": ["title", "text", "code"]
},
"diagramSlide": {
"description": "Used to display some text on the left side and some ASCII art on the right side. The ASCII art is down to you though, there are none provided by `cli-slides`.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title to be displayed on the left side of the slide."
},
"diagram": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "An array of strings to be displayed on the right side"
}
},
"required": ["title", "diagram"]
},
"listSlide": {
"description": "A list of items. Items can be displayed at once or one at a time.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title of this slide"
},
"list": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "The items in the list to be shown"
}
},
"required": ["title", "list"]
},
"simpleSlide": {
"description": "A simple slide with a title and some text.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title of this slide"
},
"text": {
"type": "string",
"default": "",
"description": "Some text to be displayed. Text will be centered and wraps automatically. Supports multiple lines with a newline escape (\n)."
}
},
"required": ["title", "text"]
},
"speakingSlide": {
"description": "Shows a fun little ASCII character and some text in a bubble.",
"properties": {
"character": {
"type": "string",
"enum": ["over-cubbie", "me", "me-oh-no", "silly-face", "scream"],
"title": "The preset ASCII character to display",
"description": "- over-cubbie: Someone looking over a wall\n- me: A man smiling\n- me-oh-no: Same as me, with closed eyes and an open mouth\n- silly-face: A face with confused look\n- scream: The scream emoji converted to ASCII art"
},
"text": {
"type": "string",
"default": "",
"description": "Text to be displayed in the speech bubble"
}
},
"required": ["character", "text"]
},
"splitSlide": {
"description": "If you need a 2 column template, you can use this one. For now, it's restricted to a list on the left side and some text on the right side.",
"properties": {
"left": {
"description": "Components on the left side of this slide",
"type": "object",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "Title to be displayed on the left"
},
"list": {
"type": "array",
"items": {
"type": "string"
},
"default": [""],
"description": "Array of items to be displayed on the left"
}
},
"required": ["title", "list"],
"default": {
"title": "",
"list": [""]
}
},
"right": {
"description": "Components on the right side of this slide",
"type": "object",
"properties": {
"text": {
"type": "array",
"items": {
"type": "string"
},
"description": "Text to be displayed on the right side"
}
},
"required": ["text"],
"default": {
"text": [""]
}
}
},
"required": ["left", "right"]
},
"terminalSlide": {
"title": "The famous terminal-in-a-terminal!",
"description": "Note: The terminal does not support interactive commands and will only display the final stdout",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title of this slide"
},
"text": {
"type": "string",
"default": "",
"description": "Text displayed over the terminal"
}
},
"required": ["title"]
},
"titleSlide": {
"description": "Used typically as a presentation title. Will convert the text into ASCII art.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title to be displayed on this slide. Converted into ASCII art. Letters only."
}
},
"required": ["title"]
},
"titleOnlySlide": {
"description": "Just a title slide, typically used as a section separator.",
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The title to be displayed on this slide."
}
},
"required": ["title"]
}
}
}