Last active
October 11, 2016 08:06
-
-
Save kkroesch/2d4716847fd385dd614fa58665be9def to your computer and use it in GitHub Desktop.
Minimalistic approach to create a gallery page from image directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export COPYRIGHT="(c) 1967 J. Random User" | |
[ -d thumbs ] || mkdir thumbs & mogrify -format jpg -path thumbs -thumbnail 100x *.jpg | |
#mogrify -fill white -undercolor '#00000080' -gravity South -annotate +0+5 '$COPYRIGHT' *.jpg | |
for img in *.jpg; | |
do | |
#exif --ifd=0 --tag=0x010e --set-value='Holiday in Somewhere' -o $img $img | |
TITLE=$(exif -m --ifd=0 --tag=0x010e $img) | |
cat >>EOF | |
<li> | |
<a href="images/$img"> | |
<img src="images/thumbs/$img" title="$TITLE"> | |
</a> | |
</li> | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment