208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
# File 'lib/vpim/agent/scraps.rb', line 208
def do_GET(req, resp)
= RSS::Maker.make("0.9") do |maker|
title = $ics_todo_title
link = 'http:///'
maker.channel.title = title
maker.channel.link = link
maker.channel.description = title
maker.channel.language = 'en-us'
maker.image.url = "maker.image.url"
maker.image.title = "maker.image.title"
Dir[ $ical_folder + "/*.ics" ].each do |file|
Vpim::Icalendar.decode(File.open(file)).each do |cal|
cal.todos.each do |todo|
if !todo.status || todo.status.upcase != "COMPLETED"
item = maker.items.new_item
item.title = todo.summary
item.link = todo.properties['url'] || link
item.description = todo.description || todo.summary
end
end
end
end
end
resp.body = .to_s
resp['content-type'] = 'text/xml'
raise WEBrick::HTTPStatus::OK
end
|