#!/usr/bin/guile !# (use-modules (sph) (sph documentation) (sph alist) (sph list) (sph module binding-info) (sph module) (sph lang scheme) (sph string)) (define (list-modules root) (let* ( (highlights (file->datums "other/highlights")) (module-names (list-sort (l (a b) (stringstring a) (any->string b))) (pair (quote (sph)) (map first (module-find "modules/sph" #:load-path (quote ("modules"))))))) (highlight-module-names (filter (l (a) (contains? highlights a)) module-names)) (other-module-names (difference module-names highlight-module-names))) (display-line "# modules\n## highlights") (display-line (string-join (format-module-documentation highlight-module-names output-format-markdown-overview) "\n")) (display-line "## other") (display-line (string-join (format-module-documentation other-module-names output-format-markdown-overview) "\n")))) (list-modules (getcwd))