/picture-bot

A Mispybot that posts pictures to twitter automagically.

Primary LanguageRuby

Picture Bot v 1.3

Updated for twitter_ebooks version 3+

A deployable twitter bot that solely exists to post pictures of things to the internet. Uses Mispy's Twitter_Ebooks gem to run the bot, the script itself is based on Mispy's Ebooks_example and modified to update with pictures only and none of the talky stuff.

Usage:

To install and run the bot, simply insert the commands below.

  • git clone https://github.com/FluffyPira/picture-bot.git
  • cd picture-bot
  • bundle install
  • add images to /pictures
  • modify config.yml to your liking.
    • config.yml should contain your authorization keys, and most of the bot customization.
    • modify bots.rb only if you know exactly what you're doing.
  • run with the command 'ebooks start'

Remember that to get the oauth information, you will need to create a twitter app associated with the account or use twurl to associate your bot with an app.

If you would prefer using different pictures, clear the "pictures" folder and move whatever pictures you want to post to twitter in there. They're posted automagically every 30 minutes unless otherwise specified.

Heroku:

If you want to run the bot via heroku, there is a simple guide to deploying your first git to heroku. If you already have heroku, the basic deployment prodecure is as follows:

  • git clone https://github.com/FluffyPira/picture-bot.git
  • cd picture-bot
  • bundle install
  • add images to /pictures
  • modify config.yml to your liking.
    • config.yml should contain your authorization keys, and most of the bot customization.
    • modify bots.rb only if you know exactly what you're doing.
  • git init
  • git add .
  • git commit -m "Your commit name"
  • heroku create
  • heroku apps:rename "Your app name"
  • git push heroku master
  • heroku ps:scale worker=1

Thanks:

Special thinks to lyons who added the follow/unfollow code before I had to trash the old Cutie's bot repo because I made an amateur mistake. Thanks as well to @vex0rian and @parvitude on Twitter for the pseudo-random image selection code. <3

I'm sorry that I messed up and your contributions will no longer be shown on GitHub.