Re: [Tracker] Using tracker extractors from other applications



Nikolaus Rath <Nikolaus-BTH8mxji4b0 public gmane org> writes:
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.

This seems to work fine for the OpenOffice file:
but for the plain text file, there are no contents:

Upon closer investigation, get_metadata() fails whenever it encounters a
text/plain file that contains a '['. Looking at the code, this does not
seem surprising.

Is the format of the string that's returned by GetMetadata() described
somewhere? Then I could try to fix the parser.


Best,

   -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]