Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to get my mind around Zeitgeist, using the Python DBus API.

To get the latest accessed files and application is not so hard, here is what I do:

#! /usr/bin/env python

from zeitgeist.client import ZeitgeistDBusInterface
from zeitgeist.datamodel import Event, Interpretation, TimeRange, \
 StorageState, ResultType

zg = ZeitgeistDBusInterface()
events = zg.FindEvents(
 TimeRange.always(),
 [Event.new_for_values(interpretation=Interpretation.ACCESS_EVENT)],
 StorageState.Available, 3, ResultType.MostRecentEvents)

for e in events:
    event = Event(e)
    subjects = event.get_subjects()
    for s in subjects:
        print "subject", s.text, s.uri

The interpretation flag Interpretation.ACCESS_EVENT returns all matching events, i.e. files and application accessed. Much more interpretation flags are available, but I do not succeed in getting results from events other than with Interpretation.EVENT_INTERPRETATION and its subclasses. More specifically I would like to access Interpretation.DATA_CONTAINER and its subclass, but it never returns any result.

So am I doing something wrong in that case? Could you suggest anything?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.