lix/doc/manual/generate-options.jq

12 lines
422 B
Plaintext
Raw Normal View History

. | to_entries | sort_by(.key) | map(
2020-08-19 16:30:17 +00:00
" - `" + .key + "` \n\n"
+ (.value.description | split("\n") | map(" " + . + "\n") | join("")) + "\n\n"
+ " **Default**: " + (
if .value.value == "" or .value.value == []
then "*empty*"
elif (.value.value | type) == "array"
then "`" + (.value.value | join(" ")) + "`"
else "`" + (.value.value | tostring) + "`" end)
+ "\n\n"
) | join("")