Class: PhotoHelper::Screensaver
- Inherits:
-
Thor
- Object
- Thor
- PhotoHelper::Screensaver
- Includes:
- Thor::Actions
- Defined in:
- lib/photo-helper/screensaver.rb
Instance Method Summary collapse
Instance Method Details
#move ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/photo-helper/screensaver.rb', line 10 def move files = Dir["#{BEST_OF_ROOT}/**/*"] files.each do |file| next unless FileHelper.is_jpeg?(file) dest = File.join(SCREENSAVER_ROOT, File.basename(file)) next if File.exist?(dest) puts file FileUtils.copy(file, dest) end puts 'Compressing' compress = PhotoHelper::Compress.new compress. = { overwrite: true } compress.images(SCREENSAVER_ROOT) end |