]>
git.r.bdr.sh - rbdr/lyricli.rb/blob - lib/lyricli.rb
32215d3c1681ad9f716f01612a454604f21f0205
10 # This shit causes a lot of warnings. Quick Hack.
11 original_verbosity
= $VERBOSE
14 $VERBOSE = original_verbosity
16 # Add current path to include path
17 $
:.unshift File
.expand_path(File
.dirname(__FILE__
))
20 require "lyricli/util"
21 require "lyricli/configuration"
22 require "lyricli/lyrics_engine"
23 require "lyricli/source_manager"
24 require "lyricli/sources/arguments"
25 require "lyricli/sources/rdio"
26 require "lyricli/sources/itunes"
30 @lyricli = Lyricli
.new
37 @source_manager = SourceManager
.new
41 abort
"Usage: #{$0} artist song"
48 engine
= LyricsEngine
.new(@current_track[:artist], @current_track[:song])
52 rescue LyricsNotFoundException
58 @current_track = @source_manager.current_track
62 self.exit_with_error
if @current_track[:artist].nil? or @current_track[:artist].empty
?
63 self.exit_with_error
if @current_track[:song].nil? or @current_track[:song].empty
?