Re: [O] Handling Repeating events from google calendar / repeater interval
I pushed some conversion code which I am more confident about to the tz-test branch. If you want to re-test, please do so. Cheers, Simon On 08/08/2013 10:56 PM, Simon Thum wrote: Stephen, I now have time to take a look if you send me an example ical. Cheers, Simon On 07/31/2013 11:18 PM, Simon Thum wrote: Yes, probably, but don't count on me in the next 4 days (vacation). On 07/31/2013 11:08 PM, Stephen Eglen wrote: On Wed, Jul 31 2013, Simon Thum wrote: Hi Stephen, I probably did not express myself well: The [UTC] means the timestamp was converted from UTC, which is the case. It is probably quite confusing to attach a TZ which is no longer supposed to be the case. I will probably change that. Is the org-mode time a correct local time now? I understand from ri_cal docs that ri_cal should do conversion as expected, but if not I can probably fix it easily. Cheers, Simon hi Simon, (dropping orgmode for now until we find a solution!) no, the org mode times are still GMT rather than with summer time added. Would it help if I made a test calendar to share with you? Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Stephen, I now have time to take a look if you send me an example ical. Cheers, Simon On 07/31/2013 11:18 PM, Simon Thum wrote: Yes, probably, but don't count on me in the next 4 days (vacation). On 07/31/2013 11:08 PM, Stephen Eglen wrote: On Wed, Jul 31 2013, Simon Thum wrote: Hi Stephen, I probably did not express myself well: The [UTC] means the timestamp was converted from UTC, which is the case. It is probably quite confusing to attach a TZ which is no longer supposed to be the case. I will probably change that. Is the org-mode time a correct local time now? I understand from ri_cal docs that ri_cal should do conversion as expected, but if not I can probably fix it easily. Cheers, Simon hi Simon, (dropping orgmode for now until we find a solution!) no, the org mode times are still GMT rather than with summer time added. Would it help if I made a test calendar to share with you? Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Hi Stephen, I probably did not express myself well: The [UTC] means the timestamp was converted from UTC, which is the case. It is probably quite confusing to attach a TZ which is no longer supposed to be the case. I will probably change that. Is the org-mode time a correct local time now? I understand from ri_cal docs that ri_cal should do conversion as expected, but if not I can probably fix it easily. Cheers, Simon On 07/30/2013 03:06 PM, Stephen Eglen wrote: sorry the patch was incomplete. The correct one is on a branch I just pushed named tz-test. For me it works the same but maybe it works for you. Thanks Simon, but unfortuantely I'm still seeing [UTC]. Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
On Mon, Jul 8, 2013 at 11:55 AM, Guido Van Hoecke gui...@gmail.com wrote: Correct me if I am wrong, but I'm afraid that pure AWK does not provide date computation support. That's why I did not implement this. So I would definitely vote to extend the repeater syntax with a count. Before defending my precious AWK, I'll say that I think that repeating timestamps are a good idea and I'm not trying to talk anyone out of it. From http://en.wikipedia.org/wiki/Awk: http://en.wikipedia.org/wiki/Awk http://en.wikipedia.org/wiki/Awk Although AWK and sed were designed to support one-liner programs, even the early: Bell Labs users of AWK often wrote well-structured large AWK programs, and despite its limited intended area of use, AWK is Turing-complete I wouldn't recommend starting out to write a significant app in AWK, but adding a feature to an existing script doesn't seem unreasonable. The time functions are documented at http://www.gnu.org/software/gawk/manual/gawk.html#Time-Functions. The input may need a bit of string preprocessing before being passed to the time functions and, as we all know, AWK does a fine job of string manipulation. While I don't have time to bang on a huge script, if someone gives me the input and output for the time conversion, I should be able to whip that up pretty quickly. Neil PS: You crazy kids and your lack of respect for antiquated UNIX utilities ;-) In the interest of full disclosure, the quote above from the WIkipedia is immediately followed by: The power, terseness, and limits of early AWK programs inspired Larry Wall to write Perl So your lack of AWK knowledge seems reasonable as there are many better utilities.
Re: [O] Handling Repeating events from google calendar / repeater interval
Neil Smithline emacs-orgm...@neilsmithline.com writes: On Mon, Jul 8, 2013 at 11:55 AM, Guido Van Hoecke gui...@gmail.com wrote: Correct me if I am wrong, but I'm afraid that pure AWK does not provide date computation support. Apparently I was not very awake when I wrote that. Awk could be used to increment dates by n days, weeks, moths or years. But this would only be needed if we want / need to turn iCal RRULE events with COUNT specifier into COUNT separate org events (trying to circumvent the lack of such a COUNT specifier in org repeating dates). So although it is feasable, I'm still not sure it is the proper way to go. However, I am willing to implement it if needed / desired. So I would definitely vote to extend the repeater syntax with a count. I still think that this is the correct approach. PS: You crazy kids and your lack of respect for antiquated UNIX utilities ;-) Oooch, that hurts this crazy 66 year old kid :) Guido -- Expect the worst, it's the least you can do.
Re: [O] Handling Repeating events from google calendar / repeater interval
Yes, probably, but don't count on me in the next 4 days (vacation). On 07/31/2013 11:08 PM, Stephen Eglen wrote: On Wed, Jul 31 2013, Simon Thum wrote: Hi Stephen, I probably did not express myself well: The [UTC] means the timestamp was converted from UTC, which is the case. It is probably quite confusing to attach a TZ which is no longer supposed to be the case. I will probably change that. Is the org-mode time a correct local time now? I understand from ri_cal docs that ri_cal should do conversion as expected, but if not I can probably fix it easily. Cheers, Simon hi Simon, (dropping orgmode for now until we find a solution!) no, the org mode times are still GMT rather than with summer time added. Would it help if I made a test calendar to share with you? Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
sorry the patch was incomplete. The correct one is on a branch I just pushed named tz-test. For me it works the same but maybe it works for you. Thanks Simon, but unfortuantely I'm still seeing [UTC]. Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Hi, sorry the patch was incomplete. The correct one is on a branch I just pushed named tz-test. For me it works the same but maybe it works for you. Cheers, Simon On 07/23/2013 04:42 PM, Stephen Eglen wrote: Yes, org-mode does not recognize the [UTC], that is just a helper for exactly this case: The ical's timezone is emitted in case it is different from your DEFAULT_TZ. For me it worked fine so far. Thanks. res = orgTimeSpan(tstart, tend, repeaterClause) for res = orgTimeSpan(tstart.ruby_value, tend.ruby_value, repeaterClause) Thanks very much Simon, but when I do that, I get: undefined method `ruby_value' for #DateTime:0x0001d0e700 [/local/data/home/stephen/langs/ruby/ical2org/ical2org.rb:126:in `orgTimeSpanTZ', Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Yes, org-mode does not recognize the [UTC], that is just a helper for exactly this case: The ical's timezone is emitted in case it is different from your DEFAULT_TZ. For me it worked fine so far. Thanks. res = orgTimeSpan(tstart, tend, repeaterClause) for res = orgTimeSpan(tstart.ruby_value, tend.ruby_value, repeaterClause) Thanks very much Simon, but when I do that, I get: undefined method `ruby_value' for #DateTime:0x0001d0e700 [/local/data/home/stephen/langs/ruby/ical2org/ical2org.rb:126:in `orgTimeSpanTZ', Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
On 07/16/2013 06:02 PM, Stephen Eglen wrote: It's not exactly answering your question but my little tool https://github.com/simonthum/ical2org Dear Simon, Does your script handle summer time differences? My google calendar items are importing okay, but they are off by one hour. I've tried setting DEFAULT_TZ = 'Europe/London' in your script, but still I see no change. Below is one such entry, if that helps. The [UTC] after the timestamp would indicate to me that the time is correct (09:10 UTC, or 10:10 with one hour added for British Summer Time). But orgmode doesn't recognise the [UTC] note I think. Hi, thanks for your report. I did not immediately see your mail due to an email config problem. Regarding your earlier mail, I fixed the typo. Yes, org-mode does not recognize the [UTC], that is just a helper for exactly this case: The ical's timezone is emitted in case it is different from your DEFAULT_TZ. For me it worked fine so far. What it does is to set the default timzone in ri_cal which I read as being enough, but it is possible that it is not. In fact, I did not test the timezone features very much. could you please try the follwing: Subsitute the second line in orgTimeSpanTZ def orgTimeSpanTZ(tstart, tend, repeaterClause = nil) res = orgTimeSpan(tstart, tend, repeaterClause) for res = orgTimeSpan(tstart.ruby_value, tend.ruby_value, repeaterClause) ? It's not tested but might do the job. HTH, Simon Stephen * L+J have jabs with Millie (CONFIRMED) :PROPERTIES: :ID: kcd35lc23lt4260bovkc0gc...@google.com :icalCategories: :END: 2013-07-23 Tu 09:10-09:30 [UTC] Location: :ICALENDAR: BEGIN:VEVENT CREATED;VALUE=DATE-TIME:20130716T082258Z DTEND;VALUE=DATE-TIME:20130723T093000Z STATUS:CONFIRMED DTSTART;VALUE=DATE-TIME:20130723T091000Z TRANSP:OPAQUE DTSTAMP;VALUE=DATE-TIME:20130716T154820Z LAST-MODIFIED;VALUE=DATE-TIME:20130716T082349Z ATTENDEE;CN=Family;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;X-NUM-GUESTS=0:mailto:9j2ef3g23899k14qu5d3qe5...@group.calendar.google.com UID:kcd35lc23lt4260bovkc0gc...@google.com DESCRIPTION: SUMMARY:L+J have jabs with Millie LOCATION: SEQUENCE:1 END:VEVENT :END: Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
It's not exactly answering your question but my little tool https://github.com/simonthum/ical2org handles these. HTH, Simon On 07/08/2013 05:00 PM, Stephen Eglen wrote: I'm experimenting using ical2org.sh to import google calendars. One limitation, as noted in the header is: # - does process RRULE recurring events, but ignores COUNT specifiers so if you have a repeating event in google (e.g. every day for four week), the ics file has: RRULE:FREQ=DAILY;COUNT=4 The script will take the first day of the event, but not the remaining three days. I think this could be solved in a couple of ways: 1. create four events, moving the date by one each time. 2. extending the syntax of timestamps so that something like: * Pick up Sam at school 2007-05-16 Wed 12:30 3+1w means repeat this event 3 times (rather than indefinitely). Or +1w:3 or something similar, I don't mind the syntax as long as it doesn't break other parts of timestamps. Has extending the syntax of the repeater interval been considered to allow finite number of repeats? I can offer to code something up for consideration if this sounds sensible. Thanks, Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
It's not exactly answering your question but my little tool https://github.com/simonthum/ical2org Thanks, this is a nice workaround, it just worked well on my google calendar import. Should we add a link to this on http://orgmode.org/worg/org-tutorials/org-google-sync.html (how do I edit that?) Is there a typo in the install section of the doc? I had to do gem install ri_cal (rather than rical)? Would still be interested though in thoughts about finite repeater intervals. Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Correct me if I am wrong, but I'm afraid that pure AWK does not provide date computation support. That's why I did not implement this. okay, it does sound like a lot to ask awk to do. So I would definitely vote to extend the repeater syntax with a count. great. I assume that your initial example RRULE would require either ...4+1d or +1d:4 Yes, thanks. Stephen
[O] Handling Repeating events from google calendar / repeater interval
I'm experimenting using ical2org.sh to import google calendars. One limitation, as noted in the header is: # - does process RRULE recurring events, but ignores COUNT specifiers so if you have a repeating event in google (e.g. every day for four week), the ics file has: RRULE:FREQ=DAILY;COUNT=4 The script will take the first day of the event, but not the remaining three days. I think this could be solved in a couple of ways: 1. create four events, moving the date by one each time. 2. extending the syntax of timestamps so that something like: * Pick up Sam at school 2007-05-16 Wed 12:30 3+1w means repeat this event 3 times (rather than indefinitely). Or +1w:3 or something similar, I don't mind the syntax as long as it doesn't break other parts of timestamps. Has extending the syntax of the repeater interval been considered to allow finite number of repeats? I can offer to code something up for consideration if this sounds sensible. Thanks, Stephen
Re: [O] Handling Repeating events from google calendar / repeater interval
Hu Stephen, Stephen Eglen s.j.eg...@damtp.cam.ac.uk writes: I'm experimenting using ical2org.sh to import google calendars. One limitation, as noted in the header is: # - does process RRULE recurring events, but ignores COUNT specifiers so if you have a repeating event in google (e.g. every day for four week), the ics file has: RRULE:FREQ=DAILY;COUNT=4 The script will take the first day of the event, but not the remaining three days. I think this could be solved in a couple of ways: 1. create four events, moving the date by one each time. Correct me if I am wrong, but I'm afraid that pure AWK does not provide date computation support. That's why I did not implement this. So I would definitely vote to extend the repeater syntax with a count. 2. extending the syntax of timestamps so that something like: * Pick up Sam at school 2007-05-16 Wed 12:30 3+1w means repeat this event 3 times (rather than indefinitely). Or +1w:3 I assume that your initial example RRULE would require either ...4+1d or +1d:4 or something similar, I don't mind the syntax as long as it doesn't break other parts of timestamps. Has extending the syntax of the repeater interval been considered to allow finite number of repeats? I can offer to code something up for consideration if this sounds sensible. +1 Guido -- We're constantly being bombarded by insulting and humiliating music, which people are making for you the way they make those Wonder Bread products. Just as food can be bad for your system, music can be bad for your spirtual and emotional feelings. It might taste good or clever, but in the long run, it's not going to do anything for you. -- Bob Dylan, LA Times, September 5, 1984