module Helpema::YouTubeDL

Attributes

version[RW]

Public Instance Methods

json(url, &blk) click to toggle source
# File lib/helpema/youtubedl.rb, line 22
    def json(url, &blk) = YouTubeDL._json(url:url, &blk)

    YouTubeDL.define_command(:_mp3,
      cmd: 'youtube-dl', version: YouTubeDL.version,
      usage: { output: nil,
               'extract-audio': true,
               'audio-format': true,
               arg0: 'mp3',
               arg1: nil },
      synonyms: {url: :arg1},
      err: '/dev/null')
    def mp3(url, output:'%(id)s.%(ext)s') = YouTubeDL._mp3(url:url, output:output)

    extend self
  end
end
mp3(url, output:'%(id)s.%(ext)s') click to toggle source
# File lib/helpema/youtubedl.rb, line 33
  def mp3(url, output:'%(id)s.%(ext)s') = YouTubeDL._mp3(url:url, output:output)

  extend self
end