Liking cljdoc? Tell your friends :D

clj-cli-ext.core

An extension of clojure.tool.cli to simplify command line parsing.

An extension of clojure.tool.cli to simplify command line parsing.
raw docstring

add-actionclj

(add-action cli key-vector)

Put the parsed options into the tree.

Put the parsed options into the tree.
sourceraw docstring

add-default-globalsclj

(add-default-globals cli options)

add the global options (--version --help) in.

add the global options (--version --help) in.
sourceraw docstring

add-parsed-optionsclj

(add-parsed-options cli options key-vector)

Put the parsed options into the tree.

Put the parsed options into the tree.
sourceraw docstring

change-usageclj

(change-usage cli usage-function)

Set your own usage function if you really want to.

Set your own usage function if you really want to.
sourceraw docstring

do-parseclj

(do-parse args
          parse-group
          {:keys [pname version description exception]
           :or {pname "test"
                version "1.0.0"
                description "This test program does nothing."
                exception :none}})
source

error-exitclj

(error-exit cli errors)

Set the proper error message and throw an exception.

Set the proper error message and throw an exception.
sourceraw docstring

error-msgclj

(error-msg cli errors)

Build a nice error message.

Build a nice error message.
sourceraw docstring

exit-conditionclj

(exit-condition cli group-name parser options errors & rest)

Check for errors, --version and --help. If any of the above do the right thing and throw an exception

Check for errors, --version and --help. If any of the above
do the right thing and throw an exception
sourceraw docstring

exit-on-exceptionclj

(exit-on-exception cli setting)

Set behavior to system exit on error, help or version. true or nil.

Set behavior to system exit on error, help or version.
true or nil.
sourceraw docstring

get-help-treeclj

(get-help-tree cli group-name parser)
source

get-summary-entryclj

(get-summary-entry tree)
source

handle-catchclj

(handle-catch cli e)
source

help-completeclj

(help-complete cli group-name parser)
source

help-entryclj

(help-entry entry)
source

help-groupclj

(help-group group)
source

help-headerclj

(help-header cli)

Build the program's help header.

Build the program's help header.
sourceraw docstring

help-summaryclj

(help-summary cli)

Create a summary of the command line for the program.

Create a summary of the command line for the program.
sourceraw docstring

help-tree-entryclj

(help-tree-entry name parse-entry)

create a help tree node from a parse tree node.

create a help tree node from a parse tree node.
sourceraw docstring

help-tree-groupclj

(help-tree-group parse-group)

process the entries in a parse group to create help nodes.

process the entries in a parse group to create help nodes.
sourceraw docstring

new-cliclj

(new-cli name version description)

Initialize the command line interface map.

Initialize the command line interface map.
sourceraw docstring

new-main-parserclj

(new-main-parser cli options parse-groups)

Create the main cli parser

Create the main cli parser
sourceraw docstring

on-exceptionclj

(on-exception cli setting)

Set behavior for exception handling. :exit :throw or :none. Behavior applies to --help, --version and errors.

Set behavior for exception handling. :exit :throw or :none.
Behavior applies to --help, --version and errors.
sourceraw docstring

parseclj

(parse cli argv)

Parse the arguments and fill in the cli map. Handle --help, --version and parsing errors.

Parse the arguments and fill in the cli map. Handle --help, --version and
parsing errors.
sourceraw docstring

parse-groupclj

(parse-group cli key-vector parse-group arguments)

Iterate over a parse group and parse the options and sub-parse-groups.

Iterate over a parse group and parse the options and sub-parse-groups.
sourceraw docstring

parse-group-entriesclj

(parse-group-entries cli key-vector parsers arguments)

loop through non sub-command group of parser entries.

loop through non sub-command group of parser entries.
sourceraw docstring

parse-group-entryclj

(parse-group-entry cli key-vector group-name parser arguments)

Parse argumens with an entry from parse-group for its options and recurse through it's parse-groups.

Parse argumens with an entry from parse-group for its options and recurse
through it's parse-groups.
sourceraw docstring

parse-optionsclj

(parse-options cli key-vector argv options group-name parser)

Parse the options for the current parser.

Parse the options for the current parser.
sourceraw docstring

parse-subcommandclj

(parse-subcommand cli key-vector parse-group arguments)
source

summarize-entryclj

(summarize-entry entry)
source

summarize-entry2clj

(summarize-entry2 parent entry)
source

summarize-entry3clj

(summarize-entry3 parent entry)
source

summarize-groupclj

(summarize-group group)
source

summarize-group2clj

(summarize-group2 parent group)
source

summaryclj

(summary option-spec)
source

throw-on-exceptionclj

(throw-on-exception cli setting)

Set behavior to throw exception on error, help or version. true or nil.

Set behavior to throw exception on error, help or version.
true  or nil.
sourceraw docstring

unrecognized-optionsclj

(unrecognized-options cli argv)

When we have leftovers.

When we have leftovers.
sourceraw docstring

usageclj

(usage cli summary group-name parser)

Basic help for the program.

Basic help for the program.
sourceraw docstring

usage-exitclj

(usage-exit cli)
(usage-exit cli summary)
(usage-exit cli group-name parser summary)

Set the proper usage message and throw an exception.

Set the proper usage message and throw an exception.
sourceraw docstring

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

× close