From 291dbb09dca27161520ce0603855d03407ba3f2e Mon Sep 17 00:00:00 2001 From: profiteroles Date: Tue, 7 May 2019 01:56:15 -0700 Subject: [PATCH] 0.8.13 --- leaf.php | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/leaf.php b/leaf.php index dba30ae..7cfcc2d 100644 --- a/leaf.php +++ b/leaf.php @@ -1,10 +1,9 @@ read FROM dir -notes save leaf shell history to text file - -lines= (100) lines to read from bash_history profile apply xmp profile to images (requires exiv2 > 0.25) -file= xmp profile resort reorder image sequence by adding a new image @@ -313,6 +317,7 @@ setdpi set image dpi with exiftool -height= calculate dpi from specified height sort sort files as AAABBB -> ABABAB -m= (auto) specify midpoint (cover image) + -prerotated images are already rotated strip strip exif crop values from images with exiftool "; @@ -1151,15 +1156,23 @@ if (args("m")) { $e = 2; $o = 1; +if (args("prerotated")) { + $leftrotation = 1; + $rightrotation = 3; + } else { + $leftrotation = 8; + $rightrotation = 6; + } + foreach ($files as $file) { $num = filter_var($file, FILTER_SANITIZE_NUMBER_INT); if ($num < $midpoint_key) { $new = args("dir").sprintf('%03d',$e)."-".basename($file); - $ops[$e] = array($file,$new,8); + $ops[$e] = array($file,$new,$leftrotation); $e = $e+2; } else { $new = args("dir").sprintf('%03d',$o)."-".basename($file); - $ops[$o] = array($file,$new,6); + $ops[$o] = array($file,$new,$rightrotation); $o = $o+2; } }