Instantly share code, notes, and snippets.

@Blumed /social.sh
Last active Jan 19, 2016

Embed
What would you like to do?
Use gulp, and jekyll? me too. I made a handy an automated process for social post images.
#!/bin/bash
cd src/assets/images/social/uncompressed #change directory to exicute script in uncompressed folder
mkdir .tmp #making temp derectory
cp * .tmp/
mogrify -format jpg -filter Triangle -define filter:support=2 -thumbnail 1200x630! -quality 100 -unsharp 0.25x0.08+8.3+0.045 -dither None -define jpeg:fancy-upsampling=off -interlace none -colorspace sRGB -path .tmp/ .tmp/*.*
mv .tmp/*.jpg .tmp/../../og/; rm -R .tmp/*;
cp * .tmp/
mogrify -format jpg -filter Triangle -define filter:support=2 -thumbnail 1024x512! -quality 100 -unsharp 0.25x0.08+8.3+0.045 -dither None -define jpeg:fancy-upsampling=off -interlace none -colorspace sRGB -path .tmp/ .tmp/*.*
mv .tmp/*.jpg .tmp/../../twitter/; rm -R .tmp/*;
rm -R .tmp #removes temp directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment