rget 2.7.1 → 2.7.2
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.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/bin/nicodl +10 -11
- data/rget.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bbbd28e40ec354497198cdb9b5fe2456c9ff6c4
|
4
|
+
data.tar.gz: 9354fca608535650fb6d8a32fe76879fad5d92bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a122d30189b2f9982b89df34764a267b1e89bfb56de8896a6a82fa4947579a7b886c5c11bfcc577b134748c8d81ba43ff14da8e70d28da145286790195b969e2
|
7
|
+
data.tar.gz: 908131045e849b941f1fa2a429f242124d28efe8dae45ca3d4ca9b953617347a5a800f00ed9e671c1241c117017b1b1b823d94f62b1a1dc07f7a7a11cc17b7ce
|
data/README.md
CHANGED
@@ -12,9 +12,20 @@ For customize radio programs, copy `rget.yaml` to `~/.rget` or current work dire
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
|
16
|
-
rget
|
15
|
+
# download and convert to mp3 THE iDOLM@STER Cinderella Girls Radio
|
16
|
+
rget imas_cg
|
17
|
+
|
18
|
+
# download imastudio only (saved .m4a file)
|
19
|
+
rget imastudio --no-mp3
|
20
|
+
|
21
|
+
# srore mp3 file to specified directory
|
17
22
|
rget trysail --path=/home/hoge/radio
|
18
|
-
|
23
|
+
|
24
|
+
# store mp3 file to radio folder of Dropbox
|
19
25
|
rget suzakinishi --path=dropbpx://radio
|
20
|
-
|
26
|
+
|
27
|
+
# show a template of the radio program configration
|
28
|
+
rget yaml http://example.com/radio
|
29
|
+
|
30
|
+
# download nicovideo live program by nicodl command
|
31
|
+
nicodl http://live.nicovideo.jp/watch/lv999999999
|
data/bin/nicodl
CHANGED
@@ -31,7 +31,7 @@ video_id = Pathname(URI(player_url).path).basename.to_s
|
|
31
31
|
begin
|
32
32
|
# downloading video
|
33
33
|
video = nico.video(video_id)
|
34
|
-
file = "#{video.title}.#{video.type}".gsub(%r([\\/\?:*"><|]), '_')
|
34
|
+
file = "#{video.title}.#{video.type}".gsub(%r([\\/\?:*"'><|]), '_')
|
35
35
|
open(file, 'wb:ASCII-8BIT') do |o|
|
36
36
|
video.get_video{|body|o.write(body)}
|
37
37
|
end
|
@@ -41,11 +41,11 @@ rescue Mechanize::ResponseCodeError
|
|
41
41
|
begin
|
42
42
|
live.rtmpdump_commands(video_id).each_with_index do |cmd, i|
|
43
43
|
src = "#{video_id}-#{i+1}.flv"
|
44
|
-
dst = "#{live.title.gsub(%r
|
44
|
+
dst = "#{live.title.concat("'").gsub(%r([\\/\?:*"'><|]), '_')}-#{i+1}.mp4"
|
45
45
|
unless File.exist?(src)
|
46
46
|
cmd[cmd.index('-o') + 1] = "./#{src}"
|
47
47
|
begin
|
48
|
-
o, e, s = Open3.capture3(cmd
|
48
|
+
o, e, s = Open3.capture3(*cmd)
|
49
49
|
unless s.exitstatus == 0
|
50
50
|
$stderr.puts e
|
51
51
|
next
|
@@ -58,21 +58,20 @@ rescue Mechanize::ResponseCodeError
|
|
58
58
|
$stderr.puts "#{src} is existent. skipping."
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
args =
|
61
|
+
cmd = 'ffmpeg'
|
62
|
+
args = ['-i', src, '-acodec', 'copy', '-vcodec', 'copy', dst]
|
63
63
|
begin
|
64
|
-
o, e, s = Open3.capture3(
|
64
|
+
o, e, s = Open3.capture3(cmd, *args)
|
65
65
|
unless s.exitstatus == 0
|
66
|
-
raise Errno::ENOENT.new(avconv) if e =~ /: not found/
|
67
66
|
$stderr.puts e
|
68
67
|
next
|
69
68
|
end
|
70
69
|
File.delete(src)
|
71
70
|
rescue Errno::ENOENT
|
72
|
-
if
|
73
|
-
$stderr.puts
|
74
|
-
else
|
75
|
-
|
71
|
+
if cmd == 'avconv'
|
72
|
+
$stderr.puts "ffmpeg or avconv not found."
|
73
|
+
else # retry with avconv command instead of ffmpeg
|
74
|
+
cmd = 'avconv'
|
76
75
|
retry
|
77
76
|
end
|
78
77
|
end
|
data/rget.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "rget"
|
7
|
-
spec.version = "2.7.
|
7
|
+
spec.version = "2.7.2"
|
8
8
|
spec.authors = ["TADA Tadashi"]
|
9
9
|
spec.email = ["t@tdtds.jp"]
|
10
10
|
spec.description = %q{Downloading newest radio programs on the web. Supported radio stations are hibiki, animate, onsen, seaside communications, niconico and youtube.}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|