require 'scrap'
location = ARGV.shift || 'mmd'
-
-case location
-when 'mmd'
- scrap = Scrap_mmd.new
-when 'mmdfile'
- scrap = Scrap_mmdfile.new
-when 'mmdacc1'
- scrap = Scrap_mmdacc1.new
-when 'mmdacc2'
- scrap = Scrap_mmdacc2.new
-end
+scrap = Scrap.find_by_location(location)
ent = "/Volumes/uploader/src/#{location}/index.html"
open(ent) do |f|
require 'nkf'
class Scrap
+
def match(line)
@md = @row_re.match(line)
end
[ name, encode(comment), size, encode(date) ]
end
end
+
+def Scrap.find_by_location(location)
+ case location
+ when 'mmd'
+ scrap = Scrap_mmd.new
+ when 'mmdfile'
+ scrap = Scrap_mmdfile.new
+ when 'mmdacc1'
+ scrap = Scrap_mmdacc1.new
+ when 'mmdacc2'
+ scrap = Scrap_mmdacc2.new
+ end
+end