let set_string_option r s = r := Some s
let specs = align [
- "-c", Set count, " write the number of results only";
+ "-c", Set count,
+ " write the number of results only";
"--count", Set count, " ";
- "-s", Set stats, " display timing and various statistics";
+ "-s", Set stats,
+ " display timing and various statistics";
"--stats", Set stats, " ";
- "-d", String (set_string_option input_file), " specify the input document file [default stdin]";
+ "-d", String (set_string_option input_file),
+ " specify the input document file [default stdin]";
"--doc", String (set_string_option input_file), " ";
- "-o", String (set_string_option output_file), " specify the output file [default stdout]";
+ "-o", String (set_string_option output_file),
+ " specify the output file [default stdout]";
"--out", String (set_string_option output_file), " ";
- "-C", Set compose, " compose queries: each query is applied to the results of the previous one [default run all queries
-from the root node]";
+ "-C", Set compose,
+ " compose queries: each query is applied to the results of the \
+previous one [default run all queries from the root node]";
"--compose", Set compose, " ";
- "-p", Set parallel, " run all queries in parallel [default run all queries sequentially]";
+ "-p", Set parallel,
+ " run all queries in parallel [default run all queries \
+sequentially]";
"--parallel", Set parallel, " ";
]
-let usage_msg = Printf.sprintf "usage: %s [options] query [query ... query]" Sys.argv.(0)
+let usage_msg =
+ Printf.sprintf "usage: %s [options] query [query ... query]" Sys.argv.(0)
let usage () = usage specs usage_msg
match !queries with
[] -> raise (Arg.Bad "missing query")
| l -> queries := List.rev l
-