nop77svk/wtwd

external config file for default settings

Opened this issue · 3 comments

To allow users to use their own settings/options without specifying them all the time via CLI, add an XML/JSON-based config file to the CLI app. Priority of resolution then will be:

  1. CLI-supplied settings
  2. Config-file settings
  3. Hardcoded (C# code) settings

Both XML and JSON can be dealt with via annotations to the CLI class.

Search path for the config file should be

  1. %USERPROFILE%\AppData\Local\wtwd.config
  2. %USERPROFILE%\AppData\Roaming\wtwd.config
  3. %APP FOLDER%\wtwd.config

to allow for user-specific defaults.

In case multiple config files exist within the paths, prioritize them and merge their CLI values according to their priority.

The config file structure should be documented somehow. Either in github README or via CLI --help.