-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapp_metadata.tcl
352 lines (350 loc) · 7.7 KB
/
app_metadata.tcl
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
proc init_app_metadata {} {
# Define the properties to be used in the app data dictionary
metadata dictionary add domain [list validate_category {shot profile}]
metadata dictionary add category validate_nonempty_string
metadata dictionary add section validate_nonempty_string
metadata dictionary add subsection validate_nonempty_string
metadata dictionary add source [list validate_category {app user calc}]
metadata dictionary add owner_type [list validate_category {base skin plugin}]
metadata dictionary add owner
metadata dictionary add name validate_nonempty_string
metadata dictionary add name_plural validate_nonempty_string
metadata dictionary add short_name validate_nonempty_string
metadata dictionary add short_name_plural validate_nonempty_string
metadata dictionary add description
metadata dictionary add propagate validate_boolean
metadata dictionary add data_type [list validate_category {text long_text category number boolean date}]
metadata dictionary add required boolean
metadata dictionary add length validate_length
metadata dictionary add valid_values
metadata dictionary add min [list string is double]
metadata dictionary add max [list string is double]
metadata dictionary add default
metadata dictionary add smallincrement [list string is double]
metadata dictionary add bigincrement [list string is double]
metadata dictionary add n_decimals [list string is integer]
metadata dictionary add measure_unit
metadata dictionary add default_dui_widget [list validate_category {entry text listbox dcombobox dcheckbox drater dclicker}]
# Define the actual fields
metadata add profile_title end {
domain {profile shot}
source app
owner_type base
name "Profile title"
name_plural "Profile titles"
short_name "Profile"
short_name_plural "Profiles"
propagate 0
data_type category
required 1
length 1
default_dui_widget dcombobox
}
metadata add bean_brand end {
domain shot
category description
section beans
subsection beans_desc
source user
owner_type base
name "Beans roaster"
name_plural "Beans roaster"
short_name "Roaster"
short_name_plural "Roasters"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add bean_type end {
domain shot
category description
section beans
subsection beans_desc
source user
owner_type base
name "Beans type"
name_plural "Beans type"
short_name "Beans"
short_name_plural "Beans"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add roast_date end {
domain shot
category description
section beans
subsection beans_batch
source user
owner_type base
name "Roast date"
name_plural "Roast dates"
short_name "Roasted"
short_name_plural "Roasted"
propagate 1
data_type text
required 0
length 1
default_dui_widget entry
}
metadata add roast_level end {
domain shot
category description
section beans
subsection beans_batch
source user
owner_type base
name "Roast level"
name_plural "Roast levels"
short_name "Roast lvl"
short_name_plural "Roast lvls"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add bean_notes end {
domain shot
category description
section beans
subsection beans_batch
source user
owner_type base
name "Beans notes"
name_plural "Beans notes"
short_name "Notes"
short_name_plural "Notes"
propagate 1
data_type long_text
required 0
length 1
default_dui_widget text
}
metadata add grinder_model end {
domain shot
category description
section equipment
subsection grinder
source user
owner_type base
name "Grinder model"
name_plural "Grinder models"
short_name "Grinder"
short_name_plural "Grinders"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add grinder_setting end {
domain shot
category description
section equipment
subsection grinder
owner_type base
source user
name "Grinder setting"
name_plural "Grinder settings"
short_name "Grinder set"
short_name_plural "Grinder sets"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add grinder_dose_weight end {
domain shot
category description
section extraction
subsection ""
source user
owner_type base
name "Dose weight"
name_plural "Dose weights"
short_name "Dose"
short_name_plural "Doses"
propagate 1
data_type number
min 0.0
max 30.0
default 18.0
smallincrement 0.1
bigincrement 1.0
n_decimals 1
measure_unit g
required 0
length 1
default_dui_widget dclicker
}
metadata add drink_weight end {
domain shot
category description
section extraction
subsection drink
source user
owner_type base
name "Drink weight"
name_plural "Drink weights"
short_name "Yield"
short_name_plural "Yields"
propagate 0
data_type number
min 0.0
max 500.0
default 36.0
smallincrement 1.0
bigincrement 10.0
n_decimals 1
measure_unit g
required 0
length 1
default_dui_widget dclicker
}
metadata add drink_tds end {
domain shot
category description
section extraction
subsection drink
source user
owner_type base
name "Total Dissolved Solids"
name_plural "Total Dissolved Solids"
short_name "TDS"
short_name_plural "TDS"
propagate 0
data_type number
min 0.0
max 25.0
default 8.0
smallincrement 0.01
bigincrement 0.1
n_decimals 2
measure_unit %
required 0
length 1
default_dui_widget dclicker
}
metadata add drink_ey end {
domain shot
category description
section extraction
subsection drink
source user
owner_type base
name "Extraction Yield"
name_plural "Extraction Yields"
short_name "EY"
short_name_plural "EY"
propagate 0
data_type number
min 0.0
max 30.0
default 18.0
smallincrement 0.01
bigincrement 0.1
n_decimals 2
measure_unit %
required 0
length 1
default_dui_widget dclicker
}
metadata add espresso_notes end {
domain shot
category description
section extraction
subsection tasting
source user
owner_type base
name "Espresso note"
name_plural "Espresso notes"
short_name "Note"
short_name_plural "Notes"
propagate 0
data_type long_text
required 0
length 1
default_dui_widget text
}
metadata add espresso_enjoyment end {
domain shot
category description
section tasting
subsection ""
source user
owner_type base
name "Enjoyment (0-100)"
name_plural "Enjoyment"
short_name "Enjoyment"
short_name_plural "Enjoyment"
propagate 0
data_type number
min 0
max 100
default 50
smallincrement 1
bigincrement 10
n_decimals 0
required 0
length 1
default_dui_widget drater
}
metadata add scentone end {
domain shot
category description
section tasting
subsection ""
source user
owner_type base
name "Scentone flavours"
name_plural "Scentone flavours"
short_name "Scentone"
short_name_plural "Scentone"
propagate 0
data_type complex
required 0
length list
default_dui_widget {}
}
metadata add my_name end {
domain shot
category description
section people
subsection ""
source user
owner_type base
name "Barista"
name_plural "Baristas"
short_name "Barista"
short_name_plural "Baristas"
propagate 1
data_type category
required 0
length 1
default_dui_widget dcombobox
}
metadata add beverage_type end {
domain profile
category machine?
section drink
subsection ""
source user
owner_type base
name "Beverage type"
name_plural "Beverage types"
short_name "Bev. type"
short_name_plural "Bev. types"
propagate 0
data_type category
values {espresso tea_portafilter cleaning calibrate}
required 1
length 1
default_dui_widget dcombobox
}
}