Module: Irosi

Defined in:
lib/irosi.rb,
lib/irosi/version.rb

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.parse(opts) ⇒ Object

Your code goes here…



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/irosi.rb', line 6

def self.parse(opts)
	n = opts[:num]
	b = opts[:begin]
	e = opts[:end]
	
	file = opts[:file] 
	debug_able = false;
	
	if File.directory?(file)
		puts 'exist path'
	else
		puts 'not exitst path'
	end
	
	if(b)
		# 下载从begin开始到end结束中间的所有专辑
		Rosi.download debug_able do
			 for num in "#{b}".."#{e}"
				 	item(num)
			 end
		end
		
	elsif(n)
		# 指定具体专辑id
		Rosi.download debug_able do
		 	item(n)
		end
	
	else
		puts '没有合法参数'
	end
 
end