summaryrefslogtreecommitdiffstats
path: root/sort-images-size
diff options
context:
space:
mode:
Diffstat (limited to 'sort-images-size')
-rwxr-xr-xsort-images-size3
1 files changed, 3 insertions, 0 deletions
diff --git a/sort-images-size b/sort-images-size
new file mode 100755
index 0000000..d6781ff
--- /dev/null
+++ b/sort-images-size
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+perl-rename -v 'BEGIN{use Image::ExifTool qw(ImageInfo); use Date::Parse; use Date::Format;}; $data = ImageInfo($_); $size_dir = "small"; $size_dir = "large" if $data->{ImageWidth} > 350 or $data->{ImageHeight} > 350; $date = time2str("%Y-%m-%d", str2time($data->{ModifyDate})); $_ = "$size_dir/$date/$_";' "$@"