3 #include "sparql_parser.h"
8 * $ ./spotlight2sparql '_kMDItemGroupId=="11"'
10 * $ ./spotlight2sparql '*=="test*"cwd||kMDItemTextContent=="test*"cwd'
14 int main(int argc
, char **argv
)
20 printf("usage: %s QUERY\n", argv
[0]);
24 slq
= talloc_zero(NULL
, struct sl_query
);
26 printf("talloc error\n");
30 slq
->query_string
= argv
[1];
31 slq
->path_scope
= "/foo/bar";
33 ok
= map_spotlight_to_sparql_query(slq
);
34 printf("%s\n", ok
? slq
->sparql_query
: "*mapping failed*");