OSDN Git Service

with location
authornomeu <nomeu@nomeu.org>
Sat, 12 Jun 2010 17:17:34 +0000 (02:17 +0900)
committernomeu <nomeu@nomeu.org>
Sat, 12 Jun 2010 17:17:34 +0000 (02:17 +0900)
bin/read-upl.rb

index 4f358af..714f346 100644 (file)
@@ -4,7 +4,9 @@ row_re = %r(</td><td><a href="(.+?)">(.+?)</a></td><td>(.+?)</td><td>(.+?)</td><
 key_re = Regexp.new(Regexp.escape("<font color=\"#FF0000\">[DLKey] </font>"))
 password_re = Regexp.new(Regexp.escape("<font color=\"#FF0000\">*</font>"))
 
-Dir.glob('/Volumes/uploader/src/mmd/index.html') do |ent|
+location = ARGV.shift || 'mmd'
+
+Dir.glob("/Volumes/uploader/src/#{location}/index.html") do |ent|
   f = open(ent)
   while line = f.gets
     if match = row_re.match(line)