Commit 7e724c5cf3b0e3c8be94929b3200b4ae9aeb98ef

Authored by Henry Schreiner
Committed by GitHub
1 parent 73411e1e

Structure changed to match Standard Readme Style (#155)

* Structure changed to match Standard Readme Style

* Nicer links

* Using remarkjs/remark-lint

Run with: remark README.md --use remark-preset-lint-recommended -o

* Standard headings

* Adding logo
README.md
1   -[![Build Status Linux and macOS][travis-badge]][Travis]
2   -[![Build Status Windows][appveyor-badge]][AppVeyor]
3   -[![Code Coverage][codecov-badge]][CodeCov]
  1 +# CLI11: Command line parser for C++11
  2 +
  3 +![CLI11 Logo](./docs/CLI11_300.png)
  4 +
  5 +[![Build Status Linux and macOS][travis-badge]][travis]
  6 +[![Build Status Windows][appveyor-badge]][appveyor]
  7 +[![Code Coverage][codecov-badge]][codecov]
4 8 [![Codacy Badge][codacy-badge]][codacy-link]
5 9 [![Join the chat at https://gitter.im/CLI11gitter/Lobby][gitter-badge]][gitter]
6 10 [![License: BSD][license-badge]](./LICENSE)
7   -[![Latest release][releases-badge]][Github Releases]
8   -[![DOI][DOI-badge]][DOI-link]
  11 +[![Latest release][releases-badge]][github releases]
  12 +[![DOI][doi-badge]][doi-link]
9 13 [![Conan.io][conan-badge]][conan-link]
10 14 [![Try CLI11 1.6 online][wandbox-badge]][wandbox-link]
11 15  
12   -[Documentation][GitBook] •
  16 +[Documentation][gitbook] •
13 17 [API Reference][api-docs] •
14 18 [What's new](./CHANGELOG.md)
15 19  
16   -# CLI11: Command line parser for C++11
  20 +CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
  21 +
  22 +## Table of Contents
  23 +
  24 +- [Background](#background)
  25 + - [Introduction](#introduction)
  26 + - [Why write another CLI parser?](#why-write-another-cli-parser)
  27 + - [Other parsers](#other-parsers)
  28 + - [Features not supported by this library](#features-not-supported-by-this-library)
  29 +- [Install](#install)
  30 +- [Usage](#usage)
  31 + - [Adding options](#adding-options)
  32 + - [Option types](#option-types)
  33 + - [Option options](#option-options)
  34 + - [Subcommands](#subcommands)
  35 + - [Subcommand options](#subcommand-options)
  36 + - [Configuration file](#configuration-file)
  37 + - [Inheriting defaults](#inheriting-defaults)
  38 + - [Formatting](#formatting)
  39 + - [Subclassing](#subclassing)
  40 + - [How it works](#how-it-works)
  41 + - [Utilities](#utilities)
  42 + - [Other libraries](#other-libraries)
  43 +- [API](#api)
  44 +- [Contribute](#contribute)
  45 +- [License](#license)
  46 +
  47 +## Background
  48 +
  49 +### Introduction
17 50  
18 51 CLI11 provides all the features you expect in a powerful command line parser, with a beautiful, minimal syntax and no dependencies beyond C++11. It is header only, and comes in a single file form for easy inclusion in projects. It is easy to use for small projects, but powerful enough for complex command line projects, and can be customized for frameworks.
19   -It is tested on [Travis] and [AppVeyor], and is being included in the [GooFit GPU fitting framework][GooFit]. It was inspired by [`plumbum.cli`][Plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook], as well as [API documentation][api-docs] generated by Travis.
20   -See the [changelog](./CHANGELOG.md) or [GitHub Releases] for details for current and past releases. Also see the [Version 1.0 post], [Version 1.3 post], or [Version 1.6 post] for more information.
  52 +It is tested on [Travis][] and [AppVeyor][], and is being included in the [GooFit GPU fitting framework][goofit]. It was inspired by [`plumbum.cli`][plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook][], as well as [API documentation][api-docs] generated by Travis.
  53 +See the [changelog](./CHANGELOG.md) or [GitHub Releases][] for details for current and past releases. Also see the [Version 1.0 post][], [Version 1.3 post][], or [Version 1.6 post][] for more information.
21 54  
22   -You can be notified when new releases are made by subscribing to https://github.com/CLIUtils/CLI11/releases.atom on an RSS reader, like Feedly.
  55 +You can be notified when new releases are made by subscribing to <https://github.com/CLIUtils/CLI11/releases.atom> on an RSS reader, like Feedly.
23 56  
24 57 ### Why write another CLI parser?
25 58  
26 59 An acceptable CLI parser library should be all of the following:
27 60  
28   -* Easy to include (i.e., header only, one file if possible, **no external requirements**).
29   -* Short, simple syntax: This is one of the main reasons to use a CLI parser, it should make variables from the command line nearly as easy to define as any other variables. If most of your program is hidden in CLI parsing, this is a problem for readability.
30   -* C++11 or better: Should work with GCC 4.7+ (such as GCC 4.8 on CentOS 7), Clang 3.5+, AppleClang 7+, NVCC 7.0+, or MSVC 2015+.
31   -* Work on Linux, macOS, and Windows.
32   -* Well tested using [Travis] (Linux and macOS) and [AppVeyor] (Windows). "Well" is defined as having good coverage measured by [CodeCov].
33   -* Clear help printing.
34   -* Nice error messages.
35   -* Standard shell idioms supported naturally, like grouping flags, a positional separator, etc.
36   -* Easy to execute, with help, parse errors, etc. providing correct exit and details.
37   -* Easy to extend as part of a framework that provides "applications" to users.
38   -* Usable subcommand syntax, with support for multiple subcommands, nested subcommands, and optional fallthrough (explained later).
39   -* Ability to add a configuration file (`ini` format), and produce it as well.
40   -* Produce real values that can be used directly in code, not something you have pay compute time to look up, for HPC applications.
41   -* Work with standard types, simple custom types, and extendible to exotic types.
42   -* Permissively licensed.
  61 +- Easy to include (i.e., header only, one file if possible, **no external requirements**).
  62 +- Short, simple syntax: This is one of the main reasons to use a CLI parser, it should make variables from the command line nearly as easy to define as any other variables. If most of your program is hidden in CLI parsing, this is a problem for readability.
  63 +- C++11 or better: Should work with GCC 4.7+ (such as GCC 4.8 on CentOS 7), Clang 3.5+, AppleClang 7+, NVCC 7.0+, or MSVC 2015+.
  64 +- Work on Linux, macOS, and Windows.
  65 +- Well tested using [Travis][] (Linux and macOS) and [AppVeyor][] (Windows). "Well" is defined as having good coverage measured by [CodeCov][].
  66 +- Clear help printing.
  67 +- Nice error messages.
  68 +- Standard shell idioms supported naturally, like grouping flags, a positional separator, etc.
  69 +- Easy to execute, with help, parse errors, etc. providing correct exit and details.
  70 +- Easy to extend as part of a framework that provides "applications" to users.
  71 +- Usable subcommand syntax, with support for multiple subcommands, nested subcommands, and optional fallthrough (explained later).
  72 +- Ability to add a configuration file (`ini` format), and produce it as well.
  73 +- Produce real values that can be used directly in code, not something you have pay compute time to look up, for HPC applications.
  74 +- Work with standard types, simple custom types, and extendible to exotic types.
  75 +- Permissively licensed.
  76 +
  77 +### Other parsers
43 78  
44 79 <details><summary>The major CLI parsers for C++ include, with my biased opinions: (click to expand)</summary><p>
45 80  
46   -| Library | My biased opinion |
47   -|---------|-------------------|
48   -| [Boost Program Options] | A great library if you already depend on Boost, but its pre-C++11 syntax is really odd and setting up the correct call in the main function is poorly documented (and is nearly a page of code). A simple wrapper for the Boost library was originally developed, but was discarded as CLI11 became more powerful. The idea of capturing a value and setting it originated with Boost PO. [See this comparison.][cli11-po-compare] |
49   -| [The Lean Mean C++ Option Parser] | One header file is great, but the syntax is atrocious, in my opinion. It was quite impractical to wrap the syntax or to use in a complex project. It seems to handle standard parsing quite well. |
50   -| [TCLAP] | The not-quite-standard command line parsing causes common shortcuts to fail. It also seems to be poorly supported, with only minimal bugfixes accepted. Header only, but in quite a few files. Has not managed to get enough support to move to GitHub yet. No subcommands. Produces wrapped values. |
51   -| [Cxxopts] | C++11, single file, and nice CMake support, but requires regex, therefore GCC 4.8 (CentOS 7 default) does not work. Syntax closely based on Boost PO, so not ideal but familiar. |
52   -| [DocOpt] | Completely different approach to program options in C++11, you write the docs and the interface is generated. Too fragile and specialized. |
  81 +| Library | My biased opinion |
  82 +| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  83 +| [Boost Program Options][] | A great library if you already depend on Boost, but its pre-C++11 syntax is really odd and setting up the correct call in the main function is poorly documented (and is nearly a page of code). A simple wrapper for the Boost library was originally developed, but was discarded as CLI11 became more powerful. The idea of capturing a value and setting it originated with Boost PO. [See this comparison.][cli11-po-compare] |
  84 +| [The Lean Mean C++ Option Parser][] | One header file is great, but the syntax is atrocious, in my opinion. It was quite impractical to wrap the syntax or to use in a complex project. It seems to handle standard parsing quite well. |
  85 +| [TCLAP][] | The not-quite-standard command line parsing causes common shortcuts to fail. It also seems to be poorly supported, with only minimal bugfixes accepted. Header only, but in quite a few files. Has not managed to get enough support to move to GitHub yet. No subcommands. Produces wrapped values. |
  86 +| [Cxxopts][] | C++11, single file, and nice CMake support, but requires regex, therefore GCC 4.8 (CentOS 7 default) does not work. Syntax closely based on Boost PO, so not ideal but familiar. |
  87 +| [DocOpt][] | Completely different approach to program options in C++11, you write the docs and the interface is generated. Too fragile and specialized. |
53 88  
54 89 After I wrote this, I also found the following libraries:
55 90  
56   -| Library | My biased opinion |
57   -|---------|-------------------|
58   -| [GFlags] | The Google Commandline Flags library. Uses macros heavily, and is limited in scope, missing things like subcommands. It provides a simple syntax and supports config files/env vars. |
59   -| [GetOpt] | Very limited C solution with long, convoluted syntax. Does not support much of anything, like help generation. Always available on UNIX, though (but in different flavors). |
60   -| [ProgramOptions.hxx] | Intresting library, less powerful and no subcommands. Nice callback system. |
61   -| [Args] | Also interesting, and supports subcommands. I like the optional-like design, but CLI11 is cleaner and provides direct value access, and is less verbose. |
62   -| [Argument Aggregator] | I'm a big fan of the [fmt] library, and the try-catch statement looks familiar. :thumbsup: Doesn't seem to support subcommands. |
63   -| [Clara] | Simple library built for the excellent [Catch] testing framework. Unique syntax, limited scope. |
64   -| [Argh!] | Very minimalistic C++11 parser, single header. Don't have many features. No help generation?!?! At least it's exception-free.|
65   -| [CLI] | Custom language and parser. Huge build-system overkill for very little benefit. Last release in 2009, but still occasionally active. |
  91 +| Library | My biased opinion |
  92 +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  93 +| [GFlags][] | The Google Commandline Flags library. Uses macros heavily, and is limited in scope, missing things like subcommands. It provides a simple syntax and supports config files/env vars. |
  94 +| [GetOpt][] | Very limited C solution with long, convoluted syntax. Does not support much of anything, like help generation. Always available on UNIX, though (but in different flavors). |
  95 +| [ProgramOptions.hxx][] | Intresting library, less powerful and no subcommands. Nice callback system. |
  96 +| [Args][] | Also interesting, and supports subcommands. I like the optional-like design, but CLI11 is cleaner and provides direct value access, and is less verbose. |
  97 +| [Argument Aggregator][] | I'm a big fan of the [fmt][] library, and the try-catch statement looks familiar. :thumbsup: Doesn't seem to support subcommands. |
  98 +| [Clara][] | Simple library built for the excellent [Catch][] testing framework. Unique syntax, limited scope. |
  99 +| [Argh!][] | Very minimalistic C++11 parser, single header. Don't have many features. No help generation?!?! At least it's exception-free. |
  100 +| [CLI][] | Custom language and parser. Huge build-system overkill for very little benefit. Last release in 2009, but still occasionally active. |
66 101  
67   -See [Awesome C++] for a less-biased list of parsers. You can also find other single file libraries at [Single file libs].
  102 +See [Awesome C++][] for a less-biased list of parsers. You can also find other single file libraries at [Single file libs][].
68 103  
69 104 </p></details>
70 105 <br/>
... ... @@ -72,26 +107,25 @@ See [Awesome C++] for a less-biased list of parsers. You can also find other sin
72 107 None of these libraries fulfill all the above requirements, or really even come close. As you probably have already guessed, CLI11 does.
73 108 So, this library was designed to provide a great syntax, good compiler compatibility, and minimal installation fuss.
74 109  
75   -## Features not supported by this library
  110 +### Features not supported by this library
76 111  
77 112 There are some other possible "features" that are intentionally not supported by this library:
78 113  
79   -* Non-standard variations on syntax, like `-long` options. This is non-standard and should be avoided, so that is enforced by this library.
80   -* Completion of partial options, such as Python's `argparse` supplies for incomplete arguments. It's better not to guess. Most third party command line parsers for python actually reimplement command line parsing rather than using argparse because of this perceived design flaw.
81   -* In C++14, you could have a set of `callback` methods with differing signatures (tested in a branch). Not deemed worth having a C++14 variation on API and removed.
82   -* Autocomplete: This might eventually be added to both Plumbum and CLI11, but it is not supported yet.
83   -* Wide strings / unicode: Since this uses the standard library only, it might be hard to properly implement, but I would be open to suggestions in how to do this.
84   -
  114 +- Non-standard variations on syntax, like `-long` options. This is non-standard and should be avoided, so that is enforced by this library.
  115 +- Completion of partial options, such as Python's `argparse` supplies for incomplete arguments. It's better not to guess. Most third party command line parsers for python actually reimplement command line parsing rather than using argparse because of this perceived design flaw.
  116 +- In C++14, you could have a set of `callback` methods with differing signatures (tested in a branch). Not deemed worth having a C++14 variation on API and removed.
  117 +- Autocomplete: This might eventually be added to both Plumbum and CLI11, but it is not supported yet.
  118 +- Wide strings / unicode: Since this uses the standard library only, it might be hard to properly implement, but I would be open to suggestions in how to do this.
85 119  
86   -## Installing
  120 +## Install
87 121  
88 122 To use, there are two methods:
89 123  
90   -1. Copy `CLI11.hpp` from the [most recent release][Github Releases] into your include directory, and you are set. This is combined from the source files for every release. This includes the entire command parser library, but does not include separate utilities (like `Timer`, `AutoTimer`). The utilities are completely self contained and can be copied separately.
91   -2. Use `CLI/*.hpp` files. You could check out the repository as a submodule, for example. You can use the `CLI11::CLI11` interface target when linking from `add_subdirectory`.
92   - You can also configure and optionally install the project, and then use `find_package(CLI11 CONFIG)` to get the `CLI11::CLI11` target. You can also use [Conan.io][conan-link] or [Hunter].
93   - (These are just conveniences to allow you to use your favorite method of managing packages; it's just header only so including the correct path and
94   - using C++11 is all you really need.)
  124 +1. Copy `CLI11.hpp` from the [most recent release][github releases] into your include directory, and you are set. This is combined from the source files for every release. This includes the entire command parser library, but does not include separate utilities (like `Timer`, `AutoTimer`). The utilities are completely self contained and can be copied separately.
  125 +2. Use `CLI/*.hpp` files. You could check out the repository as a submodule, for example. You can use the `CLI11::CLI11` interface target when linking from `add_subdirectory`.
  126 + You can also configure and optionally install the project, and then use `find_package(CLI11 CONFIG)` to get the `CLI11::CLI11` target. You can also use [Conan.io][conan-link] or [Hunter][].
  127 + (These are just conveniences to allow you to use your favorite method of managing packages; it's just header only so including the correct path and
  128 + using C++11 is all you really need.)
95 129  
96 130 To build the tests, checkout the repository and use CMake:
97 131  
... ... @@ -103,7 +137,9 @@ make
103 137 GTEST_COLOR=1 CTEST_OUTPUT_ON_FAILURE=1 make test
104 138 ```
105 139  
106   -## Adding options
  140 +## Usage
  141 +
  142 +### Adding options
107 143  
108 144 To set up, add options, and run, your main function will look something like this:
109 145  
... ... @@ -131,10 +167,11 @@ The try/catch block ensures that `-h,--help` or a parse error will exit with the
131 167 </p></details>
132 168 </br>
133 169  
134   -
135 170 The initialization is just one line, adding options is just two each. The parse macro is just one line (or 5 for the contents of the macro). After the app runs, the filename will be set to the correct value if it was passed, otherwise it will be set to the default. You can check to see if this was passed on the command line with `app.count("--file")`.
136 171  
137   -The supported values are:
  172 +#### Option types
  173 +
  174 +While all options internally are the same type, there are several ways to add an option depending on what you need. The supported values are:
138 175  
139 176 ```cpp
140 177 app.add_option(option_name,
... ... @@ -167,49 +204,51 @@ An option name must start with a alphabetic character or underscore. For long op
167 204  
168 205 On a C++14 compiler, you can pass a callback function directly to `.add_flag`, while in C++11 mode you'll need to use `.add_flag_function` if you want a callback function. The function will be given the number of times the flag was passed. You can throw a relevant `CLI::ParseError` to signal a failure.
169 206  
170   -On a compiler that supports C++17's `__has_include`, you can also use `std::optional`, `std::experimental::optional`, and `boost::optional` directly in an `add_option` call. If you don't have `__has_include`, you can define `CLI11_BOOST_OPTIONAL 1` before including CLI11 to manually add support (or 0 to remove) for `boost::optional`. See [CLI11 Internals] for information on how this was done and how you can add your own converters.
  207 +On a compiler that supports C++17's `__has_include`, you can also use `std::optional`, `std::experimental::optional`, and `boost::optional` directly in an `add_option` call. If you don't have `__has_include`, you can define `CLI11_BOOST_OPTIONAL 1` before including CLI11 to manually add support (or 0 to remove) for `boost::optional`. See [CLI11 Internals][] for information on how this was done and how you can add your own converters.
171 208  
172   -### Example
  209 +#### Example
173 210  
174   -* `"one,-o,--one"`: Valid as long as not a flag, would create an option that can be specified positionally, or with `-o` or `--one`
175   -* `"this"` Can only be passed positionally
176   -* `"-a,-b,-c"` No limit to the number of non-positional option names
  211 +- `"one,-o,--one"`: Valid as long as not a flag, would create an option that can be specified positionally, or with `-o` or `--one`
  212 +- `"this"` Can only be passed positionally
  213 +- `"-a,-b,-c"` No limit to the number of non-positional option names
177 214  
  215 +The add commands return a pointer to an internally stored `Option`. If you set the final argument to true, the default value is captured and printed on the command line with the help flag. This option can be used directly to check for the count (`->count()`) after parsing to avoid a string based lookup.
178 216  
179   -The add commands return a pointer to an internally stored `Option`. If you set the final argument to true, the default value is captured and printed on the command line with the help flag. This option can be used directly to check for the count (`->count()`) after parsing to avoid a string based lookup. Before parsing, you can set the following options:
  217 +#### Option options
180 218  
181   -* `->required()`: The program will quit if this option is not present. This is `mandatory` in Plumbum, but required options seems to be a more standard term. For compatibility, `->mandatory()` also works.
182   -* `->expected(N)`: Take `N` values instead of as many as possible, only for vector args. If negative, require at least `-N`; end with `--` or another recognized option.
183   -* `->type_name(typename)`: Set the name of an Option's type (`type_name_fn` allows a function instead)
184   -* `->type_size(N)`: Set the intrinsic size of an option. The parser will require multiples of this number if negative.
185   -* `->needs(opt)`: This option requires another option to also be present, opt is an `Option` pointer.
186   -* `->excludes(opt)`: This option cannot be given with `opt` present, opt is an `Option` pointer.
187   -* `->envname(name)`: Gets the value from the environment if present and not passed on the command line.
188   -* `->group(name)`: The help group to put the option in. No effect for positional options. Defaults to `"Options"`. `""` will not show up in the help print (hidden).
189   -* `->ignore_case()`: Ignore the case on the command line (also works on subcommands, does not affect arguments).
190   -* `->multi_option_policy(CLI::MultiOptionPolicy::Throw)`: Set the multi-option policy. Shortcuts available: `->take_last()`, `->take_first()`, and `->join()`. This will only affect options expecting 1 argument or bool flags (which always default to take last).
191   -* `->check(CLI::ExistingFile)`: Requires that the file exists if given.
192   -* `->check(CLI::ExistingDirectory)`: Requires that the directory exists.
193   -* `->check(CLI::ExistingPath)`: Requires that the path (file or directory) exists.
194   -* `->check(CLI::NonexistentPath)`: Requires that the path does not exist.
195   -* `->check(CLI::Range(min,max))`: Requires that the option be between min and max (make sure to use floating point if needed). Min defaults to 0.
196   -* `->transform(std::string(std::string))`: Converts the input string into the output string, in-place in the parsed options.
197   -* `->each(void(std::string)>`: Run this function on each value received, as it is received.
198   -* `->configurable(false)`: Disable this option from being in a configuration file.
  219 +Before parsing, you can set the following options:
199 220  
200   -These options return the `Option` pointer, so you can chain them together, and even skip storing the pointer entirely. Check takes any function that has the signature `void(const std::string&)`; it should throw a `ValidationError` when validation fails. The help message will have the name of the parent option prepended. Since `check` and `transform` use the same underlying mechanism, you can chain as many as you want, and they will be executed in order. If you just want to see the unconverted values, use `.results()` to get the `std::vector<std::string>` of results. Validate can also be a subclass of `CLI::Validator`, in which case it can also set the type name and can be combined with `&` and `|` (all built-in validators are this sort).
  221 +- `->required()`: The program will quit if this option is not present. This is `mandatory` in Plumbum, but required options seems to be a more standard term. For compatibility, `->mandatory()` also works.
  222 +- `->expected(N)`: Take `N` values instead of as many as possible, only for vector args. If negative, require at least `-N`; end with `--` or another recognized option.
  223 +- `->type_name(typename)`: Set the name of an Option's type (`type_name_fn` allows a function instead)
  224 +- `->type_size(N)`: Set the intrinsic size of an option. The parser will require multiples of this number if negative.
  225 +- `->needs(opt)`: This option requires another option to also be present, opt is an `Option` pointer.
  226 +- `->excludes(opt)`: This option cannot be given with `opt` present, opt is an `Option` pointer.
  227 +- `->envname(name)`: Gets the value from the environment if present and not passed on the command line.
  228 +- `->group(name)`: The help group to put the option in. No effect for positional options. Defaults to `"Options"`. `""` will not show up in the help print (hidden).
  229 +- `->ignore_case()`: Ignore the case on the command line (also works on subcommands, does not affect arguments).
  230 +- `->multi_option_policy(CLI::MultiOptionPolicy::Throw)`: Set the multi-option policy. Shortcuts available: `->take_last()`, `->take_first()`, and `->join()`. This will only affect options expecting 1 argument or bool flags (which always default to take last).
  231 +- `->check(CLI::ExistingFile)`: Requires that the file exists if given.
  232 +- `->check(CLI::ExistingDirectory)`: Requires that the directory exists.
  233 +- `->check(CLI::ExistingPath)`: Requires that the path (file or directory) exists.
  234 +- `->check(CLI::NonexistentPath)`: Requires that the path does not exist.
  235 +- `->check(CLI::Range(min,max))`: Requires that the option be between min and max (make sure to use floating point if needed). Min defaults to 0.
  236 +- `->transform(std::string(std::string))`: Converts the input string into the output string, in-place in the parsed options.
  237 +- `->each(void(std::string)>`: Run this function on each value received, as it is received.
  238 +- `->configurable(false)`: Disable this option from being in a configuration file.
201 239  
  240 +These options return the `Option` pointer, so you can chain them together, and even skip storing the pointer entirely. Check takes any function that has the signature `void(const std::string&)`; it should throw a `ValidationError` when validation fails. The help message will have the name of the parent option prepended. Since `check` and `transform` use the same underlying mechanism, you can chain as many as you want, and they will be executed in order. If you just want to see the unconverted values, use `.results()` to get the `std::vector<std::string>` of results. Validate can also be a subclass of `CLI::Validator`, in which case it can also set the type name and can be combined with `&` and `|` (all built-in validators are this sort).
202 241  
203 242 On the command line, options can be given as:
204 243  
205   -* `-a` (flag)
206   -* `-abc` (flags can be combined)
207   -* `-f filename` (option)
208   -* `-ffilename` (no space required)
209   -* `-abcf filename` (flags and option can be combined)
210   -* `--long` (long flag)
211   -* `--file filename` (space)
212   -* `--file=filename` (equals)
  244 +- `-a` (flag)
  245 +- `-abc` (flags can be combined)
  246 +- `-f filename` (option)
  247 +- `-ffilename` (no space required)
  248 +- `-abcf filename` (flags and option can be combined)
  249 +- `--long` (long flag)
  250 +- `--file filename` (space)
  251 +- `--file=filename` (equals)
213 252  
214 253 Extra positional arguments will cause the program to exit, so at least one positional option with a vector is recommended if you want to allow extraneous arguments.
215 254 If you set `.allow_extras()` on the main `App`, you will not get an error. You can access the missing options using `remaining` (if you have subcommands, `app.remaining(true)` will get all remaining options, subcommands included).
... ... @@ -218,9 +257,7 @@ You can access a vector of pointers to the parsed options in the original order
218 257 If `--` is present in the command line that does not end an unlimited option, then
219 258 everything after that is positional only.
220 259  
221   -
222   -
223   -## Subcommands
  260 +### Subcommands
224 261  
225 262 Subcommands are supported, and can be nested infinitely. To add a subcommand, call the `add_subcommand` method with a name and an optional description. This gives a pointer to an `App` that behaves just like the main app, and can take options or further subcommands. Add `->ignore_case()` to a subcommand to allow any variation of caps to also be accepted. Children inherit the current setting from the parent. You cannot add multiple matching subcommand names at the same level (including ignore
226 263 case).
... ... @@ -235,38 +272,40 @@ All `App`s have a `get_subcommands()` method, which returns a list of pointers t
235 272 For many cases, however, using an app's callback may be easier. Every app executes a callback function after it parses; just use a lambda function (with capture to get parsed values) to `.callback`. If you throw `CLI::Success` or `CLI::RuntimeError(return_value)`, you can
236 273 even exit the program through the callback. The main `App` has a callback slot, as well, but it is generally not as useful.
237 274 You are allowed to throw `CLI::Success` in the callbacks.
238   -Multiple subcommands are allowed, to allow [`Click`][Click] like series of commands (order is preserved).
  275 +Multiple subcommands are allowed, to allow [`Click`][click] like series of commands (order is preserved).
  276 +
  277 +#### Subcommand options
239 278  
240 279 There are several options that are supported on the main app and subcommands. These are:
241 280  
242   -* `.ignore_case()`: Ignore the case of this subcommand. Inherited by added subcommands, so is usually used on the main `App`.
243   -* `.fallthrough()`: Allow extra unmatched options and positionals to "fall through" and be matched on a parent command. Subcommands always are allowed to fall through.
244   -* `.require_subcommand()`: Require 1 or more subcommands.
245   -* `.require_subcommand(N)`: Require `N` subcommands if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default 0 or more.
246   -* `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited.
247   -* `.add_subcommand(name, description="")` Add a subcommand, returns a pointer to the internally stored subcommand.
248   -* `.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line.
249   -* `.get_subcommands(filter)`: The list of subcommands given on the command line.
250   -* `.get_parent()`: Get the parent App or nullptr if called on master App.
251   -* `.get_option(name)`: Get an option pointer by option name
252   -* `.get_options(filter)`: Get the list of all defined option pointers (useful for processing the app for custom output formats).
253   -* `.parse_order()`: Get the list of option pointers in the order they were parsed (including duplicates).
254   -* `.formatter(fmt)`: Set a formatter, with signature `std::string(const App*, std::string, AppFormatMode)`. See Formatting for more details.
255   -* `.get_description()`: Access the description.
256   -* `.parsed()`: True if this subcommand was given on the command line.
257   -* `.name(name)`: Add or change the name.
258   -* `.callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point.
259   -* `.allow_extras()`: Do not throw an error if extra arguments are left over.
260   -* `.prefix_command()`: Like `allow_extras`, but stop immediately on the first unrecognised item. It is ideal for allowing your app or subcommand to be a "prefix" to calling another app.
261   -* `.footer(message)`: Set text to appear at the bottom of the help string.
262   -* `.set_help_flag(name, message)`: Set the help flag name and message, returns a pointer to the created option.
263   -* `.set_help_all_flag(name, message)`: Set the help all flag name and message, returns a pointer to the created option. Expands subcommands.
264   -* `.failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default).
265   -* `.group(name)`: Set a group name, defaults to `"Subcommands"`. Setting `""` will be hide the subcommand.
  281 +- `.ignore_case()`: Ignore the case of this subcommand. Inherited by added subcommands, so is usually used on the main `App`.
  282 +- `.fallthrough()`: Allow extra unmatched options and positionals to "fall through" and be matched on a parent command. Subcommands always are allowed to fall through.
  283 +- `.require_subcommand()`: Require 1 or more subcommands.
  284 +- `.require_subcommand(N)`: Require `N` subcommands if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default 0 or more.
  285 +- `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited.
  286 +- `.add_subcommand(name, description="")` Add a subcommand, returns a pointer to the internally stored subcommand.
  287 +- `.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line.
  288 +- `.get_subcommands(filter)`: The list of subcommands given on the command line.
  289 +- `.get_parent()`: Get the parent App or nullptr if called on master App.
  290 +- `.get_option(name)`: Get an option pointer by option name
  291 +- `.get_options(filter)`: Get the list of all defined option pointers (useful for processing the app for custom output formats).
  292 +- `.parse_order()`: Get the list of option pointers in the order they were parsed (including duplicates).
  293 +- `.formatter(fmt)`: Set a formatter, with signature `std::string(const App*, std::string, AppFormatMode)`. See Formatting for more details.
  294 +- `.get_description()`: Access the description.
  295 +- `.parsed()`: True if this subcommand was given on the command line.
  296 +- `.name(name)`: Add or change the name.
  297 +- `.callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point.
  298 +- `.allow_extras()`: Do not throw an error if extra arguments are left over.
  299 +- `.prefix_command()`: Like `allow_extras`, but stop immediately on the first unrecognised item. It is ideal for allowing your app or subcommand to be a "prefix" to calling another app.
  300 +- `.footer(message)`: Set text to appear at the bottom of the help string.
  301 +- `.set_help_flag(name, message)`: Set the help flag name and message, returns a pointer to the created option.
  302 +- `.set_help_all_flag(name, message)`: Set the help all flag name and message, returns a pointer to the created option. Expands subcommands.
  303 +- `.failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default).
  304 +- `.group(name)`: Set a group name, defaults to `"Subcommands"`. Setting `""` will be hide the subcommand.
266 305  
267 306 > Note: if you have a fixed number of required positional options, that will match before subcommand names. `{}` is an empty filter function.
268 307  
269   -## Configuration file
  308 +### Configuration file
270 309  
271 310 ```cpp
272 311 app.set_config(option_name="",
... ... @@ -297,7 +336,7 @@ Spaces before and after the name and argument are ignored. Multiple arguments ar
297 336 To print a configuration file from the passed
298 337 arguments, use `.config_to_str(default_also=false, prefix="", write_description=false)`, where `default_also` will also show any defaulted arguments, `prefix` will add a prefix, and `write_description` will include option descriptions.
299 338  
300   -## Inheriting defaults
  339 +### Inheriting defaults
301 340  
302 341 Many of the defaults for subcommands and even options are inherited from their creators. The inherited default values for subcommands are `allow_extras`, `prefix_command`, `ignore_case`, `fallthrough`, `group`, `footer`, and maximum number of required subcommands. The help flag existence, name, and description are inherited, as well.
303 342  
... ... @@ -310,7 +349,7 @@ app.option_defaults()-&gt;required();
310 349  
311 350 The default settings for options are inherited to subcommands, as well.
312 351  
313   -## Formatting
  352 +### Formatting
314 353  
315 354 The job of formatting help printouts is delegated to a formatter callable object on Apps and Options. You are free to replace either formatter by calling `formatter(fmt)` on an `App`, where fmt is any copyable callable with the correct signature.
316 355 CLI11 comes with a default App formatter functional, `Formatter`. It is customizable; you can set `label(key, value)` to replace the default labels like `REQUIRED`, and `column_width(n)` to set the width of the columns before you add the functional to the app or option. You can also override almost any stage of the formatting process in a subclass of either formatter. If you want to make a new formatter from scratch, you can do
... ... @@ -319,7 +358,7 @@ that too; you just need to implement the correct signature. The first argument i
319 358 The `AppFormatMode` can be `Normal`, `All`, or `Sub`, and it indicates the situation the help was called in. `Sub` is optional, but the default formatter uses it to make sure expanded subcommands are called with
320 359 their own formatter since you can't access anything but the call operator once a formatter has been set.
321 360  
322   -## Subclassing
  361 +### Subclassing
323 362  
324 363 The App class was designed allow toolkits to subclass it, to provide preset default options (see above) and setup/teardown code. Subcommands remain an unsubclassed `App`, since those are not expected to need setup and teardown. The default `App` only adds a help flag, `-h,--help`, than can removed/replaced using `.set_help_flag(name, help_string)`. You can also set a help-all flag with `.set_help_all_flag(name, help_string)`; this will expand the subcommands (one level only). You can remove options if you have pointers to them using `.remove_option(opt)`. You can add a `pre_callback` override to customize the after parse
325 364 but before run behavior, while
... ... @@ -329,8 +368,7 @@ The most important parse function is `parse(std::vector&lt;std::string&gt;)`, which ta
329 368  
330 369 Also, in a related note, the `App` you get a pointer to is stored in the parent `App` in a `unique_ptr`s (like `Option`s) and are deleted when the main `App` goes out of scope.
331 370  
332   -
333   -## How it works
  371 +### How it works
334 372  
335 373 Every `add_` option you have seen so far depends on one method that takes a lambda function. Each of these methods is just making a different lambda function with capture to populate the option. The function has full access to the vector of strings, so it knows how many times an option was passed or how many arguments it received (flags add empty strings to keep the counts correct). The lambda returns `true` if it could validate the option strings, and
336 374 `false` if it failed.
... ... @@ -339,7 +377,7 @@ Other values can be added as long as they support `operator&gt;&gt;` (and defaults can
339 377  
340 378 If you wanted to extend this to support a completely new type, just use a lambda. An example of a new parser for `complex<double>` that supports all of the features of a standard `add_options` call is in [one of the tests](./tests/NewParseTest.cpp). A simpler example is shown below:
341 379  
342   -### Example
  380 +#### Example
343 381  
344 382 ```cpp
345 383 app.add_option("--fancy-count", [](std::vector<std::string> val){
... ... @@ -347,7 +385,7 @@ app.add_option(&quot;--fancy-count&quot;, [](std::vector&lt;std::string&gt; val){
347 385 });
348 386 ```
349 387  
350   -## Utilities
  388 +### Utilities
351 389  
352 390 There are a few other utilities that are often useful in CLI programming. These are in separate headers, and do not appear in `CLI11.hpp`, but are completely independent and can be used as needed. The `Timer`/`AutoTimer` class allows you to easily time a block of code, with custom print output.
353 391  
... ... @@ -361,9 +399,9 @@ some_long_running_process();
361 399 This will create a timer with a title (default: `Timer`), and will customize the output using the predefined `Big` output (default: `Simple`). Because it is an `AutoTimer`, it will print out the time elapsed when the timer is destroyed at the end of the block. If you use `Timer` instead, you can use `to_string` or `std::cout << timer << std::endl;` to print the time. The print function can be any function that takes two strings, the title and the time, and returns a formatted
362 400 string for printing.
363 401  
364   -## Other libraries
  402 +### Other libraries
365 403  
366   -If you use the excellent [Rang] library to add color to your terminal in a safe, multi-platform way, you can combine it with CLI11 nicely:
  404 +If you use the excellent [Rang][] library to add color to your terminal in a safe, multi-platform way, you can combine it with CLI11 nicely:
367 405  
368 406 ```cpp
369 407 std::atexit([](){std::cout << rang::style::reset;});
... ... @@ -399,81 +437,86 @@ And, in your main function:
399 437 sigaction(SIGINT, &sigIntHandler, nullptr);
400 438 ```
401 439  
402   -## Contributing
  440 +## API
403 441  
404   -To contribute, open an [issue][Github Issues] or [pull request][Github Pull Requests] on GitHub, or ask a question on [gitter]. The is also a short note to contributors [here](./CONTRIBUTING.md).
  442 +The API is [documented here][api-docs]. Also see the [CLI11 tutorial GitBook][gitbook].
405 443  
406   -As of version 1.0, this library is available under a 3-Clause BSD license. See the [LICENSE](./LICENSE) file for details.
  444 +## Contribute
  445 +
  446 +To contribute, open an [issue][github issues] or [pull request][github pull requests] on GitHub, or ask a question on [gitter][]. The is also a short note to contributors [here](./.github/CONTRIBUTING.md).
  447 +This readme roughly follows the [Standard Readme Style][] and includes a mention of almost every feature of the library. More complex features are documented in more detail in the [CLI11 tutorial GitBook][gitbook].
407 448  
408 449 This project was created by [Henry Schreiner](https://github.com/henryiii).
409 450 Significant features and/or improvements to the code were contributed by:
410 451  
411   -* [Anton](https://github.com/SX91)
412   -* [Doug Johnston](https://github.com/dvj)
413   -* [Jonas Nilsson](https://github.com/SkyToGround)
414   -* [Lucas Czech](https://github.com/lczech)
415   -* [Marcus Brinkmann](https://github.com/lambdafu)
416   -* [Mathias Soeken](https://github.com/msoeken)
417   -* [Nathan Hourt](https://github.com/nathanhourt)
418   -* [Sean Fisk](https://github.com/seanfisk)
419   -* [Stéphane Del Pino](https://github.com/delpinux)
420   -
421   -CLI11 was developed at the [University of Cincinnati] to support of the [GooFit] library under [NSF Award 1414736]. Version 0.9 was featured in a [DIANA/HEP] meeting at CERN ([see the slides][DIANA slides]). Please give it a try! Feedback is always welcome.
422   -
423   -
424   -[DOI-badge]: https://zenodo.org/badge/80064252.svg
425   -[DOI-link]: https://zenodo.org/badge/latestdoi/80064252
426   -[travis-badge]: https://img.shields.io/travis/CLIUtils/CLI11/master.svg?label=Linux/macOS
427   -[Travis]: https://travis-ci.org/CLIUtils/CLI11
428   -[appveyor-badge]: https://img.shields.io/appveyor/ci/HenrySchreiner/cli11/master.svg?label=Windows
429   -[AppVeyor]: https://ci.appveyor.com/project/HenrySchreiner/cli11
430   -[codecov-badge]: https://codecov.io/gh/CLIUtils/CLI11/branch/master/graph/badge.svg
431   -[CodeCov]: https://codecov.io/gh/CLIUtils/CLI11
432   -[gitter-badge]: https://badges.gitter.im/CLI11gitter/Lobby.svg
433   -[gitter]: https://gitter.im/CLI11gitter/Lobby
434   -[license-badge]: https://img.shields.io/badge/License-BSD-blue.svg
435   -[conan-badge]: https://api.bintray.com/packages/cliutils/CLI11/CLI11%3Acliutils/images/download.svg
436   -[conan-link]: https://bintray.com/cliutils/CLI11/CLI11%3Acliutils/_latestVersion
437   -[Github Releases]: https://github.com/CLIUtils/CLI11/releases
438   -[Github Issues]: https://github.com/CLIUtils/CLI11/issues
439   -[Github Pull Requests]: https://github.com/CLIUtils/CLI11/pulls
440   -[GooFit]: https://GooFit.github.io
441   -[Plumbum]: https://plumbum.readthedocs.io/en/latest/
442   -[Click]: http://click.pocoo.org
443   -[api-docs]: https://CLIUtils.github.io/CLI11/index.html
444   -[Rang]: https://github.com/agauniyal/rang
445   -[Boost Program Options]: http://www.boost.org/doc/libs/1_63_0/doc/html/program_options.html
446   -[The Lean Mean C++ Option Parser]: http://optionparser.sourceforge.net
447   -[TCLAP]: http://tclap.sourceforge.net
448   -[Cxxopts]: https://github.com/jarro2783/cxxopts
449   -[DocOpt]: https://github.com/docopt/docopt.cpp
450   -[ROOT]: https://root.cern.ch
451   -[cltools-cmake]: https://github.com/CLIUtils/cmake
452   -[GFlags]: https://gflags.github.io/gflags
453   -[GetOpt]: https://www.gnu.org/software/libc/manual/html_node/Getopt.html
454   -[DIANA/HEP]: http://diana-hep.org
455   -[NSF Award 1414736]: https://nsf.gov/awardsearch/showAward?AWD_ID=1414736
456   -[University of Cincinnati]: http://www.uc.edu
457   -[GitBook]: https://cliutils.gitlab.io/CLI11Tutorial
458   -[CLI11 Internals]: https://cliutils.gitlab.io/CLI11Tutorial/chapters/internals.html
459   -[ProgramOptions.hxx]: https://github.com/Fytch/ProgramOptions.hxx
460   -[Argument Aggregator]: https://github.com/vietjtnguyen/argagg
461   -[Args]: https://github.com/Taywee/args
462   -[Argh!]: https://github.com/adishavit/argh
463   -[fmt]: https://github.com/fmtlib/fmt
464   -[Catch]: https://github.com/philsquared/Catch
465   -[Clara]: https://github.com/philsquared/Clara
466   -[Version 1.0 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-10/
467   -[Version 1.3 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-13/
468   -[Version 1.6 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-16/
469   -[wandbox-badge]: https://img.shields.io/badge/try-online-blue.svg
470   -[wandbox-link]: https://wandbox.org/permlink/95DStlyHsquYH3k6
471   -[releases-badge]: https://img.shields.io/github/release/CLIUtils/CLI11.svg
472   -[cli11-po-compare]: https://iscinumpy.gitlab.io/post/comparing-cli11-and-boostpo/
473   -[DIANA slides]: https://indico.cern.ch/event/619465/contributions/2507949/attachments/1448567/2232649/20170424-diana-2.pdf
474   -[Awesome C++]: https://github.com/fffaraz/awesome-cpp/blob/master/README.md#cli
475   -[CLI]: https://codesynthesis.com/projects/cli/
476   -[Single file libs]: https://github.com/nothings/single_file_libs/blob/master/README.md
477   -[codacy-badge]: https://api.codacy.com/project/badge/Grade/ac0df3aead2a4421b02070c3f324a0b9
478   -[codacy-link]: https://www.codacy.com/app/henryiii/CLI11?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=CLIUtils/CLI11&amp;utm_campaign=Badge_Grade
479   -[Hunter]: https://docs.hunter.sh/en/latest/packages/pkg/CLI11.html
  452 +- [Anton](https://github.com/SX91)
  453 +- [Doug Johnston](https://github.com/dvj)
  454 +- [Jonas Nilsson](https://github.com/SkyToGround)
  455 +- [Lucas Czech](https://github.com/lczech)
  456 +- [Marcus Brinkmann](https://github.com/lambdafu)
  457 +- [Mathias Soeken](https://github.com/msoeken)
  458 +- [Nathan Hourt](https://github.com/nathanhourt)
  459 +- [Sean Fisk](https://github.com/seanfisk)
  460 +- [Stéphane Del Pino](https://github.com/delpinux)
  461 +
  462 +## License
  463 +
  464 +As of version 1.0, this library is available under a 3-Clause BSD license. See the [LICENSE](./LICENSE) file for details.
  465 +
  466 +CLI11 was developed at the [University of Cincinnati][] to support of the [GooFit][] library under [NSF Award 1414736][]. Version 0.9 was featured in a [DIANA/HEP][] meeting at CERN ([see the slides][diana slides]). Please give it a try! Feedback is always welcome.
  467 +
  468 +[doi-badge]: https://zenodo.org/badge/80064252.svg
  469 +[doi-link]: https://zenodo.org/badge/latestdoi/80064252
  470 +[travis-badge]: https://img.shields.io/travis/CLIUtils/CLI11/master.svg?label=Linux/macOS
  471 +[travis]: https://travis-ci.org/CLIUtils/CLI11
  472 +[appveyor-badge]: https://img.shields.io/appveyor/ci/HenrySchreiner/cli11/master.svg?label=Windows
  473 +[appveyor]: https://ci.appveyor.com/project/HenrySchreiner/cli11
  474 +[codecov-badge]: https://codecov.io/gh/CLIUtils/CLI11/branch/master/graph/badge.svg
  475 +[codecov]: https://codecov.io/gh/CLIUtils/CLI11
  476 +[gitter-badge]: https://badges.gitter.im/CLI11gitter/Lobby.svg
  477 +[gitter]: https://gitter.im/CLI11gitter/Lobby
  478 +[license-badge]: https://img.shields.io/badge/License-BSD-blue.svg
  479 +[conan-badge]: https://api.bintray.com/packages/cliutils/CLI11/CLI11%3Acliutils/images/download.svg
  480 +[conan-link]: https://bintray.com/cliutils/CLI11/CLI11%3Acliutils/_latestVersion
  481 +[github releases]: https://github.com/CLIUtils/CLI11/releases
  482 +[github issues]: https://github.com/CLIUtils/CLI11/issues
  483 +[github pull requests]: https://github.com/CLIUtils/CLI11/pulls
  484 +[goofit]: https://GooFit.github.io
  485 +[plumbum]: https://plumbum.readthedocs.io/en/latest/
  486 +[click]: http://click.pocoo.org
  487 +[api-docs]: https://CLIUtils.github.io/CLI11/index.html
  488 +[rang]: https://github.com/agauniyal/rang
  489 +[boost program options]: http://www.boost.org/doc/libs/1_63_0/doc/html/program_options.html
  490 +[the lean mean c++ option parser]: http://optionparser.sourceforge.net
  491 +[tclap]: http://tclap.sourceforge.net
  492 +[cxxopts]: https://github.com/jarro2783/cxxopts
  493 +[docopt]: https://github.com/docopt/docopt.cpp
  494 +[gflags]: https://gflags.github.io/gflags
  495 +[getopt]: https://www.gnu.org/software/libc/manual/html_node/Getopt.html
  496 +[diana/hep]: http://diana-hep.org
  497 +[nsf award 1414736]: https://nsf.gov/awardsearch/showAward?AWD_ID=1414736
  498 +[university of cincinnati]: http://www.uc.edu
  499 +[gitbook]: https://cliutils.gitlab.io/CLI11Tutorial
  500 +[cli11 internals]: https://cliutils.gitlab.io/CLI11Tutorial/chapters/internals.html
  501 +[programoptions.hxx]: https://github.com/Fytch/ProgramOptions.hxx
  502 +[argument aggregator]: https://github.com/vietjtnguyen/argagg
  503 +[args]: https://github.com/Taywee/args
  504 +[argh!]: https://github.com/adishavit/argh
  505 +[fmt]: https://github.com/fmtlib/fmt
  506 +[catch]: https://github.com/philsquared/Catch
  507 +[clara]: https://github.com/philsquared/Clara
  508 +[version 1.0 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-10/
  509 +[version 1.3 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-13/
  510 +[version 1.6 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-16/
  511 +[wandbox-badge]: https://img.shields.io/badge/try-online-blue.svg
  512 +[wandbox-link]: https://wandbox.org/permlink/95DStlyHsquYH3k6
  513 +[releases-badge]: https://img.shields.io/github/release/CLIUtils/CLI11.svg
  514 +[cli11-po-compare]: https://iscinumpy.gitlab.io/post/comparing-cli11-and-boostpo/
  515 +[diana slides]: https://indico.cern.ch/event/619465/contributions/2507949/attachments/1448567/2232649/20170424-diana-2.pdf
  516 +[awesome c++]: https://github.com/fffaraz/awesome-cpp/blob/master/README.md#cli
  517 +[cli]: https://codesynthesis.com/projects/cli/
  518 +[single file libs]: https://github.com/nothings/single_file_libs/blob/master/README.md
  519 +[codacy-badge]: https://api.codacy.com/project/badge/Grade/ac0df3aead2a4421b02070c3f324a0b9
  520 +[codacy-link]: https://www.codacy.com/app/henryiii/CLI11?utm_source=github.com&utm_medium=referral&utm_content=CLIUtils/CLI11&utm_campaign=Badge_Grade
  521 +[hunter]: https://docs.hunter.sh/en/latest/packages/pkg/CLI11.html
  522 +[standard readme style]: https://github.com/RichardLitt/standard-readme
... ...
docs/CLI11.svg 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
  3 +
  4 +<svg
  5 + xmlns:dc="http://purl.org/dc/elements/1.1/"
  6 + xmlns:cc="http://creativecommons.org/ns#"
  7 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  8 + xmlns:svg="http://www.w3.org/2000/svg"
  9 + xmlns="http://www.w3.org/2000/svg"
  10 + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  11 + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  12 + width="34.342606mm"
  13 + height="15.300875mm"
  14 + viewBox="0 0 34.342606 15.300875"
  15 + version="1.1"
  16 + id="svg8"
  17 + inkscape:version="0.92.2 (unknown)"
  18 + sodipodi:docname="CLI11.svg"
  19 + inkscape:export-filename="/data/CLI11_300.png"
  20 + inkscape:export-xdpi="222.62143"
  21 + inkscape:export-ydpi="222.62143">
  22 + <defs
  23 + id="defs2" />
  24 + <sodipodi:namedview
  25 + id="base"
  26 + pagecolor="#ffffff"
  27 + bordercolor="#666666"
  28 + borderopacity="1.0"
  29 + inkscape:pageopacity="0.0"
  30 + inkscape:pageshadow="2"
  31 + inkscape:zoom="11.206433"
  32 + inkscape:cx="93.996945"
  33 + inkscape:cy="15.843961"
  34 + inkscape:document-units="mm"
  35 + inkscape:current-layer="layer1"
  36 + showgrid="false"
  37 + inkscape:window-width="2560"
  38 + inkscape:window-height="1347"
  39 + inkscape:window-x="0"
  40 + inkscape:window-y="1"
  41 + inkscape:window-maximized="1"
  42 + fit-margin-top="0"
  43 + fit-margin-left="0"
  44 + fit-margin-right="0"
  45 + fit-margin-bottom="0" />
  46 + <metadata
  47 + id="metadata5">
  48 + <rdf:RDF>
  49 + <cc:Work
  50 + rdf:about="">
  51 + <dc:format>image/svg+xml</dc:format>
  52 + <dc:type
  53 + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  54 + <dc:title></dc:title>
  55 + </cc:Work>
  56 + </rdf:RDF>
  57 + </metadata>
  58 + <g
  59 + inkscape:label="Layer 1"
  60 + inkscape:groupmode="layer"
  61 + id="layer1"
  62 + transform="translate(-53.018986,-23.9019)">
  63 + <g
  64 + id="g4602"
  65 + transform="rotate(-0.28559572,70.190289,31.552338)">
  66 + <path
  67 + inkscape:connector-curvature="0"
  68 + id="path3732"
  69 + transform="scale(0.26458333)"
  70 + d="m 233.33789,90.337891 -32.95117,28.619139 31.94726,28.91406 64.9004,0.29688 32.95117,-28.61914 -31.94727,-28.914064 z"
  71 + style="fill:#008080;stroke-width:0.54128456" />
  72 + <path
  73 + inkscape:connector-curvature="0"
  74 + style="fill:none;stroke:#ffffff;stroke-width:0.3148967;stroke-miterlimit:4;stroke-dasharray:none"
  75 + d="m 62.120274,24.413292 -8.32335,7.065988 8.069765,7.138804 16.393615,0.0733 8.32335,-7.065988 -8.069768,-7.138806 z"
  76 + id="path3774" />
  77 + </g>
  78 + <g
  79 + id="g4609"
  80 + transform="translate(-0.43472687)">
  81 + <path
  82 + inkscape:transform-center-y="0.00020894337"
  83 + inkscape:transform-center-x="0.0229185"
  84 + inkscape:connector-curvature="0"
  85 + id="path3730"
  86 + d="m 60.964519,27.804182 c 0.886395,-0.348655 1.859691,-0.390207 2.74248,-0.111952 0.651274,0.210103 1.042699,0.454066 1.576252,0.972044 l -1.506657,0.592635 c -0.744252,-0.446473 -1.423964,-0.497745 -2.270962,-0.164583 -0.738662,0.290549 -1.26082,0.814436 -1.498695,1.510755 -0.203801,0.580557 -0.182185,1.300104 0.05025,1.891033 0.534609,1.359137 2.079298,2.048044 3.418738,1.521183 0.699266,-0.275052 1.11846,-0.713017 1.465328,-1.565931 l 1.585527,-0.623658 c -0.04824,1.554281 -1.023053,2.892949 -2.510224,3.47792 -2.127345,0.836779 -4.497206,-0.187252 -5.322363,-2.28505 -0.809661,-2.058401 0.211919,-4.404734 2.270322,-5.214396 z"
  87 + style="fill:#ffffff;stroke-width:0.14321487" />
  88 + <path
  89 + inkscape:connector-curvature="0"
  90 + id="path3728"
  91 + transform="scale(0.26458333)"
  92 + d="m 253.49609,104.47266 h 5.48047 v 24.32031 h 9.03906 v 5.24023 h -14.51953 z"
  93 + style="fill:#ffffff;stroke-width:0.54128456" />
  94 + <path
  95 + inkscape:connector-curvature="0"
  96 + id="path3726"
  97 + transform="scale(0.26458333)"
  98 + d="m 271.07422,104.47266 h 5.48047 v 29.56054 h -5.48047 z"
  99 + style="fill:#ffffff;stroke-width:0.54128456" />
  100 + <path
  101 + inkscape:connector-curvature="0"
  102 + id="path3724"
  103 + transform="scale(0.26458333)"
  104 + d="m 294.68555,104.47266 v 29.56054 h -5.32032 v -24.56054 h -3.71875 z"
  105 + style="fill:#ffffff;stroke-width:0.54128456" />
  106 + <path
  107 + inkscape:connector-curvature="0"
  108 + id="path3705"
  109 + transform="scale(0.26458333)"
  110 + d="m 305.76758,104.47266 v 29.56054 h -5.32031 v -24.56054 h -3.71875 z"
  111 + style="fill:#ffffff;stroke-width:0.54128456" />
  112 + </g>
  113 + </g>
  114 +</svg>
... ...
docs/CLI11_100.png 0 → 100644

3.28 KB

docs/CLI11_300.png 0 → 100644

9.72 KB