44 std::vector<std::string_view> args(argv + 1, argv + argc);
46 for (
auto it = args.begin(), end = args.end(); it != end && !options.
show_help; ++it)
48 if (*it ==
"-h" || *it ==
"--help")
54 if (*it ==
"-b" || *it ==
"--batch")
60 if (*it ==
"-c" || *it ==
"--config")
64 options.
err_msg =
"Missing config file parameter.";
69 std::filesystem::path path = *it;
70 if (path.extension() !=
".toml")
73 options.
err_msg =
"Config file must be a TOML file.\n";
80 if (*it ==
"-o" || *it ==
"--output")
84 options.
err_msg =
"Missing output file parameter.";
89 std::filesystem::path path = *it;
90 if (path.extension() !=
".toml")
92 path.replace_extension(
".toml");
98 if (*it ==
"-i" || *it ==
"--input")
102 options.
err_msg =
"Missing input string parameter.";
110 options.
err_msg =
"Unknown or invalid parameter option rule constraint '" +
111 std::string(*it) +
"' passed.";
119 options.
err_msg =
"Missing mandatory options (--config and --input are "