integration cleanups

This commit is contained in:
John Bintz 2010-01-10 17:12:23 -05:00
parent 846920e7c2
commit e0f4c6935e
2 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@ class FileProcessor
end end
end end
page_index += 1 @page_index += 1
end end
end end

View File

@ -1,18 +1,19 @@
require File.dirname(__FILE__) + '/OutputFilter.rb' require File.dirname(__FILE__) + '/OutputFilter.rb'
require File.dirname(__FILE__) + '/../modules/ImageProcessing.rb'
# #
# Process an input file for the Web # Process an input file for the Web
# #
class TempBitmapToWeb < OutputFilter class TempBitmapToWeb < OutputFilter
include ImageProcessing
def build(input, output) def build(input, output)
quality = @config['quality'] ? @config['quality'] : 80 quality = @config['quality'] ? @config['quality'] : 80
convert("\"#{input}\" -quality #{quality} \"#{output}\"") convert("\"#{input}\" -quality #{quality} \"#{output}\"")
end end
def filename(info) def filename(info)
index = info['index'].to_i info['date'] = @config['publish_dates'][info['index'].to_i - 1].strftime(@config['date_format'])
info['date'] = @config['publish_dates'][index].strftime(@config['date_format'])
super(info) super(info)
end end
end end