mirror of
https://github.com/anirbanmu/substitute-bot.git
synced 2026-04-19 03:10:09 +00:00
VIM-like substitution bot for reddit comments
- Ruby 84.7%
- Haml 9.2%
- SCSS 5.8%
- Procfile 0.3%
| .circleci | ||
| spec | ||
| views | ||
| .gitignore | ||
| .rspec | ||
| .ruby-gemset | ||
| .ruby-version | ||
| bot.rb | ||
| comment_processor.rb | ||
| Gemfile | ||
| Gemfile.lock | ||
| globals.rb | ||
| Procfile | ||
| README.md | ||
| reply_store.rb | ||
| web.rb | ||
substitute-bot
A Reddit bot that provides the ability to search and replace parent comments. Supports Ruby regular expression syntax.
Setup
- Clone this repo
gem install bundlerbundle install
Bot
ruby bot.rb
Web
ruby web.rb
Deployment on Heroku
heroku createheroku addons:create heroku-redis:hobby-dev- Set environment variables for Reddit integrations
heroku config:set REDDIT_CLIENT_ID=<YOUR_CLIENT_ID>heroku config:set REDDIT_CLIENT_SECRET=<YOUR_CLIENT_SECRET>heroku config:set REDDIT_BOT_USERNAME=<YOUR_BOTS_USERNAME>heroku config:set REDDIT_BOT_PASSWORD=<YOUR_BOTS_PASSWORD>
git push heroku master
Gems
Bot
- sucker_punch (for threaded handling of comments)
- Redd (Reddit API wrapper)
- RSpec (for tests)
- redis-namespace
Web
- Sinatra
- Haml
- Sass
Testing
bundle exec rspec
Live
You can check out the live running web frontend @ https://substitute-bot.herokuapp.com/