Skip to content
Snippets Groups Projects
Commit 5b0138a5 authored by ilor's avatar ilor
Browse files

add wcclparser -Q "query", make it the positonal arg instead of the tagset

parent 4a9e4049
No related merge requests found
......@@ -136,6 +136,7 @@ bool process_line(const std::string& line, Parser& parser)
int main(int argc, char** argv)
{
std::string tagset_load = "kipi";
std::string query = "";
bool quiet = false;
using boost::program_options::value;
......@@ -143,13 +144,15 @@ int main(int argc, char** argv)
desc.add_options()
("tagset,t", value(&tagset_load),
"Tagset to use\n")
("query,Q", value(&query),
"Query to run (disables interactive mode)\n")
("quiet,q", value(&quiet)->zero_tokens(),
"Suppress messages\n")
("help,h", "Show help")
;
boost::program_options::variables_map vm;
boost::program_options::positional_options_description p;
p.add("tagset", -1);
p.add("query", -1);
try {
boost::program_options::store(
......@@ -176,6 +179,11 @@ int main(int argc, char** argv)
Parser parser(tagset);
if (!query.empty()) {
process_line(query, parser);
return 0;
}
if (clear_screen()) {
//
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment