Re: [Tracker] Writing custom extractors docs?



Hi,

On Fri, Feb 5, 2010 at 6:32 AM, Spivak, Max <spivak lab126 com> wrote:

How is the custom extractor registered with tracker-extract? Is it just that the libextract-<abc>.so is present in the lib/tracker-extract/tracker-0.7/extract-modules directory or is something else necessary?

You can also take a look to this "dummy" extractor module we have as example in the repository:
http://git.gnome.org/browse/tracker/tree/src/tracker-extract/dummy.c

You need to build your GModule, and install it in $PREFIX/lib/tracker-extract/tracker-0.7/extract-modules


Is there a registry that maps a document's file extension to its mimetype? Say I have a <filename>.abc -- what maps it to libextract-abc.so. This is especially interesting if I have custom documents for which I invented an extension and a mime type.

Basically the module "announce" in an struct what mimetypes can extract, and what function needs to be called per mimetype. The name of the module itself is not important (but please choose something descriptive!)

The result of the called function needs to be Sparql (check the dummy about how to use the SparQL building API)

I've run across some posts that tracker will/may use LibStreamAnalysers from Strigi. Should I use LSA for my extractors or not?

LSA support is kind of frozen. Some missing bits in the library prevented us from using it and we lost the oportunity window to move to LSA, but is something we would like to do at some point. If you want to write a extractor module today, i strongly suggest to use the classic module API.

Regards,

Ivan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]