diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-04-10 11:29:57 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:22:22 +0200 |
commit | c5357cc0bf59e60dd59f2b2a032245afd73e4acd (patch) | |
tree | 7b774b36e3eb11144e96f2b535ba124b2c0ea377 | |
parent | c607f49004d2a85ada3ce7ed2296e99a33498205 (diff) |
Set default format to "xml"
-rw-r--r-- | src/cli/Main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cli/Main.cpp b/src/cli/Main.cpp index 1bd3725..a8d5bd8 100644 --- a/src/cli/Main.cpp +++ b/src/cli/Main.cpp @@ -124,8 +124,8 @@ int main(int argc, char **argv) "found.")( "output,o", po::value<std::string>(&outputPath), "The output file name. Per default the input file name will be used.")( - "format,F", po::value<std::string>(&format)->required(), - "The output format that shall be produced.")( + "format,F", po::value<std::string>(&format), + "The output format that shall be produced (default is \"xml\").")( "flat,f", po::bool_switch(&flat)->default_value(false), "Works only for XML output. This serializes all referenced ontologies " "and typesystems into the output file." @@ -196,7 +196,11 @@ int main(int argc, char **argv) logger.note(std::string("Using ") + outputPath + std::string(" as output path.")); } - // check format. + + // check format, default to "xml" + if (format.empty()) { + format = "xml"; + } if (!formats.count(format)) { logger.error("Format must be one of: "); for (auto &f : formats) { |