+#!ruby
+# vim: fileencoding=utf-8
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
+require 'scrap'
+
+location = ARGV.shift || 'mmd'
+scrap = Scrap.find_by_location(location)
+
require 'rubygems'
gem 'zipruby'
require 'zipruby'
puts "error: " + exc.message
end
-location = ARGV.shift || 'mmd'
-
-Dir.glob("/Volumes/uploader/arc/#{location}/*.zip") do |ent|
- dump_zip(ent)
- puts
+ent = "/Volumes/uploader/src/#{location}/index.html"
+open(ent) do |f|
+ while line = f.gets
+ if scrap.match(line)
+ name, = scrap.row
+ dump_zip("/Volumes/uploader/arc/#{location}/#{name}")
+ puts
+ end
+ end
end