rget 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -13
  3. data/bin/add_mp3info +22 -4
  4. data/rget.gemspec +1 -1
  5. data/rget.yaml +21 -23
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e2999e76ea91ccbe8286225882e5d9f5d49ea11
4
- data.tar.gz: f639cfec7d917d25b231809381e1e5a3ecabf037
3
+ metadata.gz: f0e0f7e7c5cf7075e2c0e5089d305080b0f093f4
4
+ data.tar.gz: d6ed0e66efc6b0f5aaf6e03ed6699bb5ea8f8bc9
5
5
  SHA512:
6
- metadata.gz: 868671217617de58591972f3473626ef5d54945ed99c50b42f5937f298f2e81dc59d1d7d762f77f8e135fd5a0d292d5a69371f4e8fb0c3f37e9f17f48950fa61
7
- data.tar.gz: 32382751f52a221b9b5d656c6ad4388e34f914e33b79ae645ed17d1de86d2005fbe076df65d3a4a395326744efedf592462cbde9e6a3568763949f10f772ea0f
6
+ metadata.gz: 52a0e6c1012a08e408ed63da75067ccad7e9bcc04168da44c1b0eb5480b0c1b20a6cf60fe25ad79745cb76cd89002c0b1c7d844404450cb1a1c62de0e1413fe9
7
+ data.tar.gz: f5899e1f52c02b17b6e531fd09c6faf90b1e00d8dc59124eea066aa4238edf2e15a6566c8939a818fb2783e1ae86be74f111425883b62b9af98d88de6daf8469
data/README.md CHANGED
@@ -18,24 +18,32 @@ For customize radio programs, copy `rget.yaml` to `~/.rget` or current work dire
18
18
 
19
19
  ## Installation
20
20
 
21
- $ gem install rget
21
+ $ gem install rget
22
22
 
23
23
  ## Usage
24
+ ### rget command
24
25
 
25
- # download and convert to mp3 THE iDOLM@STER Cinderella Girls Radio
26
- rget imas_cg
26
+ # save a template of the radio program configration
27
+ rget yaml http://example.com/radio >> ~/.rget
27
28
 
28
- # download imastudio only (saved .m4a file)
29
- rget imastudio --no-mp3
29
+ # download and convert to mp3 THE iDOLM@STER Cinderella Girls Radio
30
+ rget imas_cg
30
31
 
31
- # srore mp3 file to specified directory
32
- rget trysail --path=/home/hoge/radio
32
+ # download takamori only (saved movie file)
33
+ rget takamori --no-mp3
33
34
 
34
- # store mp3 file to radio folder of Dropbox
35
- rget suzakinishi --path=dropbpx://radio
35
+ # srore mp3 file to specified directory
36
+ rget suzakinishi --path=/home/hoge/radio
36
37
 
37
- # show a template of the radio program configration
38
- rget yaml http://example.com/radio
38
+ # store mp3 file to radio folder of Dropbox
39
+ rget matsui --path=dropbpx://radio
39
40
 
40
- # download nicovideo live program by nicodl command
41
- nicodl http://live.nicovideo.jp/watch/lv999999999
41
+ ### nicodl command
42
+
43
+ # download nicovideo live program
44
+ nicodl http://live.nicovideo.jp/watch/lv999999999
45
+
46
+ ### add\_mp3info
47
+
48
+ # set cover photo into mp3 file
49
+ add_mp3info sample.mp3 cover.jpg
@@ -2,9 +2,27 @@
2
2
  require 'mp3info'
3
3
  require 'open-uri'
4
4
 
5
+ if ARGV.size < 1
6
+ puts <<~USAGE
7
+ usage: add_mp3info <mp3_file> [cover_photo]
8
+
9
+ mp3_file: *.mp3 file in local
10
+ cover_photo: JPEG or PNG file path or URL
11
+ USAGE
12
+ exit -1
13
+ end
14
+
5
15
  mp3 = ARGV.shift
6
16
  cover = ARGV.shift
