GNOME Bugzilla – Bug 751991
Add `tracker extract` command to commandline interface
Last modified: 2016-07-14 01:23:33 UTC
Patch attached.
Created attachment 306866 [details] [review] cli: Add `tracker extract` command This wraps `$libexecdir/tracker-extract --file`. I think that the extractor is a really important part of Tracker that needs to be accessible in a standard way. Currently the output of `tracker-extract --file` contains a lot of log information even with `--verbosity=0`. And dumping the result as a SPARQL UPDATE operation isn't ideal, it'd be nicer to output Turtle or something.
This looks really good to me. It's similar to 'tracker index -f <FILE>', but it will only do the second pass indexing, not the first pass. One thing that is missing is the documentation MAN page AFAICS. The only other thought I had, was that I wondered if a -v option should be made available because we're often passing that to tracker-extract too. Assuming Carlos is happy with this too, please go ahead. Thanks again :)
Review of attachment 306866 [details] [review]: Thanks again Sam
In terms of a man page, `man tracker-extract` already opens the manual for /usr/libexec/tracker-extract. This seems a bit wrong -- we put it in libexec because we don't expect it to be run directly, I think? So we should probably *not* provide a manpage for /usr/libexec/tracker-extract, and rewrite `man tracker-extract` in terms of this new `tracker extract` command. Any user-facing functionality will be documented there and exposed in `tracker extract`, and the stuff that's only used internally will be hidden. I agree about --verbose option too.
Created attachment 325546 [details] [review] [PATCH 1/4] Make `tracker-extract --file` silent when --verbosity=0
Created attachment 325547 [details] [review] [PATCH 2/4] cli: Add `tracker extract` command
Created attachment 325548 [details] [review] [PATCH 3/4] Rewrite tracker-extract man page
Created attachment 325549 [details] [review] [PATCH 4/4] cli: Add --verbosity option to `tracker extract`
These patches are also pushed to wip/sam/extract-command in tracker.git
Created attachment 329505 [details] [review] cli: Add `tracker extract` command This wraps `$libexecdir/tracker-extract --file`. I think that the extractor is a really important part of Tracker that needs to be accessible in a standard way. Currently the output of `tracker-extract --file` contains a lot of log information even with `--verbosity=0`. And dumping the result as a SPARQL UPDATE operation isn't ideal, it'd be nicer to output Turtle or something.
Created attachment 329506 [details] [review] cli: Add --verbosity option to `tracker extract` This is based on the --set-log-verbosity option from `tracker daemon`. The TRACKER_VERBOSITY environment variable also works here, and overrides the value on the commandline, so I'm not sure if this patch is really necessary...
Created attachment 329507 [details] [review] Rewrite tracker-extract man page It now corresponds with the user-facing `tracker-extract` command, rather than the hidden /usr/libexec/tracker-extract program.
Comment on attachment 329505 [details] [review] cli: Add `tracker extract` command Looks good!
Comment on attachment 329506 [details] [review] cli: Add --verbosity option to `tracker extract` Sure
Comment on attachment 329507 [details] [review] Rewrite tracker-extract man page Makes sense :), I'm not too fond of the libexec daemon manpages.
Merged, thanks for the review!