OSDN Git Service

deleted unused scripts
authornomeu <nomeu@users.sourceforge.jp>
Wed, 6 Feb 2013 08:36:26 +0000 (17:36 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Wed, 6 Feb 2013 08:36:26 +0000 (17:36 +0900)
bin/crawl-nijibox5.sh [deleted file]
bin/crawl.sh
bin/mmd-idx.rb [deleted file]
bin/mmdacc1-idx.rb [deleted file]
bin/mmdacc2-idx.rb [deleted file]
bin/mmdfile-idx.rb [deleted file]
bin/scrap.sh
lib/scrap.rb

diff --git a/bin/crawl-nijibox5.sh b/bin/crawl-nijibox5.sh
deleted file mode 100755 (executable)
index df8caa3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-ruby bin/hnt-idx.rb
-ruby bin/mod-idx.rb
-ruby bin/pnt-idx.rb
-ruby bin/tim-idx.rb
index c6689d3..84894c2 100755 (executable)
@@ -1,7 +1,3 @@
 #!/bin/sh
-# ruby bin/mmd-idx.rb
-# ruby bin/mmdfile-idx.rb
-# ruby bin/mmdacc1-idx.rb
-# ruby bin/mmdacc2-idx.rb
 ruby bin/mmd3dcu-idx.rb
 ruby bin/mmdbowl-idx.rb
diff --git a/bin/mmd-idx.rb b/bin/mmd-idx.rb
deleted file mode 100644 (file)
index f9e23da..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/ruby
-# download from mikumikudance
-# http://bytatsu.net/uploader/mikumikudance/index.html
-
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'sn_uploader'
-
-def each_filename(text)
-  file_href = './src/'
-  file_re = Regexp.new(Regexp.escape(file_href) + '(.+)')
-  text.scan(/href="(.+?)"/) do |href, |
-    if md = file_re.match(href)
-      yield md[1]
-    end
-  end
-end
-
-uploader = SnUploader.new
-uploader.host = "bytatsu.net"
-uploader.root_path = "/uploader/mikumikudance"
-uploader.base_html = "index.html"
-uploader.local_dir = '/Volumes/uploader/arc/mmd'
-body = uploader.get_base
-open('/Volumes/uploader/src/mmd/index.html', 'w'){ |f| f.puts body }
-each_filename(body) do |filename|
-  exist = uploader.local_file_exist?(filename)
-  puts [ filename, exist ? 'exist' : 'download' ].join("\t")
-  uploader.download_file_directly(filename) unless exist
-end
diff --git a/bin/mmdacc1-idx.rb b/bin/mmdacc1-idx.rb
deleted file mode 100644 (file)
index 68fcfcc..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/ruby
-# download from mikumikudance
-# http://www9.atpages.jp/~mmdaccessory/uploader/index.php
-
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'sn_uploader'
-
-def each_filename(text)
-  file_href = './log/'
-  file_re = Regexp.new(Regexp.escape(file_href) + '(.+)')
-  text.scan(/href='(.+?)'/) do |href, |
-    if md = file_re.match(href)
-      yield md[1]
-    end
-  end
-end
-
-uploader = SnUploader.new
-uploader.host = "www9.atpages.jp"
-uploader.root_path = "/~mmdaccessory/uploader"
-uploader.local_dir = '/Volumes/uploader/arc/mmdacc1'
-  uploader.base_html = "index.php"
-  body = uploader.get_base
-  open('/Volumes/uploader/src/mmdacc1/index.html', 'w'){ |f| f.puts body }
-  each_filename(body) do |filename|
-    exist = uploader.local_file_exist?(filename)
-    puts [ filename, exist ? 'exist' : 'download' ].join("\t")
-    uploader.download_file_directly(filename, '/log') unless exist
-  end
diff --git a/bin/mmdacc2-idx.rb b/bin/mmdacc2-idx.rb
deleted file mode 100644 (file)
index c8a81da..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/ruby
-# download from mikumikudance
-# http://www9.atpages.jp/~mmdaccessory/uploader2/index.html
-
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'sn_uploader'
-
-def each_filename(text)
-  file_href = 'http://www9.atpages.jp/~mmdaccessory/uploader2/src/'
-  file_re = Regexp.new(Regexp.escape(file_href) + '(.+)\.html')
-  text.scan(/href="(.+?)"/) do |href, |
-    if md = file_re.match(href)
-      yield md[1]
-    end
-  end
-end
-
-uploader = SnUploader.new
-uploader.host = "www9.atpages.jp"
-uploader.root_path = "/~mmdaccessory/uploader2"
-uploader.local_dir = '/Volumes/uploader/arc/mmdacc2'
-  uploader.base_html = "index.html"
-  body = uploader.get_base
-  open('/Volumes/uploader/src/mmdacc2/index.html', 'w'){ |f| f.puts body }
-  each_filename(body) do |filename|
-    exist = uploader.local_file_exist?(filename)
-    puts [ filename, exist ? 'exist' : 'download' ].join("\t")
-    uploader.download_file_through_counter(filename) unless exist
-  end
diff --git a/bin/mmdfile-idx.rb b/bin/mmdfile-idx.rb
deleted file mode 100644 (file)
index ce94eae..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/ruby
-# download from mikumikudance
-# http://loda.jp/mmdfile/
-
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'sn_uploader'
-
-def each_id(text)
-  file_href = '?id='
-  file_re = Regexp.new(Regexp.escape(file_href) + '(\d+)\\z')
-  text.scan(/href="(.+?)"/) do |href, |
-    if md = file_re.match(href)
-      yield md[1]
-    end
-  end
-end
-
-uploader = SnUploader.new
-uploader.host = "loda.jp"
-uploader.root_path = "/mmdfile"
-uploader.local_dir = '/Volumes/uploader/arc/mmdfile'
-  uploader.base_html = "/"
-  body = uploader.get_base
-  open('/Volumes/uploader/src/mmdfile/index.html', 'w'){ |f| f.puts body }
-  each_id(body) do |id|
-    filename = id + '.zip'
-    exist = uploader.local_file_exist?(filename)
-    puts [ id, exist ? 'exist' : 'download' ].join("\t")
-    uploader.download_file_directly_id(filename)
-  end
index 6d9f094..ee41e28 100755 (executable)
@@ -1,8 +1,4 @@
 #!/bin/sh
-# ruby bin/load-arcs.rb mmd
-# ruby bin/load-arcs.rb mmdfile
-# ruby bin/load-arcs.rb mmdacc1
-# ruby bin/load-arcs.rb mmdacc2
 ruby bin/load-arcs.rb mmd3dcu
 ruby bin/load-arcs-bowl.rb
 
index d6f926a..7fc8ed3 100644 (file)
@@ -20,58 +20,6 @@ class Scrap
   end
 end
 
-class Scrap_mmd < Scrap
-  def initialize
-    @row_re = %r(</td><td><a href="(.+?)">(.+?)</a></td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td></tr>)
-    @key_re = Regexp.new(Regexp.escape("<font color=\"#FF0000\">[DLKey] </font>"))
-    @password_re = Regexp.new(Regexp.escape("<font color=\"#FF0000\">*</font>"))
-  end
-
-  def row
-    _, href, name, comment, size, date, mime, orig = @md.to_a
-    locked = !!comment.sub!(@key_re, '')
-    comment.sub!(@password_re, '')
-    [ name, comment, size, date, orig, locked ]
-  end
-end
-
-class Scrap_mmdfile < Scrap
-  def initialize
-    @row_re = %r(<td>\[<a href="(.+?)" >(.+?)</a>\]</td><td>(.+?) <a href="(?:.+?)">(?:.+?)</a></td><td class="size">(.+?)</td><td class="date">(.+?)</td><td class="orig"><span class="orig">(.+?)</span></td>)
-    @key_re = Regexp.new(Regexp.escape("<strong class=\"key\">[P]</strong> "))
-  end
-
-  def row
-    _, href, name, comment, size, date, orig = @md.to_a
-    locked = !!comment.sub!(@key_re, '')
-    [ name, comment, size, date, orig, locked ]
-  end
-end
-
-class Scrap_mmdacc1 < Scrap
-  def initialize
-    @row_re = %r(<td align=center>\[<a href='(.+?)' target='_new'>(.+?)</a>\]</td><td>(.+?)</td><td align=right>(.+?)</td><td align=center>(.+?)</td><td>(.+))
-  end
-
-  def row
-    _, href, name, comment, size, date, orig = @md.to_a
-    [ name, encode(comment), size, date, encode(orig), false ]
-  end
-end
-
-class Scrap_mmdacc2 < Scrap
-  def initialize
-    @row_re = %r(</td><td><a href="(.+?)">(.+?)</a></td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td><td class="down_max">(.+?)</td></tr>)
-    @key_re = Regexp.new(Regexp.escape(encode_to_sjis("<font color=\"#FF0000\">[パス設定] </font>")))
-  end
-
-  def row
-    _, href, name, comment, size, date = @md.to_a
-    locked = !!comment.sub!(@key_re, '')
-    [ name, encode(comment), size, encode(date), nil, locked ]
-  end
-end
-
 class Scrap_mmd3dcu < Scrap
   def initialize
     @row_re = %r(</td><td><a href="(.+?)">(.+?)</a></td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td><td>(.+?)</td></tr>)
@@ -89,14 +37,6 @@ end
 
 def Scrap.find_by_site_code(site_code)
   case site_code
-  when 'mmd'
-    scrap = Scrap_mmd.new
-  when 'mmdfile'
-    scrap = Scrap_mmdfile.new
-  when 'mmdacc1'
-    scrap = Scrap_mmdacc1.new
-  when 'mmdacc2'
-    scrap = Scrap_mmdacc2.new
   when 'mmd3dcu'
     scrap = Scrap_mmd3dcu.new
   end