Back
summarize (clj)
(source)function
(summarize specs)
Reduce options specs into a options summary for printing at a terminal.
Note that the specs argument should be the compiled version. That effectively
means that you shouldn't call summarize directly. When you call parse-opts
you get back a :summary key which is the result of calling summarize (or
your user-supplied :summary-fn option) on the compiled option specs.
Examples
babashka/babashka
(ns babashka.impl.tools.cli
{:no-doc true}
(:require [clojure.tools.cli :as tools.cli]
[sci.core :as sci :refer [copy-var]]))
(def tools-cli-namespace
{'format-lines (copy-var tools.cli/format-lines cli-ns)
'summarize (copy-var tools.cli/summarize cli-ns)
'get-default-options (copy-var tools.cli/get-default-options cli-ns)
'parse-opts (copy-var tools.cli/parse-opts cli-ns)
'make-summary-part (copy-var tools.cli/make-summary-part cli-ns)})
retrogradeorbit/bootleg
(ns bootleg.namespaces
(:require [bootleg.utils :as utils]
[bootleg.enlive :as enlive]
[bootleg.selmer :as selmer]
[bootleg.markdown :as markdown]
[bootleg.mustache :as mustache]
[bootleg.asciidoc :as asciidoc]
[bootleg.html :as html]
[bootleg.yaml :as yaml]
[bootleg.json :as json]
[bootleg.edn :as edn]
[bootleg.glob :as glob]
[bootleg.file :as file]
[bootleg.minify :as minify]
[hickory.convert]
[hickory.hiccup-utils]
[hickory.render]
[hickory.select]
[hickory.utils]
[hickory.zip]
[net.cgrand.enlive-html :as enlive-html]
[net.cgrand.jsoup]
[net.cgrand.reload]
[net.cgrand.tagsoup]
[net.cgrand.xml]
[selmer.filter-parser]
[selmer.filters]
[selmer.middleware]
[selmer.node]
[selmer.parser]
[selmer.tags]
[selmer.template-parser]
[selmer.util]
[selmer.validator]
[edamame.core :refer [parse-string]]
[sci.core :as sci]
[clojure.walk]
[clojure.zip]
[clojure.tools.cli]
))
'clojure.tools.cli {
'cli clojure.tools.cli/cli
'make-summary-part clojure.tools.cli/make-summary-part
'format-lines clojure.tools.cli/format-lines
'summarize clojure.tools.cli/summarize
'get-default-options clojure.tools.cli/get-default-options
'parse-opts clojure.tools.cli/parse-opts
}