]>
Commit | Line | Data |
---|---|---|
823e558b BB |
1 | #!/usr/bin/env ruby -w |
2 | ||
b9f550e9 | 3 | require 'optparse' |
823e558b | 4 | require 'lyricli' |
b9f550e9 BB |
5 | |
6 | ||
7 | options = {} | |
8 | OptionParser.new do |opts| | |
9 | opts.banner = %{Usage: | |
10 | lrc [options] | |
11 | lrc artist song | |
12 | lrc You must enable other sources for this | |
13 | ||
14 | Options: | |
15 | } | |
16 | ||
17 | opts.on("-e", "--enable SOURCE", "Enable SOURCE") do |source| | |
18 | puts "Enabling sources is not yet implemented" | |
19 | exit | |
20 | end | |
21 | ||
22 | opts.on("-l", "--list-sources", "List all available Sources") do | |
23 | puts Lyricli.sources | |
24 | exit | |
25 | end | |
26 | ||
27 | opts.on("-d", "--disable SOURCE", "Disable SOURCE") do |source| | |
28 | puts "Disabling sources is not yet implemented" | |
29 | exit | |
30 | end | |
31 | ||
32 | opts.on("-r", "--reset SOURCE", "Reset the configuration of SOURCE") do |source| | |
33 | puts "Resetting sources is not yet implemented" | |
34 | exit | |
35 | end | |
36 | ||
37 | opts.on("-h", "--help", "Shows this message") do | |
38 | puts opts | |
39 | exit | |
40 | end | |
41 | ||
42 | opts.on("-v", "--version", "Show version") do | |
43 | puts Lyricli.version | |
44 | exit | |
45 | end | |
46 | end.parse! | |
47 | ||
48 | ||
823e558b | 49 | puts Lyricli.lyrics |