https://github.com/anirbanmu/substitute-bot
VIM-like substitution bot for reddit comments
https://github.com/anirbanmu/substitute-bot
bot jruby reddit ruby ruby-application substitution-bot
Last synced: 9 months ago
JSON representation
VIM-like substitution bot for reddit comments
- Host: GitHub
- URL: https://github.com/anirbanmu/substitute-bot
- Owner: anirbanmu
- Created: 2018-02-03T19:21:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-26T03:12:13.000Z (about 7 years ago)
- Last Synced: 2025-02-10T14:51:50.287Z (over 1 year ago)
- Topics: bot, jruby, reddit, ruby, ruby-application, substitution-bot
- Language: Ruby
- Homepage:
- Size: 38.1 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# substitute-bot
[](https://circleci.com/gh/anirbanmu/substitute-bot)
A [Reddit](https://www.reddit.com/) bot that provides the ability to search and replace parent comments. Supports Ruby regular expression syntax.
## Setup
- Clone this repo
- `gem install bundler`
- `bundle install`
### Bot
- `ruby bot.rb`
### Web
- `ruby web.rb`
## Deployment on Heroku
- `heroku create`
- `heroku addons:create heroku-redis:hobby-dev`
- Set environment variables for Reddit integrations
- `heroku config:set REDDIT_CLIENT_ID=`
- `heroku config:set REDDIT_CLIENT_SECRET=`
- `heroku config:set REDDIT_BOT_USERNAME=`
- `heroku config:set REDDIT_BOT_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/](https://substitute-bot.herokuapp.com/)