[Tracker] Write an extractor in python?



Hi!

I'm writing a small python application (torb.blogspot.se) for
typesetting flash cards.

As part of this I use Tracker to keep track of card decks. Right now I
just get all nfo:FileDataObject with my mime-type, which works fine,
but I would also like to store metadata.

To do this I see two possibilites:
1. If my query returns a deck that does not have proper metadata,
extract and insert it.

2. Write an extractor. This would make my application simpler (less
code for checking the queries, no need for extra threading and
updating the UI when metadata is available).
Looking at the documentation for libtracker-extract, this looks pretty
straight forward in C. I would like to write it in python though (to
reuse existing code, using C would make distributing a lot harder).

So, I have a couple of questions:
1. Is it possible to write an extractor in Python (googling doesn't
reveal anything)? If so,

2. How should I go about implementing an extractor in python?

3. How do I register my extractor with Tracker?

If/when I get this working, I promise to post a tutorial:)

Greetings,
Tor-bjÃrn Claesson



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