[Vobject] Adding X-WR-CALNAME parameters to vCalendar
Richard Taylor
rjt-pyconuk at thegrindstone.me.uk
Fri Jun 4 16:41:04 CDT 2010
On 04/06/2010 19:43, Jeffrey Harris wrote:
> Hi Richard,
>
>> Is there a way to add extension parameters to vCalenders?
>
> Yup. There's nothing special about X- ContentLines, they're just like any other. The only wrinkle is that when directly accessing a property using vobject's custom getattr logic, you need to convert dashes to underscores, so:
>
>>>> cal = vobject.iCalendar()
>>>> cal.add('x-wr-calname')
> <X-WR-CALNAME{}>
>>>> cal.x_wr_calname.value = "Some named calendar"
>>>> cal.x_wr_calname
> <X-WR-CALNAME{}Some named calendar>
>
Brilliant, thanks Jeffrey.
Richard
More information about the VObject
mailing list