style fixes

This commit is contained in:
albert
2011-12-06 18:58:26 -05:00
parent 4baf5be7a2
commit 8e3a6c5923
9 changed files with 22 additions and 11 deletions

View File

@@ -1,6 +1,16 @@
require 'danbooru_image_resizer/danbooru_image_resizer'
namespace :images do
desc "Generate thumbnail-sized images of posts"
task :generate_preview => :environment do
Post.where("image_width > ?", Danbooru.config.small_image_width).find_each do |post|
if post.is_image?
puts "resizing preview #{post.id}"
Danbooru.resize(post.file_path, post.preview_file_path, Danbooru.config.small_image_width, Danbooru.config.small_image_width, 80)
end
end
end
desc "Generate medium-sized images of posts"
task :generate_medium => :environment do
Post.where("image_width > ?", Danbooru.config.medium_image_width).find_each do |post|