Sha256: adf0db82e957ae3b99f627e85fe7ef2564c7f071f7fdd2b820b0f71902ca97ba

Contents?: true

Size: 483 Bytes

Versions: 24

Compression:

Stored size: 483 Bytes

Contents

#!/usr/bin/env ruby

require 'vpim/vcard'
require 'vpim/icalendar'

$in  = ARGV.first ? File.open(ARGV.shift) : $stdin
$out = ARGV.first ? File.open(ARGV.shift, 'w') : $stdout

cal = Vpim::Icalendar.create

Vpim::Vcard.decode($in).each do |card|
  if card.birthday
    cal.push Vpim::Icalendar::Vevent.create_yearly(
      card.birthday,
      "Birthday for #{card['fn'].strip}"
      )
    $stderr.puts "#{card['fn']} -> bday #{cal.events.last.dtstart}"
  end
end

puts cal.encode

Version data entries

24 entries across 24 versions & 11 rubygems

Version Path
vpim-24.2.20 samples/vcf-to-ics.rb
fraser-vpim-0.658 samples/vcf-to-ics.rb
fraser-vpim-0.659 samples/vcf-to-ics.rb
fraser-vpim-rails-0.658 samples/vcf-to-ics.rb
fraser-vpim-rails-0.659 samples/vcf-to-ics.rb
xing-vpim-0.658.1 samples/vcf-to-ics.rb
vpim-13.11.11 samples/vcf-to-ics.rb
vpim2-0.0.1 samples/vcf-to-ics.rb
vpim-rails-reinteractive-0.7 samples/vcf-to-ics.rb
vpim-rails-0.665 samples/vcf-to-ics.rb
thoughtafter-vpim-0.7.0.1 samples/vcf-to-ics.rb
vpim-rails-0.664 samples/vcf-to-ics.rb
vpim-rails-0.663 samples/vcf-to-ics.rb
vpim-rails-0.662 samples/vcf-to-ics.rb
scashin133-vpim-9.4.0 samples/vcf-to-ics.rb
vpim-rails-0.661 samples/vcf-to-ics.rb
mumboe-vpim-0.7 samples/vcf-to-ics.rb
mumboe-vpim-0.695 samples/vcf-to-ics.rb
fairtilizer-vpim-0.695 samples/vcf-to-ics.rb
vpim-0.604 samples/vcf-to-ics.rb