11 #define BOOST_ALL_STATIC_LIB 1
12 #define BOOST_PROGRAM_OPTIONS_STATIC_LIB 1
14 #include <boost/program_options.hpp>
18 namespace opt = boost::program_options;
106 opt::options_description desc(
"Options");
110 (
"generate",
"Generate strings with given parameters")
111 (
"train",
"Train model with given parameters")
112 (
"combine",
"Combine")
113 (
"import", opt::value<std::string>(),
"Import model file")
114 (
"output", opt::value<std::string>(),
"Output model file. This model will be exported when done. Will be ignored for generation mode")
115 (
"dataset", opt::value<std::string>(),
"Dataset file to read input from training. Will be ignored for generation mode")
116 (
"seperator", opt::value<
char>(),
"Seperator character to use with training data. (character between occurence and value)")
117 (
"wordlist", opt::value<std::string>(),
"Wordlist file path to export generation results to. Will be ignored for training mode")
118 (
"count", opt::value<
int>(),
"Number of lines to generate. Ignored in training mode")
119 (
"verbosity",
"Output verbosity")
120 (
"help",
"Option definitions");
122 opt::variables_map vm;
124 opt::store(opt::parse_command_line(argc, argv, desc), vm);
129 if (vm.count(
"help")) {
130 std::cout << desc << std::endl;
134 else if (vm.count(
"output") == 1) {
140 std::cout <<
"UNIDENTIFIED INPUT" << std::endl;
141 std::cout << desc << std::endl;
146 else if (vm.count(
"dataset") == 1) {
151 std::cout <<
"UNIDENTIFIED INPUT" << std::endl;
152 std::cout << desc << std::endl;
157 else if (vm.count(
"wordlist") == 1) {
162 std::cout <<
"UNIDENTIFIED INPUT" << std::endl;
163 std::cout << desc << std::endl;
167 else if (vm.count(
"import") == 1) {
173 std::cout <<
"UNIDENTIFIED INPUT" << std::endl;
174 std::cout << desc << std::endl;
179 else if (vm.count(
"count") == 1) {
184 std::cout <<
"UNIDENTIFIED INPUT" << std::endl;
185 std::cout << desc << std::endl;
220 void setProgramOptions(
bool i,
bool e,
bool bf,
char s, std::string iName, std::string exName, std::string oName, std::string dName,
int n) {