Commit 80e2c70b63567f00e92720ee85087289eb3ee97a
1 parent
1619e863
Better links and one more mention
Showing
1 changed file
with
33 additions
and
31 deletions
README.md
| 1 | -[![Build Status Linux and macOS][travis-badge]][travis-link] | |
| 2 | -[![Build Status Windows][appveyor-badge]][appveyor-link] | |
| 3 | -[![Code Coverage][codecov-badge]][codecov-link] | |
| 4 | -[![Join the chat at https://gitter.im/CLI11gitter/Lobby][gitter-badge]][gitter-link] | |
| 1 | +[![Build Status Linux and macOS][travis-badge]][Travis] | |
| 2 | +[![Build Status Windows][appveyor-badge]][AppVeyor] | |
| 3 | +[![Code Coverage][codecov-badge]][CodeCov] | |
| 4 | +[![Join the chat at https://gitter.im/CLI11gitter/Lobby][gitter-badge]][gitter] | |
| 5 | 5 | [![License: LGPL v2.1][license-badge]](./LICENSE) |
| 6 | 6 | |
| 7 | 7 | # CLI11: Command line parser for C++11 |
| 8 | 8 | |
| 9 | 9 | 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. |
| 10 | -It is tested on [Travis][travis-link] and [AppVeyor][appveyor-link], and is being included in the [GooFit GPU fitting framework][goofit-link]. It was inspired by [`plumbum.cli`][plumbum-link] for Python. CLI11 has both a user friendly introduction here, as well as [API documentation][api-docs] generated by Travis. | |
| 10 | +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 both a user friendly introduction here, as well as [API documentation][api-docs] generated by Travis. | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | ### Why write another CLI parser? |
| ... | ... | @@ -18,7 +18,7 @@ An acceptable CLI parser library should be all of the following: |
| 18 | 18 | * Short Syntax: This is one of the main points of 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. |
| 19 | 19 | * C++11 or better: Should work with GCC 4.7+ (such as GCC 4.8 on CentOS 7) or above, or Clang 3.5+, or MSVC 2015+. (Note: for CLI11, Clang 3.4 only fails because of tests, GoogleMock does not support it.) |
| 20 | 20 | * Work on Linux, macOS, and Windows. |
| 21 | -* Well tested using [Travis][travis-link] (Linux and macOS) and [AppVeyor][appveyor-link] (Windows). "Well" is defined as having good coverage measured by [CodeCov][codecov-link]. | |
| 21 | +* Well tested using [Travis] (Linux and macOS) and [AppVeyor] (Windows). "Well" is defined as having good coverage measured by [CodeCov]. | |
| 22 | 22 | * Clear help printing. |
| 23 | 23 | * Standard shell idioms supported naturally, like grouping flags, a positional separator, etc. |
| 24 | 24 | * Easy to execute, with help, parse errors, etc. providing correct exit and details. |
| ... | ... | @@ -30,10 +30,11 @@ An acceptable CLI parser library should be all of the following: |
| 30 | 30 | |
| 31 | 31 | The major CLI parsers for C++ include: |
| 32 | 32 | |
| 33 | -* [Boost Program Options][boost-link]: 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. | |
| 34 | -* [The Lean Mean C++ Option Parser][optionparser-link]: 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. | |
| 35 | -* [TCLAP][tclap-link]: 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. | |
| 36 | -* [Cxxopts][cxxopts-link]: 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. | |
| 33 | +* [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. | |
| 34 | +* [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. | |
| 35 | +* [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. | |
| 36 | +* [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. | |
| 37 | +* [DocOpt]: Completely different approach to program options in C++11, you write the docs and the interface is generated. Too fragile and specialized. | |
| 37 | 38 | |
| 38 | 39 | So, this library was designed to provide a great syntax, good compiler compatibility, and minimal installation fuss. |
| 39 | 40 | |
| ... | ... | @@ -42,9 +43,9 @@ So, this library was designed to provide a great syntax, good compiler compatibi |
| 42 | 43 | This library was built to supply the Application object for the GooFit CUDA/OMP fitting library. Before version 2.0 of GooFit is released, this library will reach version 1.0 status. The current tasks still planned are: |
| 43 | 44 | |
| 44 | 45 | * Collect user feedback |
| 45 | -* Evaluate compatibility with [ROOT][root-link]'s TApplication object. | |
| 46 | +* Evaluate compatibility with [ROOT]'s TApplication object. | |
| 46 | 47 | |
| 47 | -See the [changelog](./CHANGELOG.md) or [GitHub releases][github-releases] for details. | |
| 48 | +See the [changelog](./CHANGELOG.md) or [GitHub Releases] for details. | |
| 48 | 49 | |
| 49 | 50 | ## Features not supported by this library |
| 50 | 51 | |
| ... | ... | @@ -60,7 +61,7 @@ As you probably have guessed, the list of features above are all covered by this |
| 60 | 61 | |
| 61 | 62 | To use, there are two methods: |
| 62 | 63 | |
| 63 | -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. | |
| 64 | +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. | |
| 64 | 65 | 2. Checkout the repository and add as a subdirectory for CMake. You can use the `cli` interface target when linking. (CMake 3.4+ recommended) Or, use the `AddCLI.cmake` supplied in [CLIUtils cmake helpers][cltools-cmake]. |
| 65 | 66 | |
| 66 | 67 | To build the tests, checkout the repository and use CMake: |
| ... | ... | @@ -235,7 +236,7 @@ app.add_option("--fancy-count", [](std::vector<std::string> val){ |
| 235 | 236 | |
| 236 | 237 | ## Contributing |
| 237 | 238 | |
| 238 | -To contribute, open an [issue][github-issues] or [pull request][github-pull] on GitHub, or ask a question on [gitter][gitter-link]. | |
| 239 | +To contribute, open an [issue][Github Issues] or [pull request][Github Pull Requests] on GitHub, or ask a question on [gitter]. | |
| 239 | 240 | |
| 240 | 241 | ## Utilities |
| 241 | 242 | |
| ... | ... | @@ -253,7 +254,7 @@ string for printing. |
| 253 | 254 | |
| 254 | 255 | ## Other libraries |
| 255 | 256 | |
| 256 | -If you use the [`rang`][rang-link] library to add color to your terminal in a safe, multi-platform way, you can combine it with CLI11 nicely: | |
| 257 | +If you use the [Rang] library to add color to your terminal in a safe, multi-platform way, you can combine it with CLI11 nicely: | |
| 257 | 258 | |
| 258 | 259 | ```cpp |
| 259 | 260 | std::atexit([](){std::cout << rang::style::reset;}); |
| ... | ... | @@ -269,25 +270,26 @@ This will print help in blue, errors in red, and will reset before returning the |
| 269 | 270 | |
| 270 | 271 | |
| 271 | 272 | [travis-badge]: https://img.shields.io/travis/CLIUtils/CLI11/master.svg?label=Linux/macOS |
| 272 | -[travis-link]: https://travis-ci.org/CLIUtils/CLI11 | |
| 273 | +[Travis]: https://travis-ci.org/CLIUtils/CLI11 | |
| 273 | 274 | [appveyor-badge]: https://img.shields.io/appveyor/ci/HenrySchreiner/cli11/master.svg?label=Windows |
| 274 | -[appveyor-link]: https://ci.appveyor.com/project/HenrySchreiner/cli11 | |
| 275 | +[AppVeyor]: https://ci.appveyor.com/project/HenrySchreiner/cli11 | |
| 275 | 276 | [codecov-badge]: https://codecov.io/gh/CLIUtils/CLI11/branch/master/graph/badge.svg |
| 276 | -[codecov-link]: https://codecov.io/gh/CLIUtils/CLI11 | |
| 277 | +[CodeCov]: https://codecov.io/gh/CLIUtils/CLI11 | |
| 277 | 278 | [gitter-badge]: https://badges.gitter.im/CLI11gitter/Lobby.svg |
| 278 | -[gitter-link]: https://gitter.im/CLI11gitter/Lobby | |
| 279 | +[gitter]: https://gitter.im/CLI11gitter/Lobby | |
| 279 | 280 | [license-badge]: https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg |
| 280 | -[github-releases]: https://github.com/CLIUtils/CLI11/releases | |
| 281 | -[github-issues]: https://github.com/CLIUtils/CLI11/issues | |
| 282 | -[github-pull]: https://github.com/CLIUtils/CLI11/pulls | |
| 283 | -[goofit-link]: https://GooFit.github.io | |
| 284 | -[plumbum-link]: https://plumbum.readthedocs.io/en/latest/ | |
| 285 | -[click-link]: http://click.pocoo.org | |
| 281 | +[Github Releases]: https://github.com/CLIUtils/CLI11/releases | |
| 282 | +[Github Issues]: https://github.com/CLIUtils/CLI11/issues | |
| 283 | +[Github Pull Requests]: https://github.com/CLIUtils/CLI11/pulls | |
| 284 | +[Goofit]: https://GooFit.github.io | |
| 285 | +[Plumbum]: https://plumbum.readthedocs.io/en/latest/ | |
| 286 | +[Click]: http://click.pocoo.org | |
| 286 | 287 | [api-docs]: https://CLIUtils.github.io/CLI11/index.html |
| 287 | -[rang-link]: https://github.com/agauniyal/rang | |
| 288 | -[boost-link]: http://www.boost.org/doc/libs/1_63_0/doc/html/program_options.html | |
| 289 | -[optionparser-link]: http://optionparser.sourceforge.net | |
| 290 | -[tclap-link]: http://tclap.sourceforge.net | |
| 291 | -[cxxopts-link]: https://github.com/jarro2783/cxxopts | |
| 292 | -[root-link]: https://root.cern.ch | |
| 288 | +[Rang]: https://github.com/agauniyal/rang | |
| 289 | +[Boost Program Options]: http://www.boost.org/doc/libs/1_63_0/doc/html/program_options.html | |
| 290 | +[The Lean Mean C++ Option Parser]: http://optionparser.sourceforge.net | |
| 291 | +[TCLAP]: http://tclap.sourceforge.net | |
| 292 | +[Cxxopts]: https://github.com/jarro2783/cxxopts | |
| 293 | +[DocOpt]: https://github.com/docopt/docopt.cpp | |
| 294 | +[ROOT]: https://root.cern.ch | |
| 293 | 295 | [cltools-cmake]: https://github.com/CLIUtils/cmake | ... | ... |