parm289/SiriProxy-SiriIMDB — Issue #3: Created a German translation -> Could not find gem 'siriproxy-imdb (>= 0) ruby' in source at ./plugins/siriproxy-imdb. Source does not contain any versions of 'siriproxy-imdb (>= 0) ruby'
Author: PianoThomas
Created: 2011-12-25 22:58:49+00:00
State: open

Please help me!
I've created a German Version of your wonderful PLUGIN!
I downloaded the original one and changed some words in the .rb in the lib folder:

require 'cora'
require 'siri_objects'
require 'imdb'

SiriIMDB is a Siri Proxy plugin that allows Siri to give you recommendations, ratings, and other useful information about anything on IMDB.
Check the readme file for more detailed usage instructions.
Created by parm289 - you are free to use, modify, and redistribute as you like, as long as you give the original author credit.

class SiriProxy::Plugin::SiriIMDB < SiriProxy::Plugin
def initialize(config)
end

def getActors(movieName)
search = Imdb::Search.new(movieName)
movie = search.movies[0]
return movie.cast_members
end

def getLeadActor(movieName)
search = Imdb::Search.new(movieName)
movie = search.movies[0]
movieActor = movie.cast_members.first
return movieActor
end

def getRating(movieName)
search = Imdb::Search.new(movieName)
movie = search.movies[0]
movieRating = movie.rating()
return movieRating
end

listen_for /Wie viele Sterne hat (.*) bekommen/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
#Search for the movie and get the rating as a string
movieRating = getRating (movieTitle)
movieRatingString = movieRating.to_s
say "" + movieTitle + " hat eine Bewertung von " + movieRatingString + " aus 10 möglichen Sternen."
request_completed
end

listen_for /Soll ich mir (.*) ansehen/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
movieRating = getRating(movieTitle)
movieRatingString = movieRating.to_s
if (movieRating < 6)
say "Leider kann ich dir" + movieTitle + "nicht empfehlen! Die Bewertung liegt bei " + movieRatingString + " Sternen."
elsif (movieRating < 8)
say "Ich kann dir" + movieTitle + "empfehlen! Die Bewertung liegt bei " + movieRatingString + " Sternen."
elsif (movieRating >= 8)
say "" + movieTitle + " musst du gesehen haben!!! Die Bewertung liegt bei " + movieRatingString + " Sternen."
end
request_completed
end

listen_for /Wer spielte in (.*)/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
movieActors = getActors(movieTitle)
say "" + movieActors[0] + ", " + movieActors[1] + ", und " + movieActors[2] + " spielten bei " + movieTitle + "mit."
request_completed
end

listen_for (/Wer spielte in (.*)/i) do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
movieActors = getActors(movieTitle)
say "" + movieActors[0] + ", " + movieActors[1] + ", und " + movieActors[2] + " spielten bei " + movieTitle + "mit."
request_completed
end

listen_for /Wer spielte in (.*)/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
movieActors = getActors(movieTitle)
say "" + movieActors[0] + ", " + movieActors[1] + ", und " + movieActors[2] + " spielten bei " + movieTitle + "mit."
request_completed
end

listen_for /Wer war die Hauptperson in (.*)/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
movieActor = getLeadActor(movieTitle)
say "Die Hauptperson von " + movieTitle + " ist " + movieActor + "."
request_completed
end

listen_for (/Wer ist die Hauptperson in (.*)/i) do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
search = Imdb::Search.new(movieTitle)
movie = search.movies[0]
movieActor = movie.cast_members.first
say "Die Hauptperson in " + movieTitle + " ist " + movieActor + "."
request_completed
end

listen_for /Wer führte Regie bei (.+)/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
search = Imdb::Search.new(movieTitle)
movie = search.movies[0]
movieDirectors = movie.director()
say "Der Regisseur von " + movieTitle + " ist " + movieDirectors[0] + "."
request_completed
end

listen_for /Wann wurde (.*) veröffentlicht/i do |movieTitle|
movieTitle = movieTitle.split(' ').map {|w| w.capitalize }.join(' ')
search = Imdb::Search.new(movieTitle)
movie = search.movies[0]
movieDate = movie.release_date()
say "" + movieTitle + " wurde am " + movieDate + "veröffentlicht."
request_completed
end
end

To install i copied the hole folder to siriproxy 0.3.0-plugins and the Siri Plugins folder in my home directory!
And then I added this one in the config.yml:

- name: 'IMDB'
path: './plugins/siriproxy-imdb'

And YES, it's perfectly aligned ;)

What have i done wrong? Can you please help me?