7
- m = Mp3Info.new(mp3)
8
- m.tag.title = File.basename(mp3, '.mp3')
9
- m.tag2.add_picture(open(cover, 'r:ASCII-8BIT').read) if cover
10
- m.close
17
+ begin
18
+ m = Mp3Info.new(mp3)
19
+ m.tag.title = File.basename(mp3, '.mp3')
20
+ m.tag2.add_picture(open(cover, 'r:ASCII-8BIT').read) if cover
21
+ m.close
22
+ rescue Errno::ENOENT
23
+ $stderr.puts "file not found: #{mp3}"
24
+ exit -2
25
+ rescue Mp3InfoError
26
+ $stderr.puts "#{$!.message}: #{mp3}"
27
+ exit -3
28
+ end
@@ -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 = "4.0.1"
7
+ spec.version = "4.0.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, onsen, niconico and freshlive.}
data/rget.yaml CHANGED
@@ -5,23 +5,24 @@ programs:
5
5
  desc: デレラジ☆
6
6
  url: http://hibiki-radio.jp/description/imas_cg
7
7
  label: デレラジ☆
8
- bahamut:
9
- desc: ラジオ神撃のバハムート
10
- url: http://hibiki-radio.jp/description/bahamut
11
- label: バハムート
12
- st501:
13
- desc: 501st JFW.OA~第五○一統合戦闘航空団公式放送~
14
- url: http://hibiki-radio.jp/description/501st
15
- label: ストパン501
16
- rebuild:
17
- desc: Rebuild.fm
18
- url: http://feeds.rebuild.fm/rebuildfm
19
- label: rebuildfm
20
- podcast: true
8
+ matsui:
9
+ desc: ラジオ「松井恵理子のにじらじっ!」
10
+ url: http://www.onsen.ag/program/matsui/
11
+ label: 松井恵理子のにじらじ
12
+ cover: //*[@id='newProgramWrap']//img[1]/@src
21
13
  suzakinishi:
22
14
  desc: 洲崎西
23
15
  url: http://ch.nicovideo.jp/search/%E6%B4%B2%E5%B4%8E%E8%A5%BF?channel_id=ch2589908&mode=s&sort=f&order=d&type=video
24
16
  label: 洲崎西
17
+ cover: https://pbs.twimg.com/profile_images/836214019849506818/kXSasy1Y.jpg
18
+ takamori:
19
+ desc: 高森重戦舎 (声優バラエティ専門「声フレ」チャンネル内)
20
+ url: https://freshlive.tv/seifre
21
+ label: 高森重戦舎
22
+ bahamut:
23
+ desc: ラジオ神撃のバハムート
24
+ url: http://hibiki-radio.jp/description/bahamut
25
+ label: バハムート
25
26
  ssc:
26
27
  desc: 春佳・彩花のSSちゃんねる
27
28
  url: http://ch.nicovideo.jp/search/SS%E3%81%A1%E3%82%83%E3%82%93%E3%81%AD%E3%82%8B?channel_id=ch2589908&mode=s&sort=f&order=d&type=video
@@ -39,14 +40,11 @@ programs:
39
40
  url: http://ch.nicovideo.jp/search/TrySail?channel_id=ch2585696&mode=s&sort=f&order=d&type=video
40
41
  label: トラハモ
41
42
  banpresto:
42
- desc: アイドルマスターWebラジオ~バンプレストスペシャル~ラジオは……遊びでは、ないんですから
43
- url: http://ch.nicovideo.jp/search/%E3%82%A2%E3%82%A4%E3%83%89%E3%83%AB%E3%83%9E%E3%82%B9%E3%82%BF%E3%83%BC?channel_id=ch346&mode=s&sort=f&order=d&type=video
43
+ desc: アイドルマスターWebラジオ~バンプレストスペシャル~
44
+ url: http://ch.nicovideo.jp/search/IDOLM@STER?channel_id=ch346&mode=s&sort=f&order=d&type=video
44
45
  label: バンプレスト
45
- takamori:
46
- desc: 高森重戦舎 (声優バラエティ専門「声フレ」チャンネル内)
47
- url: https://freshlive.tv/seifre
48
- label: 高森重戦舎
49
- matsui:
50
- desc: ラジオ「松井恵理子のにじらじっ!」
51
- url: http://www.onsen.ag/program/matsui/
52
- label: 松井恵理子のにじらじ
46
+ rebuild:
47
+ desc: Rebuild.fm
48
+ url: http://feeds.rebuild.fm/rebuildfm
49
+ label: rebuildfm
50
+ podcast: true
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: 4.0.1
4
+ version: 4.0.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: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor