Skip to content

Instantly share code, notes, and snippets.

@katpadi
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katpadi/2a00de980ede3c78b3b7 to your computer and use it in GitHub Desktop.
Save katpadi/2a00de980ede3c78b3b7 to your computer and use it in GitHub Desktop.
timelapse_shooter
#!/bin/sh
OPTIONS='-hf -vf -o'
TS=$(date +%Y-%m-%d_%T)
# Take a snapshot
raspistill $OPTIONS "$TS".jpg
# For now this is the filename
file="$TS.jpg"
mv $file raw/$file
cd raw
echo 'Putting timestamp...'
# Put timestamp on image (imagemagick)
convert $file -gravity NorthEast -pointsize 70 -fill white -stroke black \
-annotate +100+100 %[exif:DateTimeOriginal] \
-gravity SouthWest \
-pointsize 40 -stroke gray -annotate +100+100 'by @katpadi using RPi NoIR Cam' \
"annotated-${file}"
# Move to new dir
mv "annotated-${file}" "../annotated/${file}"
echo "Done..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment