2023-11-09 23:12:29 +01:00
|
|
|
(local yaml (require :lyaml))
|
|
|
|
|
|
|
|
;; (local { : view } (require :fennel))
|
|
|
|
|
2023-11-12 18:15:58 +01:00
|
|
|
(fn output? [option]
|
|
|
|
(match option.loc
|
|
|
|
["system" "outputs" & _] true
|
|
|
|
_ false))
|
2023-11-09 23:12:29 +01:00
|
|
|
|
2023-11-12 18:15:58 +01:00
|
|
|
(fn sorted-options [options]
|
|
|
|
(table.sort
|
|
|
|
options
|
|
|
|
(fn [a b] (< a.name b.name)))
|
|
|
|
options)
|
|
|
|
|
|
|
|
(each [_ option (ipairs (sorted-options (yaml.load (io.read "*a"))))]
|
|
|
|
(when (and (output? option) (not option.internal))
|
2023-11-10 00:02:35 +01:00
|
|
|
(print (.. ".. _" (string.gsub option.name "%." "-") ":") "\n")
|
2023-11-09 23:12:29 +01:00
|
|
|
(print option.description)))
|