Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 54 lines (47 sloc) 1.03 KB
#!/usr/bin/env ruby
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
require 'reminder'
require 'growl'
require 'choice'
Choice.options do
banner "Usage: #{File.basename(__FILE__)} [-m]"
header ''
header 'Notification Options:'
option :message do
short '-m'
long '--message=MESSAGE'
desc "The notification message. The reminder!"
end
option :title do
d = "Just remember..."
short '-T'
long '--title=TITLE'
desc "The title of the notification. (default #{d})"
default d
end
option :time do
d = 10
short '-t'
long '--time=TIME'
desc "Number of minutes between each notification (default #{d})"
cast Integer
default d
end
separator ''
separator 'Other options: '
option :version do
short '-v'
long '--version'
desc 'Show version'
action do
puts "#{File.basename(__FILE__)} v#{Reminder::VERSION}"
exit
end
end
end
options = Choice.choices
begin
Reminder::Notifier.new(options).run
rescue Exception => e
puts e.message
end
Something went wrong with that request. Please try again.