]>
git.r.bdr.sh - rbdr/lyricli.rb/blob - lib/lyricli.rb
557fa3bc331dc65806360374bfc2861e3af07f4b
8 # This shit causes a lot of warnings. Quick Hack.
9 original_verbosity
= $VERBOSE
12 $VERBOSE = original_verbosity
15 require "lyricli/util"
16 require "lyricli/configuration"
17 require "lyricli/lyricli"
18 require "lyricli/lyrics_engine"
19 require "lyricli/source_manager"
20 require "lyricli/sources/arguments"
21 require "lyricli/sources/rdio"
22 require "lyricli/sources/itunes"
24 # The Lyricli module allows you to easily search for lyrics by looking for
25 # song and artist data from diverse sources.
27 # Creates a new Lyricli instance and returns lyrics by going through the
29 # @return [String] the fetched lyrics
31 @lyricli = Lyricli
.new
35 # Returns the version of the library
36 # @return [String] the version
38 Gem
.loaded_specs
["lyricli"].version
41 # Returns a list of the available sources to enable or disable
43 source_manager
= SourceManager
.new
44 source_manager
.available_sources(true).join(", ")
47 def self.enable(source_name
)
48 source_manager
= SourceManager
.new
49 source_manager
.enable(source_name
)
52 def self.disable(source_name
)
53 source_manager
= SourceManager
.new
54 source_manager
.disable(source_name
)
57 def self.reset(source_name
)
58 source_manager
= SourceManager
.new
59 source_manager
.reset(source_name
)