Convert Raw data into CalendarData(ics format)

103 views
Skip to first unread message

Imran

unread,
Feb 17, 2011, 7:15:06 AM2/17/11
to SabreDAV Discussion
Hi devs,

I have raw data(plain text) in my application's database.

To enable the CalDAV, those data(events) need to be stored in .ics
format.

What is the easy way for convert plain data into .ics format?

Does SabreDAV has any such kind of helper method?


Thanks

-Imran

Evert Pot

unread,
Feb 17, 2011, 10:21:12 AM2/17/11
to SabreDAV Discussion
Yes,

On Feb 17, 1:15 pm, Imran <im...@allies.co.in> wrote:
> Hi devs,
>
> I have raw data(plain text) in my application's database.
>
> To enable the CalDAV, those data(events) need to be stored in .ics
> format.
>
> What is the easy way for convert plain data into .ics format?

Since SabreDAV 1.4, there's a VObject library, specifically for this.

Blogpost here:
http://www.rooftopsolutions.nl/blog/icalendar-vcard-parser-for-php

You still need to know a little bit about the format to work with it,
but it should make things a little easier.

An example of the sourcecode that also uses this library:
http://code.google.com/p/sabredav/source/browse/lib/Sabre/CalDAV/ICSExportPlugin.php#73

That specific example takes a list of ICS files, parses them and
merges them into one.

Hopefully it helps, but you likely will need to look at the iCalendar
specification for details on the format. The helper library just deals
with the syntax.

Evert
Reply all
Reply to author
Forward
0 new messages