ruby-youtube-dl 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/bin/ruby-youtube-dl +3 -0
- data/bin/youtube-dl.py +4055 -0
- data/lib/ruby-youtube-dl.rb +5 -0
- data/lib/ruby-youtube-dl/downloader.rb +11 -0
- data/lib/ruby-youtube-dl/version.rb +3 -0
- data/ruby-youtube-dl.gemspec +24 -0
- metadata +77 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
module YoutubeDL
|
2
|
+
class Downloader
|
3
|
+
def self.download_video(url)
|
4
|
+
`ruby-youtube-dl --no-progress --get-filename -q #{url}`.strip
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.download_audio(url)
|
8
|
+
`ruby-youtube-dl --no-progress --get-filename --extract-audio --audio-format=mp3 -tAq #{url}`.strip
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "ruby-youtube-dl/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "ruby-youtube-dl"
|
7
|
+
s.version = YoutubeDL::VERSION
|
8
|
+
s.authors = ["Ben Morris"]
|
9
|
+
s.email = ["ben@bnmrrs.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Wrapper around the youtube-dl python lib}
|
12
|
+
s.description = %q{Wraps youtube-dl for easy package management}
|
13
|
+
|
14
|
+
s.rubyforge_project = "ruby-youtube-dl"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
# s.add_runtime_dependency "rest-client"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-youtube-dl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ben Morris
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-10-26 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Wraps youtube-dl for easy package management
|
23
|
+
email:
|
24
|
+
- ben@bnmrrs.com
|
25
|
+
executables:
|
26
|
+
- ruby-youtube-dl
|
27
|
+
- youtube-dl.py
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files: []
|
31
|
+
|
32
|
+
files:
|
33
|
+
- .gitignore
|
34
|
+
- Gemfile
|
35
|
+
- Rakefile
|
36
|
+
- bin/ruby-youtube-dl
|
37
|
+
- bin/youtube-dl.py
|
38
|
+
- lib/ruby-youtube-dl.rb
|
39
|
+
- lib/ruby-youtube-dl/downloader.rb
|
40
|
+
- lib/ruby-youtube-dl/version.rb
|
41
|
+
- ruby-youtube-dl.gemspec
|
42
|
+
has_rdoc: true
|
43
|
+
homepage: ""
|
44
|
+
licenses: []
|
45
|
+
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
version: "0"
|
69
|
+
requirements: []
|
70
|
+
|
71
|
+
rubyforge_project: ruby-youtube-dl
|
72
|
+
rubygems_version: 1.3.7
|
73
|
+
signing_key:
|
74
|
+
specification_version: 3
|
75
|
+
summary: Wrapper around the youtube-dl python lib
|
76
|
+
test_files: []
|
77
|
+
|