Browse Source

Generate thumbnails.

dev
Chris Smith 8 years ago
parent
commit
d5b2380839

+ 11
- 3
generate-thumbs.sh View File

@@ -1,7 +1,15 @@
1 1
 #!/bin/bash
2 2
 
3
-for file in `find photos -type f | grep -v .thumb. | grep -v .html`; do
4
-    out="${file%.*}.thumb.${file##*.}";
5
-    test -e $out || convert -thumbnail 400^ -gravity center -crop 400x200+0+0 $file $out;
3
+SOURCE=~/Dropbox/photos-site
4
+
5
+for folder in $SOURCE/*; do
6
+    foldername=${folder##*/}
7
+    mkdir -p photos/$foldername
8
+
9
+    for file in $folder/*; do
10
+        filename=${file##*/}
11
+        out="photos/$foldername/$filename";
12
+        test -e $out || convert -thumbnail 400^ -gravity center -crop 400x200+0+0 -strip -quality 86 $file $out;
13
+    done
6 14
 done
7 15
 

BIN
photos/2015-08-Maui/G0122882.jpg View File


BIN
photos/2015-08-Maui/IMG_20150730_070036.jpg View File


BIN
photos/2015-08-Maui/IMG_20150731_071026.jpg View File


BIN
photos/2015-08-Maui/P7300158.jpg View File


BIN
photos/2015-08-Maui/P7300176.jpg View File


BIN
photos/2015-08-Maui/P7310186.jpg View File


BIN
photos/2015-08-Maui/P7310206.jpg View File


BIN
photos/2015-08-Maui/P7310207.jpg View File


BIN
photos/2015-08-Maui/P7310220.jpg View File


BIN
photos/2015-08-Maui/P7310236.jpg View File


BIN
photos/2015-08-Maui/P7310285.jpg View File


BIN
photos/2015-08-Maui/PANO_20150729_073240.jpg View File


BIN
photos/2015-08-Maui/PANO_20150731_100829.jpg View File


Loading…
Cancel
Save