rget 2.2.2 → 2.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/nicodl +24 -0
  3. data/rget.gemspec +1 -1
  4. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07c0811c892fecc7aeac00322ba094560be8d8ac
4
- data.tar.gz: f86dd28fc574307fd8cddbbddd6e0bef22195e97
3
+ metadata.gz: 73e227187f96df91607d1c66502962250d48fcbb
4
+ data.tar.gz: a203607fce1946c916d66467b007a601d4e95540
5
5
  SHA512:
6
- metadata.gz: f623844f4690aee589821a6028423623b3eb818c9795ddfe601ba1cac00ad7721a98ae0ac889eb3b0fde927899d775f36aa2e4ac16a2332f533b5aa87db1d757
7
- data.tar.gz: 6c8cecc8ead79aafc0766e3788ac6e0909dfba38faf3845d082d132daef874665cad339f5107d6785e90c516caf8c6c06abfafd31de1afb06d5440bd3541a765
6
+ metadata.gz: 2da0d8915c8eb771c3431c61c706fe6cd6d0332eb0d4950d3bc58a7906c0149757da45de18fe6e1988c5d5c0bf0e90b61bb9b55bed298577206ee390ac1fa07a
7
+ data.tar.gz: a3b900f9fbb00fafa0b721e81a38dcfd218ce5b1a008eab725565429a51ab94e4b84e272fbeac3f1fbd4a78792dc9f9d50b41ac959881a2b540d6a6faad1f474
data/bin/nicodl ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pit'
4
+ require 'niconico'
5
+ require 'pathname'
6
+
7
+ player_url = ARGV.shift
8
+ unless player_url
9
+ $stderr.puts "usage: nicodl <URL>"
10
+ exit -1
11
+ end
12
+ account = Pit::get('nicovideo', :require => {
13
+ :id => 'your nicovideo id',
14
+ :pass => 'your nicovideo password'
15
+ })
16
+ nico = Niconico.new(account[:id], account[:pass])
17
+ nico.login
18
+ video = nico.video(Pathname(URI(player_url).path).basename.to_s)
19
+ title = video.title
20
+ file = "#{title}.#{video.type}"
21
+ mp3_file = file.sub(/\....$/, '.mp3')
22
+ open(file, 'wb:ASCII-8BIT') do |o|
23
+ video.get_video{|body|o.write(body)}
24
+ 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.2.2"
7
+ spec.version = "2.2.3"
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.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-14 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -141,6 +141,7 @@ description: Downloading newest radio programs on the web. Supported radio stati
141
141
  email:
142
142
  - t@tdtds.jp
143
143
  executables:
144
+ - nicodl
144
145
  - rget
145
146
  extensions: []
146
147
  extra_rdoc_files: []
@@ -150,6 +151,7 @@ files:
150
151
  - LICENSE.txt
151
152
  - README.md
152
153
  - Rakefile
154
+ - bin/nicodl
153
155
  - bin/rget
154
156
  - lib/animate.rb
155
157
  - lib/dropbox.rb