-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-spec.toml
More file actions
71 lines (67 loc) · 2.58 KB
/
example-spec.toml
File metadata and controls
71 lines (67 loc) · 2.58 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
# This uses the ConfigObj spec format with one key difference:
# the '__' symbol is used as a delimiter for special formatting of
# entries with ZenConfig. Options can also be wrapped in quotes
# to be more standard-compliant and pre processed with ZenConfig.
#
# The valid options are:
#
# Section options:
# __title (str): Name of the table that will be printed. Also used intuitively by
# other options like __type.
# __header (list): Adds a header. Should contain up to 3 list items for column names.
# __type (str): How the entries in the section are interpreted:
# variable: Searches the config section for values to show instead.
# list_keys: Merges all config keys into one entry.
# list_values: Merges all values from associated config to one entry.
# list_all: Merges both keys and values: 'key1 (value1), key2, (value2)'
# __wrap (int): (__type only) Wraps value entries every provided number of items.
# __parent (section): dot notated path of another section to merge the table into.
# __spacer (bool): Adds a blank line before showing the child data if __parent is provided.
# __ignore (bool): Whether to completely ignore handling tables for the section.
# __toggle (str): Point to any boolean option in a dot-notated path that
# acts as __ignore if false.
#
# Per-item options:
# {option}__title (str): Pretty name to use in place of the technical one.
# {option}__note (str): Optional third column entry.
# {option}__ignore (str): Same as for sections but per-option.
[info]
__title = "General Info"
name = "string(default='termaconfig')"
name__title = "Name"
description = "string(default='Default configuration settings.')"
description__title = "Description"
[basic]
__title = "Basic Config"
__header = "'Option', 'Value'"
enabled = "boolean(default=true)"
enabled__ignore = true
option1 = "list(default=list('lemon', 'lime', 'orange', 'grapefruit'))"
option1__title = "Option 1"
option2 = "string(default=default_value)"
option2__title = "Option 2"
[[other]]
__parent = "basic"
__title = "Secondary settings:"
__toggle = "basic.enabled"
port = "integer(min=1024, default=1234)"
port__title = "Port"
ip = "ip_addr"
ip__title = "Address"
[advanced]
__title = "Advanced Config"
__header = "'Option, 'Value', 'Note'"
enabled = "boolean(default=false)"
enabled__title = "Enabled"
[[items]]
__type = "list_values"
__title = "Items"
__wrap = 2
__note = "You can also add notes\nto various entries!"
__parent = "advanced"
[ignored_section]
__ignore = true
__title = "Dont show this section!"
enabled = "boolean(default=true)"
enabled__title = "Enable section 2"
hidden_key = "integer(min=0, max=100, default=42)"