Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An IRC Bot and Website for 5by5.tv written with the Cinch and Sinatra frameworks
CSS Ruby JavaScript CoffeeScript
branch: master

Fix dir.glob sorting across platforms.

On some OSes, the results of ````Dir.glob```` will not be sorted alphabetically, this makes it consistent across different platforms.
latest commit 43137c5ded
@rikai rikai authored
Failed to load latest commit information.
config Fing whitespace
db db folder now included in repo
images Shrank width of arrow sprite
lib Fixed a typo so this command will actually get called
log Added empty log folder
pid Including empty pid folder for development
public style: remove console logs
sass Sayonara whitespace and line ending problems
scripts Sayonara whitespace and line ending problems
test Better error messages for missing titles and users
views Sayonara whitespace and line ending problems
.gitignore Fixes environment and twitter
.powrc rvmrc and powrc
.rvmrc rvmrc and powrc
Gemfile Merge branch 'master' of github.com:gouwens/Showbot into gouwens-master
Gemfile.lock Merge branch 'master' of github.com:gouwens/Showbot into gouwens-master
Procfile Update the procfiles
Procfile.local Update the procfiles
Rakefile Add db seed task
cinchize.yml Rename multi-word plugins so Cinchize likes them
config.ru Modernize project
console Console command for quick invocation
environment.rb Fix dir.glob sorting across platforms.
license Added MIT license to the project, the king of all licenses.
readme.md Update readme.md
showbot_irc.rb Sayonara whitespace and line ending problems
showbot_web.rb Refactored word cloud rendering javascript

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.