Skip to content

Instantly share code, notes, and snippets.

@agalazis
Last active December 5, 2015 08:27
Show Gist options
  • Save agalazis/f9bf123247414d2e0348 to your computer and use it in GitHub Desktop.
Save agalazis/f9bf123247414d2e0348 to your computer and use it in GitHub Desktop.
convering an svg directory to a json file containing paths
#!/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
@agalazis
Copy link
Author

agalazis commented Dec 5, 2015

dependency setup:
sudo npm install extract-svg-path -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment