CLJS
basic-lein-cljs.core
cljs.analyzer
cljs.compiler
CLJS
cljs.core
CLJS
cljs.core.async
CLJS
cljs.core.async.impl.buffers
CLJS
cljs.core.async.impl.channels
CLJS
cljs.core.async.impl.dispatch
CLJS
cljs.core.async.impl.ioc-helpers
CLJS
cljs.core.async.impl.protocols
CLJS
cljs.core.async.impl.timers
cljs.env
cljs.externs
CLJS
cljs.js
cljs.js-deps
CLJS
cljs.pprint
CLJS
cljs.reader
CLJS
cljs.repl
cljs.source-map
CLJS
cljs.source-map
cljs.source-map.base64
CLJS
cljs.source-map.base64
cljs.source-map.base64-vlq
CLJS
cljs.source-map.base64-vlq
CLJS
cljs.spec.alpha
CLJS
cljs.spec.gen.alpha
cljs.tagged-literals
CLJS
cljs.tools.reader
CLJS
cljs.tools.reader.edn
CLJS
cljs.tools.reader.impl.commons
CLJS
cljs.tools.reader.impl.errors
CLJS
cljs.tools.reader.impl.inspect
CLJS
cljs.tools.reader.impl.utils
CLJS
cljs.tools.reader.reader-types
cljs.util
clojure.core
clojure.core.async
clojure.core.async.impl.buffers
clojure.core.async.impl.channels
clojure.core.async.impl.concurrent
clojure.core.async.impl.dispatch
clojure.core.async.impl.exec.threadpool
clojure.core.async.impl.ioc-macros
clojure.core.async.impl.mutex
clojure.core.async.impl.protocols
clojure.core.async.impl.timers
clojure.core.cache
clojure.core.memoize
clojure.core.protocols
clojure.core.server
clojure.data.json
clojure.data.priority-map
clojure.edn
clojure.instant
clojure.java.io
clojure.main
clojure.pprint
clojure.reflect
clojure.repl
clojure.set
CLJS
clojure.set
clojure.spec.alpha
clojure.spec.gen.alpha
clojure.string
CLJS
clojure.string
clojure.tools.analyzer
clojure.tools.analyzer.ast
clojure.tools.analyzer.env
clojure.tools.analyzer.jvm
clojure.tools.analyzer.jvm.utils
clojure.tools.analyzer.passes
clojure.tools.analyzer.passes.add-binding-atom
clojure.tools.analyzer.passes.cleanup
clojure.tools.analyzer.passes.constant-lifter
clojure.tools.analyzer.passes.elide-meta
clojure.tools.analyzer.passes.emit-form
clojure.tools.analyzer.passes.jvm.analyze-host-expr
clojure.tools.analyzer.passes.jvm.annotate-host-info
clojure.tools.analyzer.passes.jvm.annotate-loops
clojure.tools.analyzer.passes.jvm.annotate-tag
clojure.tools.analyzer.passes.jvm.box
clojure.tools.analyzer.passes.jvm.classify-invoke
clojure.tools.analyzer.passes.jvm.constant-lifter
clojure.tools.analyzer.passes.jvm.emit-form
clojure.tools.analyzer.passes.jvm.fix-case-test
clojure.tools.analyzer.passes.jvm.infer-tag
clojure.tools.analyzer.passes.jvm.validate
clojure.tools.analyzer.passes.jvm.validate-loop-locals
clojure.tools.analyzer.passes.jvm.validate-recur
clojure.tools.analyzer.passes.jvm.warn-on-reflection
clojure.tools.analyzer.passes.source-info
clojure.tools.analyzer.passes.trim
clojure.tools.analyzer.passes.uniquify
clojure.tools.analyzer.passes.warn-earmuff
clojure.tools.analyzer.utils
clojure.tools.cli
clojure.tools.namespace.dependency
clojure.tools.namespace.file
clojure.tools.namespace.find
clojure.tools.namespace.parse
clojure.tools.namespace.track
clojure.tools.reader
clojure.tools.reader.default-data-readers
clojure.tools.reader.impl.commons
clojure.tools.reader.impl.errors
clojure.tools.reader.impl.inspect
clojure.tools.reader.impl.utils
clojure.tools.reader.reader-types
clojure.walk
CLJS
clojure.walk
dynadoc.aliases
dynadoc.common
dynadoc.core
CLJS
dynadoc.core
dynadoc.example
CLJS
dynadoc.state
dynadoc.static
dynadoc.utils
dynadoc.watch
eval-soup.clojail
eval-soup.core
CLJS
eval-soup.core
CLJS
figwheel.client
CLJS
figwheel.client.file-reloading
CLJS
figwheel.client.heads-up
CLJS
figwheel.client.socket
CLJS
figwheel.client.utils
hawk.core
hawk.watcher
html-soup.core
ns-tracker.core
ns-tracker.dependency
ns-tracker.nsdeps
ns-tracker.parse
CLJS
oakcljs.tools.reader
CLJS
oakcljs.tools.reader.impl.commons
CLJS
oakcljs.tools.reader.impl.errors
CLJS
oakcljs.tools.reader.impl.inspect
CLJS
oakcljs.tools.reader.impl.utils
CLJS
oakcljs.tools.reader.reader-types
oakclojure.tools.reader
oakclojure.tools.reader.default-data-readers
oakclojure.tools.reader.impl.commons
oakclojure.tools.reader.impl.errors
oakclojure.tools.reader.impl.inspect
oakclojure.tools.reader.impl.utils
oakclojure.tools.reader.reader-types
org.httpkit.server
CLJS
paren-soup.console
CLJS
paren-soup.core
CLJS
paren-soup.dom
CLJS
paren-soup.instarepl
CLJS
reagent.core
CLJS
reagent.debug
CLJS
reagent.dom
CLJS
reagent.impl.batching
CLJS
reagent.impl.component
CLJS
reagent.impl.template
CLJS
reagent.impl.util
CLJS
reagent.ratom
ring.middleware.content-type
ring.middleware.file
ring.middleware.head
ring.middleware.keyword-params
ring.middleware.params
ring.middleware.reload
ring.middleware.resource
ring.util.codec
ring.util.io
ring.util.mime-type
ring.util.parsing
ring.util.request
ring.util.response
ring.util.time
rum.core
CLJS
rum.core
rum.cursor
rum.derived-atom
rum.server-render
rum.util
sablono.compiler
CLJS
sablono.core
sablono.normalize
sablono.util
tag-soup.core

