Last active
May 12, 2016 07:34
-
-
Save nekketsuuu/8bd65e325c52468b48e4e86d0df1c48f to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [[ -n "$1" ]]; then | |
filename=$1 | |
else | |
filename="test.in" | |
fi | |
if [[ ! -e ${filename} ]]; then | |
echo "File ${filename} not found." | |
exit 1 | |
fi | |
cat ${filename} | while read term; do | |
echo "#" ${term} | |
# http://www.imagemagick.org/Usage/text/#caption | |
convert \ | |
-size 96x96 \ | |
-background white \ | |
-transparent white \ | |
-fill "#000000" \ | |
-font sawarabi-mincho-medium.ttf \ | |
-gravity center \ | |
caption:${term} \ | |
output/${term}.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment