Re: VTIMEZONE in Events from Evolution



I forgot to mention,

a good way to hack and test the python bindings without breaking your systems installed copy is to do the following

./autogen,sh --prefix /opt/cvs/
make && make install

then run conduit with

PYTHONPATH=/opt/cvs/lib/python2.5/site-packages/gtk-2.0/evolution python conduit/start_conduit.py

Those paths are from memory, but you should be able to work out the correct ones should I have made a mistake

John

On 9/2/07, John Stowers <john stowers gmail com> wrote:
The new function is now in SVN

from evolution import ecal
cal = ecal.open_calendar_source('file:///home/john/.evolution/calendar/local/system',ecal.CAL_SOURCE_TYPE_EVENT)
c = cal.get_all_objects()[0]

print cal.get_object_as_string(c)

ouputs the following

BEGIN:VCALENDAR
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20070902T140000
DTEND:20070902T160000
SUMMARY:Test
UID:20070902T111432Z-8866-1000-1-0 nzjrs-uni
DTSTAMP:20070902T111432Z
CREATED:20070902T111432
LAST-MODIFIED:20070902T111451
X-LIC-ERROR;X-LIC-ERRORTYPE=VALUE-PARSE-ERROR:No value for DESCRIPTION
 property. Removing entire property:
SEQUENCE:1
END:VEVENT
END:VCALENDAR

Is this ok for your needs?

John


On 8/30/07, Paul Novotny <paul novotny gmail com> wrote:
Great! Will I see the changes in evolution-python?

On Tue, 2007-08-28 at 22:23 +1200, John Stowers wrote:
> Just a quick note to say I have added this, and should be able to
> commit it tomorrow
>
> John
>
> On 8/24/07, Paul Novotny <paul novotny gmail com> wrote:
>         I am working on the google Calendar dataprovider, and it looks
>         like I
>         need to get the VTIMEZONE along with the VEVENT from
>         EvoCalendarTwoWay
>         dataprovider.
>
>         I did a little digging and it looks like evolution's libecal
>         has a
>         function for this, but I don't know how to expose it in
>         evolution-python. Can anyone help me out?
>
>         Here is the function I think I need, it is in
>         evolution-data-server/calendar/libecal/e-cal.h
>
>         /**
>         * e_cal_get_component_as_string:
>         * @ecal: A calendar client.
>         * @icalcomp: A calendar component object.
>         *
>         * Gets a calendar component as an iCalendar string, with a
>         toplevel
>         * VCALENDAR component and all VTIMEZONEs needed for the
>         component.
>         *
>         * Return value: the component as a complete iCalendar string,
>         or NULL
>         on
>         * failure. The string should be freed after use.
>         **/
>         char*
>         e_cal_get_component_as_string (ECal *ecal, icalcomponent
>         *icalcomp)
>
>
>
>         _______________________________________________
>         Conduit-list mailing list
>         Conduit-list gnome org
>         http://mail.gnome.org/mailman/listinfo/conduit-list
>





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