Re: [Tracker] Using tracker extractors from other applications
- From: Ivan Frade <ivan frade gmail com>
- To: Nikolaus Rath <Nikolaus rath org>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] Using tracker extractors from other applications
- Date: Thu, 18 Nov 2010 22:41:34 +0200
Hi,
On Wed, Nov 17, 2010 at 5:16 PM, Nikolaus Rath
<Nikolaus rath org> wrote:
> On 17/11/10 00:02, Nikolaus Rath wrote:
>
This gives me the following result:
...
So it seems that I still have to parse the entire string. Is there a way
to get the data in more structured form?
We have code in python doing that for our extraction test cases. Check the class ExtractorHelper in:
Basically:
extractor = ExtractorHelper ()
results = extractor.get_metadata (filename)
results is a dictionary with property as key, and a list of values as value. There are few tricks in the translation property->key (because of anonymous nodes)... but i think that with some prints you can figure out how it works.
In our tests we don't specify the mimetype and they work fine.
Hope this helps.
Ivan
Also, with a plain text document
tracker.GetMetadata('file:///home/nikratio/misc/Victoria.tex', 'text/plain')
I do not get any contents:
(dbus.String(u''), dbus.String(u' a nfo:PlainTextDocument .\n'))
Am I doing something wrong?
And finally, is there a way to omit the mime type and have tracker
determine it automatically?
Thanks!
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
_______________________________________________
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]