After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751991 - Add `tracker extract` command to commandline interface
Add `tracker extract` command to commandline interface
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-07-05 18:31 UTC by Sam Thursfield
Modified: 2016-07-14 01:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cli: Add `tracker extract` command (6.86 KB, patch)
2015-07-05 18:34 UTC, Sam Thursfield
needs-work Details | Review
[PATCH 1/4] Make `tracker-extract --file` silent when --verbosity=0 (2.13 KB, patch)
2016-04-07 15:41 UTC, Sam Thursfield
none Details | Review
[PATCH 2/4] cli: Add `tracker extract` command (7.33 KB, patch)
2016-04-07 15:42 UTC, Sam Thursfield
none Details | Review
[PATCH 3/4] Rewrite tracker-extract man page (3.27 KB, patch)
2016-04-07 15:42 UTC, Sam Thursfield
none Details | Review
[PATCH 4/4] cli: Add --verbosity option to `tracker extract` (4.01 KB, patch)
2016-04-07 15:42 UTC, Sam Thursfield
none Details | Review
cli: Add `tracker extract` command (7.76 KB, patch)
2016-06-09 20:03 UTC, Sam Thursfield
committed Details | Review
cli: Add --verbosity option to `tracker extract` (4.00 KB, patch)
2016-06-09 20:04 UTC, Sam Thursfield
committed Details | Review
Rewrite tracker-extract man page (3.27 KB, patch)
2016-06-09 20:04 UTC, Sam Thursfield
committed Details | Review

Description Sam Thursfield 2015-07-05 18:31:50 UTC
Patch attached.
Comment 1 Sam Thursfield 2015-07-05 18:34:45 UTC
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.
Comment 2 Martyn Russell 2015-07-10 12:09:51 UTC
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 :)
Comment 3 Martyn Russell 2015-07-10 12:10:40 UTC
Review of attachment 306866 [details] [review]:

Thanks again Sam
Comment 4 Sam Thursfield 2016-04-07 14:43:03 UTC
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.
Comment 5 Sam Thursfield 2016-04-07 15:41:50 UTC
Created attachment 325546 [details] [review]
[PATCH 1/4] Make `tracker-extract --file` silent when --verbosity=0
Comment 6 Sam Thursfield 2016-04-07 15:42:06 UTC
Created attachment 325547 [details] [review]
[PATCH 2/4] cli: Add `tracker extract` command
Comment 7 Sam Thursfield 2016-04-07 15:42:21 UTC
Created attachment 325548 [details] [review]
[PATCH 3/4] Rewrite tracker-extract man page
Comment 8 Sam Thursfield 2016-04-07 15:42:37 UTC
Created attachment 325549 [details] [review]
[PATCH 4/4] cli: Add --verbosity option to `tracker extract`
Comment 9 Sam Thursfield 2016-04-07 15:43:20 UTC
These patches are also pushed to wip/sam/extract-command in tracker.git
Comment 10 Sam Thursfield 2016-06-09 20:03:46 UTC
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.
Comment 11 Sam Thursfield 2016-06-09 20:04:01 UTC
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...
Comment 12 Sam Thursfield 2016-06-09 20:04:30 UTC
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 13 Carlos Garnacho 2016-07-12 09:49:44 UTC
Comment on attachment 329505 [details] [review]
cli: Add `tracker extract` command

Looks good!
Comment 14 Carlos Garnacho 2016-07-12 09:51:20 UTC
Comment on attachment 329506 [details] [review]
cli: Add --verbosity option to `tracker extract`

Sure
Comment 15 Carlos Garnacho 2016-07-12 09:52:08 UTC
Comment on attachment 329507 [details] [review]
Rewrite tracker-extract man page

Makes sense :), I'm not too fond of the libexec daemon manpages.
Comment 16 Sam Thursfield 2016-07-14 01:23:23 UTC
Merged, thanks for the review!