Last active
December 8, 2016 16:28
-
-
Save keuv-grvl/fdcd44da467640d03f81 to your computer and use it in GitHub Desktop.
Convert ./svg/*.svg to ./png/*.png
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
#!/usr/bin/env bash | |
command -v inkscape >/dev/null 2>&1 || { echo >&2 "Inkscape is not installed. Aborting."; exit 1; } | |
# SVG files must be in "./svg/" and PNG files will be outputed in './png/' | |
echo "starting..." | |
mkdir -p ./png/ | |
rm ./png/*png | |
## ./svg/ can contain links to SVG files. | |
for F in $(find -L ./svg/ -maxdepth 1 -name "*.svg" -type f); do | |
FF=$(basename $F) | |
inkscape -z -e ./png/$FF.png -d 300 -b white ./svg/$FF | |
done; | |
notify-send -i emblem-photos "Done" "Conversions are finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment