iqdb fixes

This commit is contained in:
r888888888
2014-03-27 10:54:47 -07:00
parent 7a3e843259
commit 22a2c97963
3 changed files with 7 additions and 4 deletions

View File

@@ -1,15 +1,15 @@
module Iqdb
class Importer
def import!
IO.popen("iqdb command #{Danbooru.config.iqdb_file}", "w") do |io|
Post.find_each do |post|
Post.find_each do |post|
IO.popen("iqdb command #{Danbooru.config.iqdb_file}", "w") do |io|
if File.exists?(post.preview_file_path)
puts post.id
hex = post.id.to_s(16)
io.puts "add 0 #{hex}:#{post.preview_file_path}"
end
io.puts "quit"
end
io.puts "quit"
end
end
end