Sha256: 19667566261dc6545e227b542f97897b39daf597fe800a8e4774405669fead50

Contents?: true

Size: 642 Bytes

Versions: 43

Compression:

Stored size: 642 Bytes

Contents

#!/usr/bin/ruby

# NOTE: you must have installed ruby-breakpoint in order to use this script.
# Grab it using gem with "gem install ruby-breakpoint --remote" or download
# from the website (http://ruby-breakpoint.rubyforge.org/) then run setup.rb

$:.unshift(File.dirname(__FILE__) + '/../lib')

require 'breakpoint'
require 'icalendar'

cals = Icalendar::Parser.new(File.new(ARGV[0])).parse
puts "Parsed #{cals.size} calendars"

cal = cals.first
puts "First calendar has:"
puts "#{cal.events.size} events"
puts "#{cal.todos.size} todos"
puts "#{cal.journals.size} journals"

test = File.new("rw.ics", "w")
test.write(cal.to_ical)
test.close

Version data entries

43 entries across 43 versions & 4 rubygems

Version Path
curzonj-icalendar-1.0.2.1 test/read_write.rb
curzonj-icalendar-1.0.2 test/read_write.rb
curzonj-icalendar-1.1.0.2 test/read_write.rb
paulsm-icalendar-1.1.0.4 test/read_write.rb
sdague-icalendar-1.0.2.1 test/read_write.rb
sdague-icalendar-1.0.2.2 test/read_write.rb
sdague-icalendar-1.0.2.3 test/read_write.rb
sdague-icalendar-1.0.2.4 test/read_write.rb
sdague-icalendar-1.1.0.1 test/read_write.rb
sdague-icalendar-1.1.0.2 test/read_write.rb
sdague-icalendar-1.1.0.3 test/read_write.rb
sdague-icalendar-1.1.0 test/read_write.rb
icalendar-1.5.4 test/read_write.rb
icalendar-1.5.3 test/read_write.rb
icalendar-1.5.2 test/read_write.rb
icalendar-1.5.1 test/read_write.rb
icalendar-1.5.0 test/read_write.rb
icalendar-1.4.5 test/read_write.rb
icalendar-1.4.4 test/read_write.rb
icalendar-1.4.3 test/read_write.rb