OSDN Git Service

update bowlroll.net
[tdcgexplorer/nimono-crawlers.git] / bin / load-arcs-bowl.rb
1 #!ruby
2 # encoding: utf-8
3 $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
4 $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../app/models')
5 require 'connection'
6 require 'site'
7 require 'arc'
8 require 'pmd'
9 require 'vmd'
10 require 'x'
11 require 'thumb'
12 require 'bowl'
13
14 site = Site.find('mmdbowl')
15
16 Bowl.each_code_in_rss do |code|
17   bowl = Bowl.new(code)
18   bowl.load
19   next if bowl.removed?
20
21   name = bowl.name
22   summary = bowl.summary
23   size = '0KB'
24   date = '01/01/01(Mon),00:00:00'
25   origname = bowl.origname
26   locked = bowl.locked?
27
28   arc = site.create_arc(name, summary, size, date, origname, locked)
29   arc.create_entries("/Volumes/uploader/arc/#{site.code}/#{name}") unless locked
30   puts
31 end