Last active
December 5, 2015 08:27
-
-
Save agalazis/f9bf123247414d2e0348 to your computer and use it in GitHub Desktop.
convering an svg directory to a json file containing paths
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 | |
DIR=$( pwd )&&DIR=${DIR//[[:space:]]/}&&DIR=${DIR##*/}; echo var $DIR \= \{ >$DIR.json; ls *.svg | while read fname ; do echo ${fname%.*}:"$(extract-svg-path $fname --quote)", >> $DIR.json; done;echo \} >>$DIR.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dependency setup:
sudo npm install extract-svg-path -g