summaryrefslogtreecommitdiffstats
path: root/sort-images-size
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-01-04 13:54:00 +0100
committerFlorian Pritz <bluewind@xinu.at>2019-01-04 13:54:00 +0100
commitd4b107f5035413bcf93f24a523a6f8b695ba6b92 (patch)
tree74f53d2c3cbf7d71264d1c9239d6af21f3038724 /sort-images-size
parentf2c64faeecf602c024b81fcc3760981e36de45f4 (diff)
downloadbin-d4b107f5035413bcf93f24a523a6f8b695ba6b92.tar.gz
bin-d4b107f5035413bcf93f24a523a6f8b695ba6b92.tar.xz
Add new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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/$_";' "$@"