Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
5b0138a5
Commit
5b0138a5
authored
Nov 29, 2010
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
add wcclparser -Q "query", make it the positonal arg instead of the tagset
parent
4a9e4049
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wcclparser/main.cpp
+9
-1
9 additions, 1 deletion
wcclparser/main.cpp
with
9 additions
and
1 deletion
wcclparser/main.cpp
+
9
−
1
View file @
5b0138a5
...
...
@@ -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
())
{
//
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment