pupate

No description provided
git clone https://git.woozle.org/neale/pupate.git

pupate / variants / moth4 / puzzle
Neale Pickett  ·  2025-03-31

puzzle.json

 1{{- define "list" -}}
 2[
 3  {{- range $i, $name := . -}}
 4    {{- if $i}},{{end -}}
 5      {{- $name | json -}}
 6  {{- end -}}
 7]
 8{{- end -}}
 9
10{{- define "contentQuestion" -}}
11bloop bloop bloop
12{{- end -}}
13
14{{- define "ur mom" -}}
15{{- with .Question}}
16
17{{.}}
18{{- end}}
19{{- end -}}
20
21{
22  "Title": {{.Title | json}},
23  "Authors": {{template "list" .Authors}},
24  "Attachments": {{template "list" .Attachments}},
25  "Scripts": {{template "list" .Scripts}},
26  "KSAs": {{template "list" .KSAs}},
27  "AnswerHashes": {{template "list" .AnswerHashes}},
28  {{with .Objectives}}"Objective": {{index . 0 | json}},{{end}}
29  {{with .AnswerPattern}}"AnswerPattern": {{. | json}},{{end}}
30  "Success": { {{with .Success}}
31    "Acceptable": {{.Acceptable | json}},
32    "Mastery": {{.Mastery | json}}
33  {{end}} },
34{{if .Config.Unsafe}}
35  "Answers": {{template "list" .Answers}},
36  "Debug": { {{with .Debug}}
37    "Log": {{template "list" .Log}},
38    "Hints": {{template "list" .Hints}},
39    "Notes": {{template "list" .Notes}},
40    "Summary": {{.Summary | json}}
41  {{end}} },
42{{end}}
43  "Extra": {{.Params | json}},
44  "Body": {{print (eval "contentQuestion" .) "\n" (or .Question "") |  markdownify | json}}
45}