Skip to content

Instantly share code, notes, and snippets.

@TheSkorm
Last active October 1, 2015 07:47
Show Gist options
  • Save TheSkorm/1948756 to your computer and use it in GitHub Desktop.
Save TheSkorm/1948756 to your computer and use it in GitHub Desktop.
Script to make a gallery in jukyll
exiftran -a -i -p *
mkdir thumbs
cp *.JPG thumbs
cp *.jpg thumbs
cp *.PNG thumbs
cp *.png thumbs
cd thumbs
mogrify -resize 100x *
cd ..
title=`pwd | sed 's/.*\///'`
echo "---
layout: default
permalink: index.html
---
$title
=
" > $title.markdown
for f in *.JPG; do echo "<a href=\"$f\" rel=\"lightbox[gal]\"><img alt=\"\" class=\"gallery\" src=\"thumbs/$f\"></a>" >> $title.markdown; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment