Installation
Add this line to your application's Gemfile:
gem 'tweetomator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tweetomator
Usage
Third-party API Keys required:
- Twitter: https://dev.twitter.com
- Create a new app and set the permissions to read and write
- Flickr: https://www.flickr.com/services/apps/create/apply
Create a new instance of each config class in config/config.rb
TwitterConfig
- consumer_key / String
- consumer_secret / String
- access_token / String
- access_token_secret / String
- username / String
- tweet_max_length / int
FlickrConfig
- api_key / String
- shared_secret / String
TweetomatorConfig
- twitter_config / TwitterConfig
- flickr_config / FlickrConfig
- topics / Array
- blacklist / Array
- stop_words / Array
- delay_in_seconds / int
- composer_type / String (Class name of a lib/composers/Composer derivative e.g. 'MarkovComposer')
- input_text_file / String (location of the markov chain's input text)
Create a new Tweetomator
e.g.
twitter_config = TwitterConfig.new([...])
flickr_config = FlickrConfig.new([...])
tweetomator_config = TweetomatorConfig.new(twitter, flickr, [...])
tweetomator = Tweetomator.new(tweetomator_config)
tweetomator.run
Contributing
- Fork it ( https://github.com/natyoung/tweetomator/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request