Sha256: 2aca3967069f30087f0710b7f6b6962a6b76b940eb457b43d7d8efe6069c26d7
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
#!/usr/bin/env ruby require 'facebook_google_calendar_sync/cli' require 'facebook_google_calendar_sync' require 'optparse' require 'ostruct' options = {}.merge(FacebookGoogleCalendarSync::DEFAULT_CONFIG) OptionParser.new do |opts| opts.banner = "Usage: facebook-google-calendar-sync [options]" opts.on("-f", "--facebook-calendar-url URL", "Mandatory. Your Facebook iCalendar URL. eg. \"http://www.facebook.com/ical/u.php?uid=12345&key=67890\" Put the URL in quotes or you may find your process will be backgrounded because of the ampersand.") do | url | options[:facebook_calendar_url] = url end c_help = "Optional. The location of your Google API YAML file. Defaults to #{options[:google_api_config_file]}" opts.on("-c", "--google-api-config-file CONFIG", c_help) do | file | options[:google_api_config_file] = file end g_help = "Optional. Google calendar name, defaults to '#{options[:google_calendar_name]}'. This calendar will be created if it does not already exist." opts.on("-n", "--google-calendar-name NAME", g_help) do | name | options[:google_calendar_name] = name end opts.on( '-h', '--help', 'Display this screen' ) do puts opts exit end end.parse! FacebookGoogleCalendarSync::CLI.start options
Version data entries
4 entries across 4 versions & 1 rubygems