Skip to content

Twitter bot which retweets #rails and #ruby hashtags (case insensitive). Developed with Ruby.

License

Notifications You must be signed in to change notification settings

coolprobn/ruby-twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-twitter-bot

Twitter bot which retweets #rails and #ruby hashtags (case insensitive). Developed with Ruby.

Run the bot

  1. Install dependencies

    bundle install

  2. Copy config/application.yml from config/application.yml.sample and add all required values that you get from Twitter Api configs

  3. Run the bot from project root

    ruby app/services/twitter/re_tweet_service.rb

  4. You can change the hashtags you want the bot to retweet from inside app/services/twitter/re_tweet_service.rb

    • Update constant HASHTAGS_TO_WATCH
  5. Run bot in background

     # Create a new shell
     $ screen -S twitter-bot
    
     # Run the twitter bot (you should be inside project root)
     $ ruby app/services/twitter/re_tweet_service.rb 
     
     # Detach ruby bot and move to original screen
     $ CTRL + a + d
     
     # Return to the screen where bot is running
     $ screen -r twitter-bot
    

    Ref: Run Ruby script in the background

    NOTE: If you have deployed bot to remote server, you need to restart the bot after server restart because it kills the script running in background

TODO

  1. Allow to update the hashtags from application.yml.
  2. Create initializer file and add gem require and figaro config to it.

About

Twitter bot which retweets #rails and #ruby hashtags (case insensitive). Developed with Ruby.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages