Skip to content
This repository

An IRC Bot and Website for 5by5.tv written with the Cinch and Sinatra frameworks

branch: master
readme.md

Showbot

Dead as of 2013-10-16.

A sweet IRC bot with a web interface for 5by5. Built on cinch and sinatra.

The Creation of Showbot

IRC Commands

  • !next - When's the next live show?
  • !schedule - What shows are being recorded live in the next seven days?
  • !suggest - Be heard. Suggest a title for the live show.
  • !link - Know the link for that? Suggest it and make the show better.
  • !current - What's playing on 5by5.tv/live? I've got you covered.
  • !last_status - The last tweet by @5by5, delivered to you in IRC. Sweet.
  • !about - Was showbot coded or did it spontaneously come into existence?
  • !help - Uh, this.

Setup and Customization

Prerequisites

Setup

These commands will get you setup to run Showbot.

  • git clone https://github.com/mutewinter/Showbot.git
  • cd Showbot
  • bundle
  • rake db:migrate

Finally you need to setup your .env file in the root of the project. At the bare minimum you'll need the following:

RUBYLIB=./lib
TWITTER_CONSUMER_KEY=your_info_here
TWITTER_CONSUMER_SECRET=your_info_here
TWITTER_OAUTH_TOKEN=your_info_here
TWITTER_OAUTH_TOKEN_SECRET=your_info_here

Configuring IRC

data.json

data.json is a file served specifically by 5by5.tv that indicates which show is live. It is currently integrated with title suggestions so that the currently playing show is fetched and saved in the database when a title is suggested.

If you want to remove the functionality provided by data.json, you will need to start by removing the before create hook in suggestion.rb. To avoid the "Show Not Listed" message you'll want to remove the suggestion set break in _table_set.haml and _bubble_set.haml.

Modifying the CSS

Modifying showbot.scss requires that you start the rake sass:watch command. While this command is running, public/showbot.css will be overwritten with any changes that are made in showbot.scss. This annoying setup is necessary due to Bourbon not working well outside of the Rails asset pipeline.

Data.json

5by5.tv uses a JSON API to provide details about which show is live. When a title is suggested, this JSON API is queried and the show that the title was suggested during is attached to the suggestion.

The format of 5by5.tv's JSON is as follows:

  {
    'live': true,
    'broadcast': {
      'slug': 'show_slug_here'
    }
  }

The 'show_slug_here' is the value read and attached to the title suggestion.

Launching Showbot

Website and the IRC Bot

$ bundle exec foreman start -f Procfile.local

Just the Website

$ bundle exec foreman start web -f Procfile.local

Just the IRC Bot

$ bundle exec foreman start irc -f Procfile.local

Special Thanks

  • Special thanks to Rikai for reverse-engineering the setup steps for someone setting up Showbot from scratch.
  • To gouwens for implementing the clustered view.

License

The MIT License

Copyright (c) 2011 Jeremy Mack, Pile of Turtles, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

sekret analytics shhh

Something went wrong with that request. Please try again.