Liking cljdoc? Tell your friends :D

common-cli.core


cli-optionsclj

(cli-options)
source

error-msgclj

(error-msg errors)

Returns the errors as a string.

Returns the errors as a string.
sourceraw docstring

exitclj

(exit status message)

Exits the program with status, printing off the message first.

Exits the program with status, printing off the message first.
sourceraw docstring

handle-argsclj

(handle-args settings args)
(handle-args {:keys [desc app-name group-id art-id] :as settings} args cli-opts)

Parses the arguments passed in and handles common functionality like --help and --version. Takes a map in the following format: {:desc Utility description :app-name The name of the Utility :group-id The maven/leiningen group ID :art-id The maven/leiningen artifact ID} args The unparsed args cli-options Function that returns the CLI definition} All of them are strings except for cli-options and args. The return value of (cli-options) must include definitions of --help and --version. Returns the map parsed out by tools.cli/parse-opts

Parses the arguments passed in and handles common functionality like --help
and --version. Takes a map in the following format:
   {:desc        Utility description
    :app-name    The name of the Utility
    :group-id    The maven/leiningen group ID
    :art-id      The maven/leiningen artifact ID}
    args         The unparsed args
    cli-options  Function that returns the CLI definition}
All of them are strings except for cli-options and args.
The return value of (cli-options) must include definitions of --help and --version.
Returns the map parsed out by tools.cli/parse-opts
sourceraw docstring

usageclj

(usage desc app-name summary)

Returns a usage string. desc is the description of the app, util-name is the name of the utility, and summary should be the command-line summary returned by tools.cli/parse-opts.

Returns a usage string. desc is the description of the app, util-name is the
name of the utility, and summary should be the command-line summary returned
by tools.cli/parse-opts.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close