[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Help with iCalendar Gem

CParticle

4/4/2008 4:04:00 AM

Hi,

Does anyone have any experience with the iCalendar Gem.

I'm having trouble understanding how to make changes to my ics once
its been read in and I've found and the event I want to change.

#read events from ics file
ics_calendar_file = File.open("mycalendar.ics")
cals = Icalendar.parse(ics_calendar_file)
myICSArray = cals.first


#parse the vcal so that information can be updated
parsedVCAL = Icalendar.parse(my_vCal_string)
#modify the event in place
myICSArray.find_event(parsedVCal.uid) = parsedVCal

For some reason the above code didn't work

Also does anyone know if the icalendar Gem can support all the
icalendar features. Basically I'd like to sync against some events
that are coming over as text. Even more specifically I'm trying to
sync a MS Exchange calendar with an ics file via IMAP. I can get
stuff to and from IMAP and have them show as proper events. Now I
need to know how to get stuff through to ICS. I'd prefer to us the
icalendar Gem so I can avoid some extra parsing logic, but Ican go
without.

If any one can help that would be awesome. I'd be happy to post my
script once I get it running.

Thanks.

CParticle
3 Answers

Gregory Seidman

4/4/2008 12:19:00 PM

0

On Fri, Apr 04, 2008 at 01:05:17PM +0900, CParticle wrote:
> Does anyone have any experience with the iCalendar Gem.
[...]

I found the vpim gem both more functional and more obviously (to me)
organized than the iCalendar gem. I recommend it. I am using it in my
project <http://calterm.rubyforg... with great success. Over the coming
months I expect to participate in developing CalDAV support for it (i.e.
for vpim, so I can use it in CalTerm).

> Thanks.
> CParticle
--Greg


CParticle

4/4/2008 5:15:00 PM

0

On Apr 4, 8:19 am, Gregory Seidman <gsslist+r...@anthropohedron.net>
wrote:
> On Fri, Apr 04, 2008 at 01:05:17PM +0900, CParticle wrote:
> > Does anyone have any experience with the iCalendar Gem.
>
> [...]
>
> I found the vpim gem both more functional and more obviously (to me)
> organized than the iCalendar gem. I recommend it. I am using it in my
> project <http://calterm.rubyforg... with great success. Over the coming
> months I expect to participate in developing CalDAV support for it (i.e.
> for vpim, so I can use it in CalTerm).
>
> > Thanks.
> > CParticle
>
> --Greg

Greg,

Without getting to deep how does vpim handle and ics file does it
break it down to an array of objects like icalendar or does it do
something different. I'm just trying to avoid having to redo code for
a different methodology.

Thanks

CParticle

Gregory Seidman

4/5/2008 3:47:00 PM

0

On Sat, Apr 05, 2008 at 02:15:17AM +0900, CParticle wrote:
> On Apr 4, 8:19 am, Gregory Seidman <gsslist+r...@anthropohedron.net>
> wrote:
> > On Fri, Apr 04, 2008 at 01:05:17PM +0900, CParticle wrote:
> > > Does anyone have any experience with the iCalendar Gem.
> >
> > [...]
> >
> > I found the vpim gem both more functional and more obviously (to me)
> > organized than the iCalendar gem. I recommend it. I am using it in my
> > project <http://calterm.rubyforg... with great success. Over the coming
> > months I expect to participate in developing CalDAV support for it (i.e.
> > for vpim, so I can use it in CalTerm).
> >
> > > Thanks.
> > > CParticle
> >
> > --Greg
>
> Greg,
>
> Without getting to deep how does vpim handle and ics file does it
> break it down to an array of objects like icalendar or does it do
> something different. I'm just trying to avoid having to redo code for
> a different methodology.

A Vpim::Icalendar provides an events accessor that contains a collection of
events, if that's what you mean.

> Thanks
> CParticle
--Greg