Skip to content

Instantly share code, notes, and snippets.

@sbellver
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save sbellver/d95df5075d0033653bb1 to your computer and use it in GitHub Desktop.

Select an option

Save sbellver/d95df5075d0033653bb1 to your computer and use it in GitHub Desktop.
Redimensiona, renombra y añade marca de agua a las fotos.
#!/bin/bash
#title :imagenesDelBlog.sh
#description :Este script prepara las imagenes antes de subirlas al Blog.
#author :Sergio Bellver Aliaga
#date :20140701
#version :0.1
#usage :sh imagenesDelBlog.sh /ruta/del/directorio NombreDeLaEntrada_
cd $1
sips -Z 960 *.jpg
exiv2 -r $2'%y%m%d-%H%M%S' -F rename *.jpg
find . -name "*.jpg" -type f -exec composite -gravity southeast -quality 100 -dissolve 30% /path/to/logo.png {} {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment