booh-classifier sort by exif date: fallback on filename content if exif date failed...
[booh] / bin / booh-classifier
index c85ed74..f1f3adb 100644 (file)
@@ -1375,6 +1375,8 @@ def open_dir(*paths)
                 date_time = Exif.datetimeoriginal(file)
                 if ! date_time.nil?
                     dates[file] = date_time
+                elsif file =~ /(20\d{2}).?(\d{2}).?(\d{2}).(\d{2}).?(\d{2}).?(\d{2})/
+                    dates[file] = "#$1:#$2:#$3 #$4:#$5:#$6"
                 end
             }
             entries = smartsort(entries, dates)