Skip to content

Commit 848eb08

Browse files
committed
Autodoc commit for master/56ecd5f3
1 parent 1b7a682 commit 848eb08

2 files changed

Lines changed: 24 additions & 21 deletions

File tree

index-0.3.2.clj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{:namespaces
22
({:source-url
3-
"https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj",
3+
"https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj",
44
:wiki-url
55
"http://clojure.github.com/tools.cli/clojure.tools.cli-api.html",
66
:name "clojure.tools.cli",
@@ -11,43 +11,43 @@
1111
:name "cli",
1212
:namespace "clojure.tools.cli",
1313
:source-url
14-
"https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L180",
14+
"https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L179",
1515
:raw-source-url
16-
"https://github.com/clojure/tools.cli/raw/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj",
16+
"https://github.com/clojure/tools.cli/raw/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj",
1717
:wiki-url
1818
"http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/cli",
1919
:doc
2020
"THIS IS A LEGACY FUNCTION and may be deprecated in the future. Please use\nclojure.tools.cli/parse-opts in new applications.\n\nParse the provided args using the given specs. Specs are vectors\ndescribing a command line argument. For example:\n\n[\"-p\" \"--port\" \"Port to listen on\" :default 3000 :parse-fn #(Integer/parseInt %)]\n\nFirst provide the switches (from least to most specific), then a doc\nstring, and pairs of options.\n\nValid options are :default, :parse-fn, and :flag. See\nhttps://github.com/clojure/tools.cli/wiki/Documentation-for-0.2.4 for more\ndetailed examples.\n\nReturns a vector containing a map of the parsed arguments, a vector\nof extra arguments that did not match known switches, and a\ndocumentation banner to provide usage instructions.",
2121
:var-type "function",
22-
:line 180,
22+
:line 179,
2323
:file "src/main/clojure/clojure/tools/cli.clj"}
2424
{:arglists ([args option-specs & options]),
2525
:name "parse-opts",
2626
:namespace "clojure.tools.cli",
2727
:source-url
28-
"https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L389",
28+
"https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L419",
2929
:added "0.3.0",
3030
:raw-source-url
31-
"https://github.com/clojure/tools.cli/raw/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj",
31+
"https://github.com/clojure/tools.cli/raw/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj",
3232
:wiki-url
3333
"http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/parse-opts",
3434
:doc
35-
"Parse arguments sequence according to given option specifications and the\nGNU Program Argument Syntax Conventions:\n\n https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html\n\nOption specifications are a sequence of vectors with the following format:\n\n [short-opt long-opt-with-required-description description\n :property value]\n\nThe first three string parameters in an option spec are positional and\noptional, and may be nil in order to specify a later parameter.\n\nBy default, options are boolean flags that are set to true when toggled, but\nthe second string parameter may be used to specify that an option requires\nan argument.\n\n e.g. [\"-p\" \"--port PORT\"] specifies that --port requires an argument,\n of which PORT is a short description.\n\nThe :property value pairs are optional and take precedence over the\npositional string arguments. The valid properties are:\n\n :id The key for this option in the resulting option map. This\n is normally set to the keywordized name of the long option\n without the leading dashes.\n\n Must be a unique truthy value.\n\n :short-opt The short format for this option, normally set by the first\n positional string parameter: e.g. \"-p\". Must be unique.\n\n :long-opt The long format for this option, normally set by the second\n positional string parameter; e.g. \"--port\". Must be unique.\n\n :required A description of the required argument for this option if\n one is required; normally set in the second positional\n string parameter after the long option: \"--port PORT\".\n\n The absence of this entry indicates that the option is a\n boolean toggle that is set to true when specified on the\n command line.\n\n :desc A optional short description of this option.\n\n :default The default value of this option. If none is specified, the\n resulting option map will not contain an entry for this\n option unless set on the command line.\n\n :default-desc An optional description of the default value. This should be\n used when the string representation of the default value is\n too ugly to be printed on the command line.\n\n :parse-fn A function that receives the required option argument and\n returns the option value.\n\n If this is a boolean option, parse-fn will receive the value\n true. This may be used to invert the logic of this option:\n\n [\"-q\" \"--quiet\"\n :id :verbose\n :default true\n :parse-fn not]\n\n :assoc-fn A function that receives the current option map, the current\n option :id, and the current parsed option value, and returns\n a new option map.\n\n This may be used to create non-idempotent options, like\n setting a verbosity level by specifying an option multiple\n times. (\"-vvv\" -> 3)\n\n [\"-v\" \"--verbose\"\n :default 0\n :assoc-fn (fn [m k _] (update-in m [k] inc))]\n\n :validate A vector of [validate-fn validate-msg].\n\n :validate-fn A function that receives the parsed option value and returns\n a falsy value when the value is invalid.\n\n :validate-msg An optional message that will be added to the :errors vector\n on validation failure.\n\nparse-opts returns a map with four entries:\n\n {:options The options map, keyed by :id, mapped to the parsed value\n :arguments A vector of unprocessed arguments\n :summary A string containing a minimal options summary\n :errors A possible vector of error message strings generated during\n parsing; nil when no errors exist\n }\n\nA few function options may be specified to influence the behavior of\nparse-opts:\n\n :in-order Stop option processing at the first unknown argument. Useful\n for building programs with subcommands that have their own\n option specs.\n\n :summary-fn A function that receives the sequence of compiled option specs\n (documented at #'clojure.tools.cli/compile-option-specs), and\n returns a custom option summary string.\n",
35+
"Parse arguments sequence according to given option specifications and the\nGNU Program Argument Syntax Conventions:\n\n https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html\n\nOption specifications are a sequence of vectors with the following format:\n\n [short-opt long-opt-with-required-description description\n :property value]\n\nThe first three string parameters in an option spec are positional and\noptional, and may be nil in order to specify a later parameter.\n\nBy default, options are boolean flags that are set to true when toggled, but\nthe second string parameter may be used to specify that an option requires\nan argument.\n\n e.g. [\"-p\" \"--port PORT\"] specifies that --port requires an argument,\n of which PORT is a short description.\n\nThe :property value pairs are optional and take precedence over the\npositional string arguments. The valid properties are:\n\n :id The key for this option in the resulting option map. This\n is normally set to the keywordized name of the long option\n without the leading dashes.\n\n Must be a unique truthy value.\n\n :short-opt The short format for this option, normally set by the first\n positional string parameter: e.g. \"-p\". Must be unique.\n\n :long-opt The long format for this option, normally set by the second\n positional string parameter; e.g. \"--port\". Must be unique.\n\n :required A description of the required argument for this option if\n one is required; normally set in the second positional\n string parameter after the long option: \"--port PORT\".\n\n The absence of this entry indicates that the option is a\n boolean toggle that is set to true when specified on the\n command line.\n\n :desc A optional short description of this option.\n\n :default The default value of this option. If none is specified, the\n resulting option map will not contain an entry for this\n option unless set on the command line.\n\n :default-desc An optional description of the default value. This should be\n used when the string representation of the default value is\n too ugly to be printed on the command line.\n\n :parse-fn A function that receives the required option argument and\n returns the option value.\n\n If this is a boolean option, parse-fn will receive the value\n true. This may be used to invert the logic of this option:\n\n [\"-q\" \"--quiet\"\n :id :verbose\n :default true\n :parse-fn not]\n\n :assoc-fn A function that receives the current option map, the current\n option :id, and the current parsed option value, and returns\n a new option map.\n\n This may be used to create non-idempotent options, like\n setting a verbosity level by specifying an option multiple\n times. (\"-vvv\" -> 3)\n\n [\"-v\" \"--verbose\"\n :default 0\n :assoc-fn (fn [m k _] (update-in m [k] inc))]\n\n :validate A vector of [validate-fn validate-msg ...]. Multiple pairs\n of validation functions and error messages may be provided.\n\n :validate-fn A vector of functions that receives the parsed option value\n and returns a falsy value or throws an exception when the\n value is invalid. The validations are tried in the given\n order.\n\n :validate-msg A vector of error messages corresponding to :validate-fn\n that will be added to the :errors vector on validation\n failure.\n\nparse-opts returns a map with four entries:\n\n {:options The options map, keyed by :id, mapped to the parsed value\n :arguments A vector of unprocessed arguments\n :summary A string containing a minimal options summary\n :errors A possible vector of error message strings generated during\n parsing; nil when no errors exist}\n\nA few function options may be specified to influence the behavior of\nparse-opts:\n\n :in-order Stop option processing at the first unknown argument. Useful\n for building programs with subcommands that have their own\n option specs.\n\n :summary-fn A function that receives the sequence of compiled option specs\n (documented at #'clojure.tools.cli/compile-option-specs), and\n returns a custom option summary string.\n",
3636
:var-type "function",
37-
:line 389,
37+
:line 419,
3838
:file "src/main/clojure/clojure/tools/cli.clj"}
3939
{:arglists ([specs]),
4040
:name "summarize",
4141
:namespace "clojure.tools.cli",
4242
:source-url
43-
"https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L370",
43+
"https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L400",
4444
:added "0.3.0",
4545
:raw-source-url
46-
"https://github.com/clojure/tools.cli/raw/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj",
46+
"https://github.com/clojure/tools.cli/raw/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj",
4747
:wiki-url
4848
"http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/summarize",
4949
:doc
5050
"Reduce options specs into a options summary for printing at a terminal.",
5151
:var-type "function",
52-
:line 370,
52+
:line 400,
5353
:file "src/main/clojure/clojure/tools/cli.clj"})}

