From chuckssmith at gmail.com Fri Jan 5 11:27:55 2007 From: chuckssmith at gmail.com (Chuck Smith) Date: Fri, 5 Jan 2007 17:27:55 +0100 Subject: [iCalendar-devel] parsing rrule from ical Message-ID: <171116790701050827k58f581f0oe52b16880050735f@mail.gmail.com> Hi, I'm a relatively new Ruby developer and I'm trying to convert an ical file into a MySQL database table. The biggest problem I have is how to parse rrule. Here is some sample event data from my ics file: BEGIN:VEVENT UID:-TTT-MONDAKALENDARO-ORG-__PUBLIC__-0000000122 SUMMARY:Esperanta Kurso(Tenerife) DESCRIPTION:Hodia??\, 21-an de februaro\, okazas la malfermo de la 8-a Libervola Seminario por la universitata komunumo ??e la Fakultato pri Filologio : "Enkonduka Seminario pri Esperanto kaj ??ia kulturo" ??e la Universitato de La Laguna\, Tenerifo\, Departamento de Angla kaj Germana Filologio ( http://www.ull.es )\, Campus de Guajara\, ES-38071 La Laguna-. \n \nLa kurso da??re estas gvidata kaj organizata de la Prof. Alejandro LOPEZ DE VERGARA M?(c)ndez ( aflopez. at .ull.es - http://webpages.ull.es/users/aflopez/esp/index.htm ) kaj ??i okazos ??iuj mardoj- de la 18.30 ??is la 20.30- ??is junio. LOCATION:aflopez. at .ull.es CLASS:PUBLIC STATUS:CONFIRMED DTSTART;VALUE=DATETIME:20060314T000000 DTSTAMP:20070105T151604Z RRULE:FREQ=DAILY;UNTIL la 20060314T160000Z END:VEVENT When I try to see event.dtend.to_s or event.end.to_s they only show nothing. If I try to look at event.rrule.to_s I get an error. Is there any examples I can view, so I can see how to grab this data? I read that there are test cases, but I do not understand how to view them. Any help you could provide would be greatly appreciated. Thanks! Chuck From larry.karnowski at gmail.com Fri Jan 5 14:07:48 2007 From: larry.karnowski at gmail.com (Larry Karnowski) Date: Fri, 5 Jan 2007 14:07:48 -0500 Subject: [iCalendar-devel] parsing rrule from ical In-Reply-To: <171116790701050827k58f581f0oe52b16880050735f@mail.gmail.com> References: <171116790701050827k58f581f0oe52b16880050735f@mail.gmail.com> Message-ID: <2b27183e0701051107v4261e2bdp7eb8bdc96f2e6633@mail.gmail.com> Chuck, There are a couple of problems here: 1) There's no event.rrule method. Use event.recurrence_rules instead. 2) Your RRULE line looks wrong. The UNTIL should have a = in it, like this example from the spec: RRULE:FREQ=DAILY;UNTIL=19971224T000000Z Also, the tests are included in the gem. If you look where your gems are installed on your system, most likely a /var/lib/gems or a /var/lib/ruby/gems or similar, then if you look down deep enough you'll find an icalendar-0.97 directory. There's a "test" directory there with unit tests in the Ruby language. They might help you. I'm hacking in my spare time on extending the RRULE support so that it's no longer just a string but an object model. No word on when I'll be done, but I'll post patches to this list if I get something useful working. Hope this helps, Larry On 1/5/07, Chuck Smith wrote: > Hi, > > I'm a relatively new Ruby developer and I'm trying to convert an ical > file into a MySQL database table. The biggest problem I have is how > to parse rrule. Here is some sample event data from my ics file: > > BEGIN:VEVENT > UID:-TTT-MONDAKALENDARO-ORG-__PUBLIC__-0000000122 > SUMMARY:Esperanta Kurso(Tenerife) > DESCRIPTION:Hodia??\, 21-an de februaro\, okazas la malfermo de la 8-a > Libervola Seminario por la universitata komunumo ??e la Fakultato pri > Filologio : "Enkonduka Seminario pri Esperanto kaj ??ia kulturo" ??e > la Universitato de La Laguna\, Tenerifo\, Departamento de Angla kaj > Germana Filologio ( http://www.ull.es )\, Campus de Guajara\, ES-38071 > La Laguna-. \n \nLa kurso da??re estas gvidata kaj organizata de la > Prof. Alejandro LOPEZ DE VERGARA M?(c)ndez ( aflopez. at .ull.es - > http://webpages.ull.es/users/aflopez/esp/index.htm ) kaj ??i okazos > ??iuj mardoj- de la 18.30 ??is la 20.30- ??is junio. > LOCATION:aflopez. at .ull.es > CLASS:PUBLIC > STATUS:CONFIRMED > DTSTART;VALUE=DATETIME:20060314T000000 > DTSTAMP:20070105T151604Z > RRULE:FREQ=DAILY;UNTIL la 20060314T160000Z > END:VEVENT > > When I try to see event.dtend.to_s or event.end.to_s they only show > nothing. If I try to look at event.rrule.to_s I get an error. Is > there any examples I can view, so I can see how to grab this data? I > read that there are test cases, but I do not understand how to view > them. Any help you could provide would be greatly appreciated. > > Thanks! > Chuck > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel > From chuckssmith at gmail.com Fri Jan 5 18:49:29 2007 From: chuckssmith at gmail.com (Chuck Smith) Date: Sat, 6 Jan 2007 00:49:29 +0100 Subject: [iCalendar-devel] parsing rrule from ical In-Reply-To: <2b27183e0701051107v4261e2bdp7eb8bdc96f2e6633@mail.gmail.com> References: <171116790701050827k58f581f0oe52b16880050735f@mail.gmail.com> <2b27183e0701051107v4261e2bdp7eb8bdc96f2e6633@mail.gmail.com> Message-ID: <171116790701051549y411d9b49v8205dbb3f22f1440@mail.gmail.com> > 1) There's no event.rrule method. Use event.recurrence_rules instead. This worked!! Thanks so much for your help! > I'm hacking in my spare time on extending the RRULE support so that > it's no longer just a string but an object model. No word on when > I'll be done, but I'll post patches to this list if I get something > useful working. Ok, I'll be looking forward to it. Best wishes, Chuck From r.oth at gmx.net Mon Jan 8 11:37:13 2007 From: r.oth at gmx.net (Roland Oth) Date: Mon, 08 Jan 2007 17:37:13 +0100 Subject: [iCalendar-devel] setting calendar properties/parameters Message-ID: <20070108163713.19950@gmx.net> Is there any way the set @calendar parameters "METHOD" or "X-WR-CALNAME",X-WR-TIMEZONE,X-WR-CALDESC such as: METHOD:PUBLISH X-WR-CALNAME:Veranstaltungen im Wald X-WR-TIMEZONE:Europe/Rome X-WR-CALDESC:Veranstaltungen im Wald I tried @cal.x_wr_calname ="Veranstaltungen im Wald". But this stores the parameter as "x-wr_calname" << Note the underscore When I tried this I got an Error @cal.x_wr-calname="Veranst.." NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occured while evaluating nil.- I also played around with the ip_ prefix, but i could not find a working solution. Thank You Roland -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer From brandon at collectiveidea.com Thu Jan 18 23:51:06 2007 From: brandon at collectiveidea.com (Brandon Keepers) Date: Thu, 18 Jan 2007 23:51:06 -0500 Subject: [iCalendar-devel] svn repo? Message-ID: <2BFBF2C5-82FD-4737-8FD7-1B1035B8E86F@collectiveidea.com> Hey Jeff, I was just curious if you have a svn repository available for icalendar? I'm working on implementing a ruby CalDAV client, and I'd like to use your icalendar library to handle the files. I've found a few bugs and would like to make some improvements, and it will be easier to make patches against a repo. Thanks, Brandon -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/icalendar-devel/attachments/20070118/3ce460ed/attachment.bin From greg.martin at gmail.com Mon Jan 22 23:16:12 2007 From: greg.martin at gmail.com (Greg Martin) Date: Mon, 22 Jan 2007 20:16:12 -0800 Subject: [iCalendar-devel] DateTime output Message-ID: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> I believe there may be an issue with the DateTime output in the conversions.rb file. As it currently is, no timezone data is output in the string ie: DTSTART:20061218T180000 I've found by changing these lines: # UTC time gets a Z suffix if utc s << "Z" end to s << self.zone I get a line like this: DTSTART:20061218T180000Z Which is then properly handled by my ICS consumer (Google Calendar and ICal). Does this seem like a valid fix or am I missing some other timezone support? Thanks, Greg Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070122/ecc9370d/attachment.html From steven.aerts at gmail.com Tue Jan 23 04:32:36 2007 From: steven.aerts at gmail.com (Steven Aerts) Date: Tue, 23 Jan 2007 10:32:36 +0100 Subject: [iCalendar-devel] icalendar can not parse 'PERCENT-COMPLETE' Message-ID: <200701231032.36929.steven.aerts@gmail.com> Hello, I think I have found a bug in the icalendar implementation. It is not possible to parse the 'PERCENT-COMPLETE' property (as described in: http://tools.ietf.org/html/rfc2445#section-4.8.1.8). I suggest to alias the 'percent' property of 'component/todo.rb' as 'percent_complete'. This can easily be done by altering line 28 of 'component/todo.rb' from: ical_property :percent to: ical_property :percent, :percent_complete Keep on the good work, Steven -------------- next part -------------- A non-text attachment was scrubbed... Name: test.ics Type: text/calendar Size: 373 bytes Desc: not available Url : http://rubyforge.org/pipermail/icalendar-devel/attachments/20070123/2b3b8e8b/attachment-0001.bin From jeff at rosejn.net Tue Jan 23 07:48:03 2007 From: jeff at rosejn.net (Jeff Rose) Date: Tue, 23 Jan 2007 13:48:03 +0100 Subject: [iCalendar-devel] svn repo? In-Reply-To: <2BFBF2C5-82FD-4737-8FD7-1B1035B8E86F@collectiveidea.com> References: <2BFBF2C5-82FD-4737-8FD7-1B1035B8E86F@collectiveidea.com> Message-ID: <45B60403.5040904@rosejn.net> Hi Brandon, I'm spending the day on icalendar, and I wanted to get in touch with you. Currently the svn repository is not publicly available, but I just put in the request to rubyforge to get it moved over there so it can run on their systems. If you want to give me your rubyforge login I can make you a developer on the project and we can try working on the same tree. Right now I'm going through mail: applying patches and fixing bugs people sent in. If you want to send me a diff of your current changes to icalendar I'll work them in, and then when subversion is setup we can work on a unified branch. Cheers, Jeff Brandon Keepers wrote: > Hey Jeff, > > I was just curious if you have a svn repository available for > icalendar? I'm working on implementing a ruby CalDAV client, and I'd > like to use your icalendar library to handle the files. I've found a > few bugs and would like to make some improvements, and it will be easier > to make patches against a repo. > > Thanks, > Brandon > > > ------------------------------------------------------------------------ > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel From jeff at rosejn.net Tue Jan 23 12:42:15 2007 From: jeff at rosejn.net (Jeff Rose) Date: Tue, 23 Jan 2007 18:42:15 +0100 Subject: [iCalendar-devel] DateTime output In-Reply-To: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> References: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> Message-ID: <45B648F7.6070809@rosejn.net> Just went through the spec again to figure out how this works, and it's a bit of a pain. There are two options for specifying time in an ical file. If you use local time, then you just use the regular format and you do not include a 'Z'. If you are specifying the time in UTC then you include the 'Z'. Just using UTC all the time makes the most sense, to get around timezone confusions, but many people just use local time. There is another timezone format, where the UTC offset is added to the end of the string, and this is what would result if you use the fix you include. The specifically say this is not allowed in the spec though, so it probably worked for you because you are using UTC, but on my machine here in Switzerland it is different: Time.now.zone => "CET" DateTime.now.zone => "+0100" These would incorrectly add garbage to the end of the string... So yeah, I'm not sure what the best solution is. By default right now times are considered local, but maybe we should have a simple way to specify that a given calendar or calendar component is using UTC time instead? -Jeff Greg Martin wrote: > I believe there may be an issue with the DateTime output in the > conversions.rb file. > > As it currently is, no timezone data is output in the string ie: > > DTSTART:20061218T180000 > > I've found by changing these lines: > > # UTC time gets a Z suffix > if utc > s << "Z" > end > > to > > s << self.zone > > I get a line like this: > > DTSTART:20061218T180000Z > > Which is then properly handled by my ICS consumer (Google Calendar and > ICal). > > Does this seem like a valid fix or am I missing some other timezone support? > > Thanks, > Greg Martin > > > ------------------------------------------------------------------------ > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel From greg.martin at gmail.com Tue Jan 23 12:48:15 2007 From: greg.martin at gmail.com (Greg Martin) Date: Tue, 23 Jan 2007 09:48:15 -0800 Subject: [iCalendar-devel] DateTime output In-Reply-To: <45B648F7.6070809@rosejn.net> References: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> <45B648F7.6070809@rosejn.net> Message-ID: <8bc673ad0701230948n41074aafh956dc1886bf4c588@mail.gmail.com> Yeah, I think a simple method for specifying UTC or local would probably cover 99% of the need. I have run into this because I am working with data coming out of Microsoft Exchange which as far as I can tell is always in UTC. Thanks, greg On 1/23/07, Jeff Rose wrote: > > Just went through the spec again to figure out how this works, and it's > a bit of a pain. There are two options for specifying time in an ical > file. If you use local time, then you just use the regular format and > you do not include a 'Z'. If you are specifying the time in UTC then > you include the 'Z'. Just using UTC all the time makes the most sense, > to get around timezone confusions, but many people just use local time. > > There is another timezone format, where the UTC offset is added to the > end of the string, and this is what would result if you use the fix you > include. The specifically say this is not allowed in the spec though, > so it probably worked for you because you are using UTC, but on my > machine here in Switzerland it is different: > > Time.now.zone => "CET" > DateTime.now.zone => "+0100" > > These would incorrectly add garbage to the end of the string... > > So yeah, I'm not sure what the best solution is. By default right now > times are considered local, but maybe we should have a simple way to > specify that a given calendar or calendar component is using UTC time > instead? > > -Jeff > > Greg Martin wrote: > > I believe there may be an issue with the DateTime output in the > > conversions.rb file. > > > > As it currently is, no timezone data is output in the string ie: > > > > DTSTART:20061218T180000 > > > > I've found by changing these lines: > > > > # UTC time gets a Z suffix > > if utc > > s << "Z" > > end > > > > to > > > > s << self.zone > > > > I get a line like this: > > > > DTSTART:20061218T180000Z > > > > Which is then properly handled by my ICS consumer (Google Calendar and > > ICal). > > > > Does this seem like a valid fix or am I missing some other timezone > support? > > > > Thanks, > > Greg Martin > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > icalendar-devel mailing list > > icalendar-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/icalendar-devel > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070123/938d182d/attachment.html From jeff at rosejn.net Tue Jan 23 12:56:50 2007 From: jeff at rosejn.net (Jeff Rose) Date: Tue, 23 Jan 2007 18:56:50 +0100 Subject: [iCalendar-devel] New Release In-Reply-To: <45B648F7.6070809@rosejn.net> References: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> <45B648F7.6070809@rosejn.net> Message-ID: <45B64C62.7000201@rosejn.net> Hi everyone, Sorry for the mailing list spam today, but I've been trying to get things organized and on track with icalendar while I have a bit of time again. I just posted a new release to rubyforge, and it would be great if people could upgrade their gems or download the latest tarball to let me know if you run into any problems. This round fixes a couple bugs that people have reported since the last release, so give it a try with your nastiest calendars and send in bug reports if you find problems. Cheers, and thanks a lot for your contributions and feedback! -Jeff From brandon at collectiveidea.com Tue Jan 23 13:14:38 2007 From: brandon at collectiveidea.com (Brandon Keepers) Date: Tue, 23 Jan 2007 13:14:38 -0500 Subject: [iCalendar-devel] DateTime output In-Reply-To: <45B648F7.6070809@rosejn.net> References: <8bc673ad0701222016i57834ata99dce5f653081d7@mail.gmail.com> <45B648F7.6070809@rosejn.net> Message-ID: <8CD2910B-8F4C-4795-9421-9609A38CDC51@collectiveidea.com> On Jan 23, 2007, at 12:42 PM, Jeff Rose wrote: > Just went through the spec again to figure out how this works, and > it's > a bit of a pain. There are two options for specifying time in an ical > file. If you use local time, then you just use the regular format and > you do not include a 'Z'. If you are specifying the time in UTC then > you include the 'Z'. Just using UTC all the time makes the most > sense, > to get around timezone confusions, but many people just use local > time. Using UTC all the time sounds like a good idea, but you run into problems with recurrence rules (like an event on first Monday of every month, where the UTC time is actually Sunday, will skip any Monday that falls on the 1st of the month). > So yeah, I'm not sure what the best solution is. By default right now > times are considered local, but maybe we should have a simple way to > specify that a given calendar or calendar component is using UTC time > instead? I'd like to see all the timezone related stuff tied into the tzinfo gem, and actually add proper VTIMEZONE definitions. Brandon -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/icalendar-devel/attachments/20070123/54824003/attachment.bin From gauldong at gmail.com Sun Jan 28 21:24:22 2007 From: gauldong at gmail.com (Hendy Irawan) Date: Mon, 29 Jan 2007 02:24:22 +0000 Subject: [iCalendar-devel] Doesn't convert \r Message-ID: <3c4c8fa60701281824v37a760c3pf9c962c7d4ebeee1@mail.gmail.com> Hi Jeff, Some bugs: 1. icalendar doesn't convert ASCII character "0D" to \r (or just remove it altogether). If input is DOS/Windowsish this will invalidate the resulting iCalendar. 2. It doesn't accept dates before epoch (?) (even though Date or DateTime supports it, but not Time class). I had to pass a regular string. 3. SEQ:0 is invalid (why it's here?) 4. No RRULE support (not even plain raw string). Calling ical_property 'rrule' fixes this though, although it feels such a hack. Thank you! -- Hendy Irawan Web: http://hendy.gauldong.net Mobile: +62 856 24889899 Yahoo Messenger: ceefour666 LinkedIn: http://www.linkedin.com/in/ceefour From gauldong at gmail.com Sun Jan 28 21:32:53 2007 From: gauldong at gmail.com (Hendy Irawan) Date: Mon, 29 Jan 2007 02:32:53 +0000 Subject: [iCalendar-devel] iCalendar validator Message-ID: <3c4c8fa60701281832u7ee688dam1bf616e01025c08b@mail.gmail.com> BTW this is such a good thing, online, web-based. I hope it's not vaporizing soon: http://severinghaus.org/projects/icv/ -- Hendy Irawan Web: http://hendy.gauldong.net Mobile: +62 856 24889899 Yahoo Messenger: ceefour666 LinkedIn: http://www.linkedin.com/in/ceefour From gauldong at gmail.com Sun Jan 28 22:01:21 2007 From: gauldong at gmail.com (Hendy Irawan) Date: Mon, 29 Jan 2007 03:01:21 +0000 Subject: [iCalendar-devel] transcript validation Message-ID: <3c4c8fa60701281901h3900cf87x4b593857cdddeb8a@mail.gmail.com> Here's a transcript of my validations at http://severinghaus.org/projects/icv/ : (due the issues I mentioned before) It'd be great if icalendar adds some checks to prevent generating invalid icals. but this isn't a high priority. just to let you know there is this kind of issue. ==== Filename: gadocontacts.ics Size: 163763 bytes Sorry, your calendar could not be parsed. Error: Error was: An error ocurred during parsing - line: 11 Cause: Caused by: Unparseable date: "19710523" Context for line 11: 8: DESCRIPTION:Pacar Mbak Wuwuk (Luluk Setyorini)\, udah nikah ding. 9: SUMMARY:Arif Wahyudi 10: DTSTART:19710523 11: DTSTAMP:20070128T181952 12: DURATION:1D 13: SEQ:0 14: BEGIN:VALARM Filename: gadocontacts_fixed.ics Size: 165611 bytes Sorry, your calendar could not be parsed. Error: Error was: An error ocurred during parsing - line: 13 Cause: Caused by: Illegal property [SEQ] Context for line 13: 10: DTSTART:19710523T000000 11: DTSTAMP:20070128T181952 12: DURATION:1D 13: SEQ:0 14: BEGIN:VALARM 15: ACTION:DISPLAY 16: END:VALARM Filename: gadocontacts_fixed.ics Size: 163763 bytes Sorry, your calendar could not be parsed. Error: Error was: An error ocurred during parsing - line: 22 Cause: Caused by: Illegal property [\NNOMOR TELEPON + FAX\, TAPI HARUS DIOMONGI DULU FAX-NYA. (MANUAL).] Context for line 22: 19: UID:2007-01-28T18:19:52+0700_743653260 at cee4 20: DESCRIPTION:Mas Doni di Surabaya. \nNomor telepon + fax\, tapi harus diomon 21: gi dulu fax-nya. (manual). \nYang kerja di sana: Mbak Wahyu. 22: SUMMARY:Doni Handiarto 23: DTSTART:19781201T000000 24: DTSTAMP:20070128T181952 25: DURATION:1D Filename: gadocontacts_fixed.ics Size: 161989 bytes Sorry, your calendar could not be parsed. Error: Error was: An error ocurred during parsing - line: 371 Cause: Caused by: Illegal property [\NBIAR ISKA GA MARAH] Context for line 371: 368: DESCRIPTION:Anaknya baik banget lhooo...!!\n\nYang gigih nawarin paket UK 369: KSU dan kalender UKKSU.\n\nKlub sepakbola favorit: Manchester United.\n 370: \nbiar Iska ga marah:\n1. jangan jahatin Iska\n2. jangan banding2in orang 371: SUMMARY:Iska Dameuli Herawaty Naipospos 372: DTSTART:19840725T000000 373: DTSTAMP:20070128T181952 374: DURATION:1D Filename: gadocontacts_fixed.ics Size: 161968 bytes Congratulations; your calendar validated! -- Hendy Irawan Web: http://hendy.gauldong.net Mobile: +62 856 24889899 Yahoo Messenger: ceefour666 LinkedIn: http://www.linkedin.com/in/ceefour -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070129/9272a93c/attachment-0001.html