module CommandHelper
installing youtube-dl:
`sudo curl -L yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl`
`sudo chmod a+rx /usr/bin/youtube-dl`
note: avconv is included with ffmpeg
Public Instance Methods
list(a=@commands)
click to toggle source
# File lib/easyaudio_utils.rb, line 24 def list(a=@commands) format_command = ->(s) do command, desc = s.split(/\s+#\s+/,2) " %s %s %s" % ['*'.blue, command, desc.to_s.light_black] end s = a.map {|x| format_command.call(x) }.join("\n") puts s end
search(s)
click to toggle source
# File lib/easyaudio_utils.rb, line 35 def search(s) list @commands.grep Regexp.new(s) end