index.html

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h2 id="clojure.tools.cli/cli">cli</h2>
111111
documentation banner to provide usage instructions.</pre>
112112

113113

114-
<a href="https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L180" id="var-source">Source</a>
114+
<a href="https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L179" id="var-source">Source</a>
115115
</div><div id="var-entry">
116116
<br />
117117
<hr />
@@ -195,22 +195,25 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
195195
:default 0
196196
:assoc-fn (fn [m k _] (update-in m [k] inc))]
197197

198-
:validate A vector of [validate-fn validate-msg].
198+
:validate A vector of [validate-fn validate-msg ...]. Multiple pairs
199+
of validation functions and error messages may be provided.
199200

200-
:validate-fn A function that receives the parsed option value and returns
201-
a falsy value when the value is invalid.
201+
:validate-fn A vector of functions that receives the parsed option value
202+
and returns a falsy value or throws an exception when the
203+
value is invalid. The validations are tried in the given
204+
order.
202205

203-
:validate-msg An optional message that will be added to the :errors vector
204-
on validation failure.
206+
:validate-msg A vector of error messages corresponding to :validate-fn
207+
that will be added to the :errors vector on validation
208+
failure.
205209

206210
parse-opts returns a map with four entries:
207211

208212
{:options The options map, keyed by :id, mapped to the parsed value
209213
:arguments A vector of unprocessed arguments
210214
:summary A string containing a minimal options summary
211215
:errors A possible vector of error message strings generated during
212-
parsing; nil when no errors exist
213-
}
216+
parsing; nil when no errors exist}
214217

