|
1 | 1 | {:namespaces |
2 | 2 | ({: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", |
4 | 4 | :wiki-url |
5 | 5 | "http://clojure.github.com/tools.cli/clojure.tools.cli-api.html", |
6 | 6 | :name "clojure.tools.cli", |
|
11 | 11 | :name "cli", |
12 | 12 | :namespace "clojure.tools.cli", |
13 | 13 | :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", |
15 | 15 | :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", |
17 | 17 | :wiki-url |
18 | 18 | "http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/cli", |
19 | 19 | :doc |
20 | 20 | "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.", |
21 | 21 | :var-type "function", |
22 | | - :line 180, |
| 22 | + :line 179, |
23 | 23 | :file "src/main/clojure/clojure/tools/cli.clj"} |
24 | 24 | {:arglists ([args option-specs & options]), |
25 | 25 | :name "parse-opts", |
26 | 26 | :namespace "clojure.tools.cli", |
27 | 27 | :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", |
29 | 29 | :added "0.3.0", |
30 | 30 | :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", |
32 | 32 | :wiki-url |
33 | 33 | "http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/parse-opts", |
34 | 34 | :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", |
36 | 36 | :var-type "function", |
37 | | - :line 389, |
| 37 | + :line 419, |
38 | 38 | :file "src/main/clojure/clojure/tools/cli.clj"} |
39 | 39 | {:arglists ([specs]), |
40 | 40 | :name "summarize", |
41 | 41 | :namespace "clojure.tools.cli", |
42 | 42 | :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", |
44 | 44 | :added "0.3.0", |
45 | 45 | :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", |
47 | 47 | :wiki-url |
48 | 48 | "http://clojure.github.com/tools.cli//clojure.tools.cli-api.html#clojure.tools.cli/summarize", |
49 | 49 | :doc |
50 | 50 | "Reduce options specs into a options summary for printing at a terminal.", |
51 | 51 | :var-type "function", |
52 | | - :line 370, |
| 52 | + :line 400, |
53 | 53 | :file "src/main/clojure/clojure/tools/cli.clj"})} |
0 commit comments