Last active
July 28, 2024 17:20
-
-
Save isosphere/e8adc1026012d02b377a935d0985b9ed to your computer and use it in GitHub Desktop.
Linux Pipe For Converting tabler icons to PNG with a defined stroke colour
This file contains hidden or 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/sh | |
# all files will be prepended with "flag", this is for kstars | |
COLOUR="cyan" | |
WIDTH=24 | |
HEIGHT=24 | |
for FILE in ../*.svg | |
do | |
BASENAME=$(basename ${FILE}) | |
cat $FILE | perl -pe "s/stroke=\"currentColor\"/stroke=\"$COLOUR\"/" | /usr/bin/inkscape -w $WIDTH -h $HEIGHT -p -o "flag${COLOUR}_${BASENAME}.png | |
done |
This file contains hidden or 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
cat ../abacus.svg | perl -pe 's/stroke="currentColor"/stroke="teal"/' | inkscape -w 64 -h 64 -p -o abacus.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment