56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# File 'lib/paradiso.rb', line 56
def parse_cl! options, args
args.options do |o|
o.set_summary_indent ' '
o.banner = "Usage: #{File.basename $0} [Options]"
o.define_head "Paradiso #{VERSION}: A simple mplayer CLI"
o.on_tail("-h", "--help", "Show this help message.") { puts o; exit }
o.on_tail("-v", "--version", "Show version number") { puts "Paradiso %s" % [VERSION]; exit}
o.on("-a", "--amount n", Integer, "Play [n] items") { |amount|
options[:amount] = amount
}
o.on("-A", "--aspect-ratio n", String, "Aspect ratio - 16:9, 4:3..") { |ratio|
options[:aspectratio] = ratio
}
o.on("-d", "--delete", "Delete items from paylist") {
options[:delete] = true
}
o.on("-f", "--fullscreen", "Fullscreen mode") {
options[:fullscreen] = true
}
o.on("-n", "--name path", String, "Playlist path to create") { |path|
options[:path] = path
}
o.on("-p", "--playlist", "The arguments is playlists") {
options[:playlist] = true
}
o.on("-s", "--screen n", Integer, "Which screen to play from") { |screen|
options[:screen] = screen
}
o.on("-S", "--autosubs", "Load automatic subs") {
options[:autosubs] = true
}
o.parse!
return options, args
end
end
|