Skip to content

Commit 2aec3f6

Browse files
./generate: Change setting to taste
Changes setting to taste, because taste is more appropriate here.
1 parent 9e29742 commit 2aec3f6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

generate

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,36 +107,36 @@ def recurse(aspect, level=0):
107107
output += "=" * len(subaspect_name) + "\n"
108108
output += subaspect.docs.definition + "\n\n"
109109

110-
if subaspect.settings:
111-
output += "Settings\n"
110+
if subaspect.tastes:
111+
output += "Tastes\n"
112112
output += "========\n\n"
113113
par = OrderedDict()
114114
lmax = -1
115115
cmax = -1
116116
rmax = -1
117117
par = {}
118118
var = {}
119-
for setting in subaspect.settings:
120-
key = "``" + setting.name + "``"
121-
par[key] = text_wrap(setting.description, limit=60)
119+
for taste_name, taste in subaspect.tastes.items():
120+
key = "``" + taste_name + "``"
121+
par[key] = text_wrap(taste.description, limit=60)
122122
par[key] = [g.strip() for g in par[key]]
123-
var[key] = "**" + str(setting.default) + "**"
124-
if len(setting.suggested_values) > 1:
123+
var[key] = "**" + str(taste.default) + "**"
124+
if len(taste.suggested_values) > 1:
125125
var[key] += ", "
126-
var[key] += ", ".join([str(x) for x in setting.suggested_values if x != setting.default])
126+
var[key] += ", ".join([str(x) for x in taste.suggested_values if x != taste.default])
127127
lmax = max(lmax, len(key))
128128
cmax = max(cmax, max(len(g) for g in par[key]))
129129
rmax = max(rmax, len(var[key]))
130130

131131
if len(par):
132-
lmax = max(lmax, len(" Setting"))
132+
lmax = max(lmax, len(" Taste"))
133133
cmax = max(cmax, len("Meaning"))
134134
rmax = max(cmax, len("Values"))
135135
header = False
136136
for key in sorted(par):
137137
if not header:
138138
output += "+" + "-" * (lmax) + "-+-" + "-" * (cmax) + "-+-" + "-" * (1 + rmax) + "+\n"
139-
output += "| Setting" + " " * (lmax - len(" Setting")) + " | Meaning" + " " * (cmax - 1 - len("Meaning")) + " | Values" + " " * (cmax - len("Values")) + "|\n"
139+
output += "| Taste" + " " * (lmax - len(" Taste")) + " | Meaning" + " " * (cmax - 1 - len("Meaning")) + " | Values" + " " * (cmax - len("Values")) + "|\n"
140140
output += "+" + "=" * lmax + "=+=" + "=" * (cmax) + "=+=" + "=" * (1 + rmax) + "+\n"
141141
header = True
142142
output += "| " + " " * lmax + "| " + " " * (1 + cmax) + "| " + " " * (1 + rmax) + "|\n"

0 commit comments

Comments
 (0)