Simple like Hello 2012

If you are interested in how we made this year's new year greeting (which you can find here, here is a simplified architectural view:

Basically a simple Sinatra based server, serving the static content. When you submit the form it repeates the message on an irc channel using Cinch. There are two other IRC bots on the same channel, one is on the EEEpc controlling the Fux that Controls the Tux, which makes it speak and move. The other is on the laptop that is connected to the camera, adding the text from the IRC channel to the video which is then encoded and streamed to the Wowza which reencodes it for Flash and HTML5 video.

Sounds complicated?

Well it ain't, basically all of the server side code can be resumed to :

require 'cinch'
require 'sinatra'
require 'eventmachine'

set :public_directory, { File.join(root, "public") }

get '/' do'public', 'index.html'))

post '/form' do
  $bot.send("#af83-2012", "tux speak " + params[:message])
  $bot.send("#af83-2012", "tux mouth #{params[:message].split.size} close")
  $bot.send("#af83-2012", "tux flippers 2 down")

$bot = do
  configure do |c|
    c.server = ""
    c.channels = ["#af83-2012"]
    c.nick     = "TuxCamBot"

EM::defer {

blog comments powered by Disqus