215218
A few function options may be specified to influence the behavior of
216219
parse-opts:
@@ -225,7 +228,7 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
225228
</pre>
226229
<span class="var-added"><span id="content">Added in Command-line processor version 0.3.0</span><br /></span>
227230

228-
<a href="https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L389" id="var-source">Source</a>
231+
<a href="https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L419" id="var-source">Source</a>
229232
</div><div id="var-entry">
230233
<br />
231234
<hr />
@@ -236,7 +239,7 @@ <h2 id="clojure.tools.cli/summarize">summarize</h2>
236239
<pre id="var-docstr">Reduce options specs into a options summary for printing at a terminal.</pre>
237240
<span class="var-added"><span id="content">Added in Command-line processor version 0.3.0</span><br /></span>
238241

239-
<a href="https://github.com/clojure/tools.cli/blob/b2ffe90b00e299dbcbaeb0c903409d50e64cbcd9/src/main/clojure/clojure/tools/cli.clj#L370" id="var-source">Source</a>
242+
<a href="https://github.com/clojure/tools.cli/blob/56ecd5f305d444bbf6dcd28f4f4adce58ebc0de4/src/main/clojure/clojure/tools/cli.clj#L400" id="var-source">Source</a>
240243
</div>
241244
</div>
242245

0 commit comments

Comments
 (0)