GitXplorerGitXplorer
m

Showbot

public
90 stars
31 forks
6 issues

Commits

List of commits on branch master.
Unverified
ab1cd6fd28105a916095b3605f549be9f34132e9

Update readme.md

rrikai committed 8 years ago
Unverified
f452caae447802f4f24653829e9efff05bee8270

Merge pull request #64 from mutewinter/pr/55

rrikai committed 8 years ago
Unverified
f96f40ec327aa687539606ceb223a9ec756594cd

Merge remote-tracking branch 'refs/remotes/origin/master' into pr/55

rrikai committed 8 years ago
Unverified
9057ce503c2a9ca06a39b8759afc0addff9b4290

Update cinchize.yml wording

rrikai committed 11 years ago
Unverified
6c1c52ce706a60bd50dc94b9bf6708cebe7de5f8

Whoops, these don't belong in this version!

rrikai committed 11 years ago
Unverified
e20b60d0194e2b22b7012f58dd6d74457e9d2ab0

Add a .ruby-version

rrikai committed 11 years ago

README

The README file for this repository.

Showbot

Dead as of 2013-10-16, the main project is now located at rikai/Showbot

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
  • foreman run 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:

# Bot lib folder
RUBYLIB=./lib

# Set this if you want to use a language other than english.
# You will also need to create a corresponding .yml file in the locales folder.
SHOWBOT_LOCALE=en

# Foreman stuff
## Production port
PORT=80
## Development port
DEVELOPMENT_PORT=5000

# Point this to the url of data.json, if you have one
SHOWBOT_DATABASE_URL=your_info_here

# For backup.rb
BOT_DATABASE_NAME=your_info_here
BOT_DATABASE_USER=your_info_here
BOT_DATABASE_PASSWORD=your_info_here
BOT_DATABASE_HOST=your_info_here
BOT_DATABASE_PORT=your_info_here
BOT_DATABASE_OPTS=your_info_here
S3_ACCESS_KEY_ID=your_info_here
S3_SECRET_ACCESS_KEY=your_info_here
S3_REIGON=your_info_here
S3_BUCKET=your_info_here
S3_PATH=your_info_here
S3_KEEP=your_info_here

# Point this to the url of data.json, if you have one
DATA_JSON_URL=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