Closed StarGate01 closed 3 years ago
Use CLI11 for this
Possibly a YAML-like config - simple key : value storage.
Also "#" comments? Would be nice to add descriptions built-in to the config.
The library we already use for command line parsing, CLI11, also supports reading config files in TOML or INI format. The library internally manages the merging of cli arguments and config file entries.
See: https://github.com/CLIUtils/CLI11/blob/master/README.md#configuration-file
I see, it does both. That's the way to go then.
Great reference as well.
By default, the file config.ini
is loaded if it exists. The current configuration is printed at game start. Command line arguments take precedence over the config file.
Overridable by CLI arguments