require 'humane_upcoming' def usage() puts "Usage:" puts "1. Create a file named events with the following format (no commas allowed except in the description):" puts " ,,,,,,," puts " Date and time fields can be of any form accepted by GNU programs" puts " (See http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html)" puts " Category name may be one of the following:" HumaneUpcoming.get_category_list.each{|category| puts " - " + category.name} puts puts "2. Run this program. It will add the events described in the file named events to upcoming.org." puts " (See http://upcoming.org/services/api/event.add.php)" end #TODO: use getopt to decide what to do usage() #Use it like this... #username = "myusername" #password = "mypassword" #humane_upcoming = HumaneUpcoming.new(username, password) #humane_upcoming.import_csv("events") #humane_upcoming.export_events("AJAX") exit