#!/usr/bin/env ruby require 'flickvimeo' unless ARGV[0] puts "Usage: #{File.basename($0)} " exit(1) end v = FlickVimeo::Video.new(ARGV[0]) puts "Video file for #{ARGV[0]}: #{v.video_file_url}" require 'osx/cocoa' request = { 'RequestType' => 'play-media', 'MediaLocation' => v.video_file_url } notification_center = OSX::NSDistributedNotificationCenter.defaultCenter notification_center.postNotificationName_object_userInfo_deliverImmediately("com.sadun.airflick", nil, request, true)