clojure.tools.cli

Tools for working with command line arguments.

(cli args & specs)

THIS IS A LEGACY FUNCTION and may be deprecated in the future. Please use clojure.tools.cli/parse-opts in new applications. Parse the provided args using the given specs. Specs are vectors describing a command line argument. For example: ["-p" "--port" "Port to listen on" :default 3000 :parse-fn #(Integer/parseInt %)] First provide the switches (from least to most specific), then a doc string, and pairs of options. Valid options are :default, :parse-fn, and :flag. See https://github.com/clojure/tools.cli/wiki/Documentation-for-0.2.4 for more detailed examples. Returns a vector containing a map of the parsed arguments, a vector of extra arguments that did not match known switches, and a documentation banner to provide usage instructions.

(format-lines lens parts)

Format a sequence of summary parts into columns. lens is a sequence of lengths to use for parts. There are two sequences of lengths if we are not displaying defaults. There are three sequences of lengths if we are showing defaults.

(get-default-options option-specs)

Extract the map of default options from a sequence of option vectors.

(make-summary-part show-defaults? spec)

Given a single compiled option spec, turn it into a formatted string, optionally with its default values if requested.

(parse-opts args option-specs & options)

Parse arguments sequence according to given option specifications and the GNU Program Argument Syntax Conventions: https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html Option specifications are a sequence of vectors with the following format: [short-opt long-opt-with-required-description description :property value] The first three string parameters in an option spec are positional and optional, and may be nil in order to specify a later parameter. By default, options are toggles that default to nil, but the second string parameter may be used to specify that an option requires an argument. e.g. ["-p" "--port PORT"] specifies that --port requires an argument, of which PORT is a short description. The :property value pairs are optional and take precedence over the positional string arguments. The valid properties are: :id The key for this option in the resulting option map. This is normally set to the keywordized name of the long option without the leading dashes. Multiple option entries can share the same :id in order to transform a value in different ways, but only one of these option entries may contain a :default entry. This option is mandatory. :short-opt The short format for this option, normally set by the first positional string parameter: e.g. "-p". Must be unique. :long-opt The long format for this option, normally set by the second positional string parameter; e.g. "--port". Must be unique. :required A description of the required argument for this option if one is required; normally set in the second positional string parameter after the long option: "--port PORT". The absence of this entry indicates that the option is a boolean toggle that is set to true when specified on the command line. :desc A optional short description of this option. :default The default value of this option. If none is specified, the resulting option map will not contain an entry for this option unless set on the command line. :default-desc An optional description of the default value. This should be used when the string representation of the default value is too ugly to be printed on the command line. :parse-fn A function that receives the required option argument and returns the option value. If this is a boolean option, parse-fn will receive the value true. This may be used to invert the logic of this option: ["-q" "--quiet" :id :verbose :default true :parse-fn not] :assoc-fn A function that receives the current option map, the current option :id, and the current parsed option value, and returns a new option map. This may be used to create non-idempotent options, like setting a verbosity level by specifying an option multiple times. ("-vvv" -> 3) ["-v" "--verbose" :default 0 :assoc-fn (fn [m k _] (update-in m [k] inc))] :validate A vector of [validate-fn validate-msg ...]. Multiple pairs of validation functions and error messages may be provided. :validate-fn A vector of functions that receives the parsed option value and returns a falsy value or throws an exception when the value is invalid. The validations are tried in the given order. :validate-msg A vector of error messages corresponding to :validate-fn that will be added to the :errors vector on validation failure. parse-opts returns a map with four entries: {:options The options map, keyed by :id, mapped to the parsed value :arguments A vector of unprocessed arguments :summary A string containing a minimal options summary :errors A possible vector of error message strings generated during parsing; nil when no errors exist} A few function options may be specified to influence the behavior of parse-opts: :in-order Stop option processing at the first unknown argument. Useful for building programs with subcommands that have their own option specs. :no-defaults Only include option values specified in arguments and do not include any default values in the resulting options map. Useful for parsing options from multiple sources; i.e. from a config file and from the command line. :strict Parse required arguments strictly: if a required argument value matches any other option, it is considered to be missing (and you have a parse error). :summary-fn A function that receives the sequence of compiled option specs (documented at #'clojure.tools.cli/compile-option-specs), and returns a custom option summary string.

(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.