https://github.com/dirk/lita-markov
Markov chains for Lita.
https://github.com/dirk/lita-markov
Last synced: about 1 year ago
JSON representation
Markov chains for Lita.
- Host: GitHub
- URL: https://github.com/dirk/lita-markov
- Owner: dirk
- License: bsd-3-clause
- Created: 2015-11-23T05:22:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-21T05:19:17.000Z (over 9 years ago)
- Last Synced: 2025-03-21T13:45:38.635Z (about 1 year ago)
- Language: Ruby
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markov chains for [Lita](https://www.lita.io/)
Listens to your public chat rooms and creates Markov chain databases
for each user.
## Installation
Add `lita-markov` to your Lita instance's Gemfile:
``` ruby
gem 'lita-markov'
```
Configure the database URL for your SQL database
([Sequel](http://sequel.jeremyevans.net/) is used for
communicating with databases):
```ruby
# lita_config.rb
Lita.configure do |config|
# For example, using Heroku and their Postgresql addon, the database can be
# configured by simply doing:
config.handlers.markov.database_url = ENV['DATABASE_URL']
end
```
## Usage
The bot will automatically ingest all messages into the Redis-backed Markov
chain database. You can then query the bot for a generated chain:
```
user> mybot markov dirk
mybot> I love cookies!
```
## License
Licensed under the 3-clause BSD license. See [LICENSE](LICENSE) for details.