]> git.r.bdr.sh - rbdr/lyricli.rb/blobdiff - bin/lrc
Implements the lrc executable
[rbdr/lyricli.rb] / bin / lrc
diff --git a/bin/lrc b/bin/lrc
old mode 100644 (file)
new mode 100755 (executable)
index e69de29..7bb2699
--- a/bin/lrc
+++ b/bin/lrc
@@ -0,0 +1,49 @@
+#!/usr/bin/env ruby -w
+
+require 'optparse'
+require 'lyricli'
+
+
+options = {}
+OptionParser.new do |opts|
+    opts.banner = %{Usage:
+    lrc [options]
+    lrc artist song
+    lrc                              You must enable other sources for this
+
+Options:
+}
+
+    opts.on("-e", "--enable SOURCE", "Enable SOURCE") do |source|
+      puts "Enabling sources is not yet implemented"
+      exit
+    end
+
+    opts.on("-l", "--list-sources", "List all available Sources") do
+      puts Lyricli.sources
+      exit
+    end
+
+    opts.on("-d", "--disable SOURCE", "Disable SOURCE") do |source|
+      puts "Disabling sources is not yet implemented"
+      exit
+    end
+
+    opts.on("-r", "--reset SOURCE", "Reset the configuration of SOURCE") do |source|
+      puts "Resetting sources is not yet implemented"
+      exit
+    end
+
+    opts.on("-h", "--help", "Shows this message") do
+      puts opts
+      exit
+    end
+
+    opts.on("-v", "--version", "Show version") do
+      puts Lyricli.version
+      exit
+    end
+end.parse!
+
+
+puts Lyricli.lyrics