From e039783e67d2773b73963a7a30b338ac5b9f8130 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sat, 12 Aug 2023 18:16:06 +0100 Subject: [PATCH] exclude outputs from doc --- doc/parse-options.fnl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/parse-options.fnl b/doc/parse-options.fnl index 77b329d..84beb07 100644 --- a/doc/parse-options.fnl +++ b/doc/parse-options.fnl @@ -67,9 +67,16 @@ (each [_ param (ipairs o.parameters)] (print-option param 4))) +(fn output? [option] + (match option.loc + ["system" "outputs" & _] true + _ false)) + (fn sort-options [module] - (table.sort module (fn [a b] (< a.name b.name))) - module) + (let [options (icollect [_ o (ipairs module)] + (if (not (output? o)) + o))] + (doto options (table.sort (fn [a b] (< a.name b.name)))))) (let [raw (yaml.load (io.read "*a")) modules {}]