Commit acee69a8cce47f3ad4195df5334e65a73e3f047a

Authored by Henry Fredrick Schreiner
1 parent 59a36565

Update changelog and contributers

[skip ci]
Showing 2 changed files with 13 additions and 5 deletions
CHANGELOG.md
1   -## Version 1.8: Sets and Flags (IN PROGRESS)
  1 +## Version 1.8: Transformers, default strings, and flags
2 2  
3   -Set handling has been completely replaced by a new backend that works as a Validator. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by `->capture_default_str()` (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions.
  3 +Set handling has been completely replaced by a new backend that works as a Validator or Transformer. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by `->capture_default_str()` (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions.
4 4  
5 5 * Replaced default help capture: `.add_option("name", value, "", True)` becomes `.add_option("name", value)->capture_default_str()` [#242]
6 6 * Added `.always_capture_default()` [#242]
7 7 * New `CLI::IsMember` validator replaces set validation [#222]
8 8 * IsMember also supports container of pairs, transform allows modification of result [#228]
  9 +* Added new Transformers, `CLI::AsNumberWithUnit` and `CLI::AsSizeValue` [#253]
9 10 * Much more powerful flags with different values [#211], general types [#235]
10 11 * `add_option` now supports bool due to unified bool handling [#211]
11 12 * Support for composable unnamed subcommands [#216]
... ... @@ -22,7 +23,7 @@ Set handling has been completely replaced by a new backend that works as a Valid
22 23 * Better alignment on multiline descriptions [#269]
23 24 * Better support for aarch64 [#266]
24 25 * Respect `BUILD_TESTING` only if CLI11 is the main project; otherwise, `CLI11_TESTING` must be used [#277]
25   -* Drop auto-detection of experimental optional; must be enabled explicitly (too fragile) [#277]
  26 +* Drop auto-detection of experimental optional and boost::optional; must be enabled explicitly (too fragile) [#277] [#279]
26 27  
27 28 > ### Converting from CLI11 1.7:
28 29 >
... ... @@ -52,11 +53,13 @@ Set handling has been completely replaced by a new backend that works as a Valid
52 53 [#242]: https://github.com/CLIUtils/CLI11/pull/242
53 54 [#247]: https://github.com/CLIUtils/CLI11/pull/247
54 55 [#251]: https://github.com/CLIUtils/CLI11/pull/251
  56 +[#253]: https://github.com/CLIUtils/CLI11/pull/253
55 57 [#262]: https://github.com/CLIUtils/CLI11/pull/262
56 58 [#265]: https://github.com/CLIUtils/CLI11/pull/265
57 59 [#266]: https://github.com/CLIUtils/CLI11/pull/266
58 60 [#269]: https://github.com/CLIUtils/CLI11/pull/269
59 61 [#277]: https://github.com/CLIUtils/CLI11/pull/277
  62 +[#279]: https://github.com/CLIUtils/CLI11/pull/279
60 63  
61 64  
62 65 ## Version 1.7.1: Quick patch
... ...
README.md
... ... @@ -341,8 +341,8 @@ CLI11 has several Validators built-in that perform some common checks
341 341 - `CLI::IsMember(...)`: 🚧 Require an option be a member of a given set. See [Transforming Validators](#transforming-validators) for more details.
342 342 - `CLI::Transformer(...)`: 🚧 Modify the input using a map. See [Transforming Validators](#transforming-validators) for more details.
343 343 - `CLI::CheckedTransformer(...)`: 🚧 Modify the input using a map, and require that the input is either in the set or already one of the outputs of the set. See [Transforming Validators](#transforming-validators) for more details.
344   -- `CLI::AsNumberWithUnit(...)`: Modify the `<NUMBER> <UNIT>` pair by matching the unit and multiplying the number by the corresponding factor. It can be used as a base for transformers, that accept things like size values (`1 KB`) or durations (`0.33 ms`).
345   -- `CLI::AsSizeValue(...)`: Convert inputs like `100b`, `42 KB`, `101 Mb`, `11 Mib` to absolute values. `KB` can be configured to be interpreted as 10^3 or 2^10.
  344 +- `CLI::AsNumberWithUnit(...)`:🚧 Modify the `<NUMBER> <UNIT>` pair by matching the unit and multiplying the number by the corresponding factor. It can be used as a base for transformers, that accept things like size values (`1 KB`) or durations (`0.33 ms`).
  345 +- `CLI::AsSizeValue(...)`: 🚧 Convert inputs like `100b`, `42 KB`, `101 Mb`, `11 Mib` to absolute values. `KB` can be configured to be interpreted as 10^3 or 2^10.
346 346 - `CLI::ExistingFile`: Requires that the file exists if given.
347 347 - `CLI::ExistingDirectory`: Requires that the directory exists.
348 348 - `CLI::ExistingPath`: Requires that the path (file or directory) exists.
... ... @@ -788,6 +788,11 @@ Significant features and/or improvements to the code were contributed by:
788 788 - [ncihneg](https://github.com/ncihneg) <!-- Quoting strings in INI generation -->
789 789 - [Fred Helmesjö](https://github.com/helmesjo) <!-- `->description()` -->
790 790 - [Rafi Wiener](https://github.com/rafiw) <!-- INI, +ive validators and vector separators -->
  791 + [elszon](https://github.com/elszon) <!-- Formatting in multiline string -->
  792 + [ryan4729](https://github.com/ryan4729) <!-- AArch64 support -->
  793 + [Andrew Hardin](https://github.com/andrew-hardin) <!-- Fixing two warnings -->
  794 + [Paul le Roux](https://github.com/pleroux0) <!-- Arch independent CMake Config -->
  795 +- [Viacheslav Kroilov](https://github.com/metopa) <!-- AsNumberWithUnit and AsSizeValue -->
791 796  
792 797  
793 798 ## License
... ...