X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/b9f550e97a60c4953fd1ae9374045110836764bd..f1f1106951c4acf88e28555415d39e249a3d13f6:/bin/lrc?ds=sidebyside diff --git a/bin/lrc b/bin/lrc index 7bb2699..19e5456 100755 --- a/bin/lrc +++ b/bin/lrc @@ -3,8 +3,6 @@ require 'optparse' require 'lyricli' - -options = {} OptionParser.new do |opts| opts.banner = %{Usage: lrc [options] @@ -15,7 +13,8 @@ Options: } opts.on("-e", "--enable SOURCE", "Enable SOURCE") do |source| - puts "Enabling sources is not yet implemented" + Lyricli.enable(source) + puts "#{source} has been enabled" exit end @@ -25,15 +24,21 @@ Options: end opts.on("-d", "--disable SOURCE", "Disable SOURCE") do |source| - puts "Disabling sources is not yet implemented" + Lyricli.disable(source) + puts "#{source} has been disabled" exit end opts.on("-r", "--reset SOURCE", "Reset the configuration of SOURCE") do |source| - puts "Resetting sources is not yet implemented" + Lyricli.reset(source) + puts "#{source} has been disabled and all its configuration reset" exit end + opts.on("-t", "--title", "Shows the song title and artist") do + Lyricli.show_title + end + opts.on("-h", "--help", "Shows this message") do puts opts exit