From 496a11de48db42df90b523fe7e1619c75b712451 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 24 Mar 2026 10:57:50 +0200 Subject: photo-enhance: shorten output suffix from _enhanced to _e Co-Authored-By: Claude Sonnet 4.6 --- photo-enhance.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/photo-enhance.rb b/photo-enhance.rb index 63cdcd4..52be7b9 100755 --- a/photo-enhance.rb +++ b/photo-enhance.rb @@ -251,7 +251,7 @@ class PhotoEnhancer def enhance_directory(indir, watch: false) @client.check_connectivity! @out.puts "ComfyUI ready at http://#{@config.host}:#{@config.port}" - @out.puts "Enhancing photos in #{indir} (output: _enhanced. alongside originals)" + @out.puts "Enhancing photos in #{indir} (output: _e. alongside originals)" @out.puts watch ? '(watch mode — Ctrl-C to stop)' : '' loop do @@ -268,6 +268,7 @@ class PhotoEnhancer def find_pending_images(indir) Dir.glob(File.join(indir, '*')) .select { |f| File.file?(f) && SUPPORTED_EXTENSIONS.include?(File.extname(f).downcase) } + .reject { |f| File.basename(f, '.*').end_with?('_e') } .reject { |f| @manifest.processed?(f) } .sort end @@ -277,7 +278,7 @@ class PhotoEnhancer ext = File.extname(src_path).downcase # Output lives in the same directory as the original, with an _enhanced suffix # before the extension (e.g. photo.jpg -> photo_enhanced.jpg). - dest_path = File.join(File.dirname(src_path), "#{basename}_enhanced#{ext}") + dest_path = File.join(File.dirname(src_path), "#{basename}_e#{ext}") @out.puts "[#{Time.now.strftime('%H:%M:%S')}] Enhancing #{File.basename(src_path)}..." -- cgit v1.2.3