A Cinch plugin to get information about posted URLs.
First install the gem by running:
gem install cinch-url-scraper
Then load it in your bot:
require "cinch"
require "cinch/plugins/urlscraper"
bot = Cinch::Bot.new do
configure do |c|
c.plugins.plugins = [Cinch::Plugins::UrlScraper]
# The following line is not required
c.plugins.options[Cinch::Plugins::UrlScraper] = { enabled_channels: ["#Foo", "#Bar"] }
end
end
bot.start
<url> # display url title / information
!url <on|off> # toggles URL scraping on and off for that channel
<mpapis>: [email protected]:3505088.git:
<smfbot>: Title: rvm setup for projects — Gist (at gist.github.com, mpapis on 2012-08-28 15:56), Url: https://gist.github.com/3505088
Run the ./test-run.sh
script to play with results of your changes in channel listed in example/config.yaml