Ticket #98 (enhancement)

Opened 3 years ago

Last modified 2 years ago

icalander support

Status: closed (fixed)

Reported by: nic Assigned to: nic
Priority: normal Milestone: Version 1.10
Component: Coding Version:
Severity: normal Keywords:
Cc:

Build read-only iCal feed using either http://icalendar.rubyforge.org/ or http://vpim.rubyforge.org/

Change History

11/01/05 19:31:48: Modified by jonathan@artisart.org

Using RubyAEOSA it could be possible to have Ruby generate iCal events by also including an Applescript for iCal.

01/15/06 19:34:35: Modified by solaris@sundevil.de

I'm very interested in this particular feature, so I started to implement it. This is how far I got up to now:

require 'icalendar'

cal = Icalendar::Calendar.new

todos = Todo.find_by_sql "select * FROM todos WHERE due is not null and completed is null"

todos.each {
  |todo|
  event = cal.event
  event.start = todo.due
  event.end = todo.due
  event.description = todo.description
}

 cal_string = cal.to_ical
 puts cal_string

Paste this code in script/console save the output to a file and load it in your favorite calendar. Seems quite useful.

I use http://icalendar.rubyforge.org/ as you can see. These are actually the first lines of Ruby code I'm writing. So feel free to change them to more elegant code :)

When I've become more familiar with Ruby and Rails I'll attach a patch for full integration in Tracks...

07/23/06 06:49:00: Modified by bsag

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [242]