implement iqdb wrapper

This commit is contained in:
r888888888
2014-03-21 16:43:02 -07:00
parent 0add72f2bd
commit 16712b7d56
24 changed files with 335 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
module Iqdb
class Importer
def import!
IO.popen("iqdb add #{Rails.root}/danbooru.db", "w") do |io|
Post.find_each do |post|
if File.exists?(post.preview_file_path)
io.puts "#{post.id.to_s(16)}:#{post.preview_file_path}"
end
end
end
end
end
end