Skip to content

Instantly share code, notes, and snippets.

@isosphere
Last active July 28, 2024 17:20
Show Gist options
  • Save isosphere/e8adc1026012d02b377a935d0985b9ed to your computer and use it in GitHub Desktop.
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
#!/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
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