Skip to content

Instantly share code, notes, and snippets.

@scottyab
Created September 18, 2018 09:51
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 scottyab/dc4e13d46af4fba7c5a3f356072b0659 to your computer and use it in GitHub Desktop.
Save scottyab/dc4e13d46af4fba7c5a3f356072b0659 to your computer and use it in GitHub Desktop.
nkscape
#!/usr/bin/env bash
# exit if fails
set -o errexit
set -o pipefail
# reads the first arg as the file - expected list of file names without extension
filename="${1:-}"
# loops through each line
while read -r line
do
KEY="$line"
inkscape -z -D --file=/Users/scottab/dev/code/mobile-api/public/images/huzzah/android/$KEY.svg --export-png=/Users/scottab/dev/code/mobile-api/public/images/huzzah/android/sticker/$KEY.png -w 600 -h 600
done < "$filename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment