Re: [Evolution-hackers] Query Evolution's Calendar Data storage location



On Sun, 2015-09-13 at 16:41 +0200, Tom wrote:
I need any method to query Evolution data.

        Hi,
okay. Do you need it from within the Evolution or from a 3rd-party
application?

I assume that using the Evolution 3.x series, I happen to find the
calendar data in ~/.local/share/evolution/calendar/system ?
Is the calendar.ics file all that's containing data ?
Should I be able to find and filter calendar data there ?

Well, all the above depends on the calendar type. In any case, you
shouldn't access those files directly, rather connect to the calendar
through the evolution-data-server interface. The structure you are
looking for is the ECalClient.

Is here anyone aware of a method to query the calendar data for some
kind of result to 'select all entries where category=studienkreis' or
'select all entries where summary contains / is like "thisname"' ?

Again, from within the Evolution, or from a 3rd-party application? 

Within the Evolution, choose menu Search->Edit saved searches and add
there the search you are interested in. Then just pick it from the
Search menu and you'll get the result. Note there is always applied a
time constraint, but you can search forward and backward with the top-
right arrows beside the Search field above the calendar view.

In case of a 3rd-party application, you can get some inspiration with
these source tests:
https://git.gnome.org/browse/evolution-data-server/tree/tests/libecal/c
lient/test-cal-client-get-object-list.c

https://git.gnome.org/browse/evolution-data-server/tree/tests/libecal/c
lient/test-cal-client-get-view.c

The difference between one-time query with get_object_list() and the
view is that the view is a live view, aka if the calendar receives a
new event which is part of the view then you'll be notified with
certain signal, the same for removal from the view (when it doesn't
conform to the given filter anymore) and for event modifications.

It needs to be run on more than 1 PC, so please don't ask for
Evolution version, there are many from 3.2 to 3.actual I guess.

The availability of the above search arrows depends on the Evolution
version, somehow. And it's possible that some changes meantime (the gap
between 3.2 and 3.16/3.18 is really huge) may make your filters work
better with newer version.
        Bye,
        Milan


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