#!/usr/bin/env ruby require 'twitter_bot_generator' begin if !ARGV[0] || ARGV.any?{ |a| a == '--help' || a == '-H' } puts 'twitter_bot_generator (--)' puts '## creates a new directory called in the current working directory, ' puts 'and fills it with a bunch of boilerplate goodness' puts 'for building a bot that says stuff at a semi-random interval' puts 'OPTIONAL ALTERNATIVE OPTIONS:' puts '--streaming || -S: generates a bot that listens to the "gardenhose"' puts '--userstream || -U: generates a bot that listens for tweets @ it' puts 'have fun be kind to each other thanks goodbye!' else bot_name = ARGV[0].downcase.gsub(/[^a-z]/, '_') TwitterBotGenerator.generate bot_name, ARGV[1] || '' end rescue puts 'something horrible has happened' end