[
  {
    "path": "README.md",
    "content": "## OS X Folder Action for SVGO, v0.0.1\n\n1. install [SVGO](https://github.com/svg/svgo)\n2. `curl -sS https://raw.githubusercontent.com/svg/svgo-osx-folder-action/master/install.sh | sh`\n3. attach Folder Action to some folder:\n\n    ![screenshot 1](https://raw.github.com/svg/svgo-osx-folder-action/master/screenshots/1.png)\n\n    ![screenshot 2](https://raw.github.com/svg/svgo-osx-folder-action/master/screenshots/2.png)\n\n4. drag-n-drop `.svg`-files to this folder\n5. hurray, your files are optimized!\n\n![](//mc.yandex.ru/watch/18561160)\n"
  },
  {
    "path": "install.sh",
    "content": "#!/bin/sh\n\nSCRIPTS_PATH=\"$HOME/Library/Scripts/Folder Action Scripts\"\n\nmkdir -p \"$SCRIPTS_PATH\"\ncurl -sSO https://raw.githubusercontent.com/svg/svgo-osx-folder-action/master/svgo.applescript\nosacompile -o \"$SCRIPTS_PATH/svgo.scpt\" svgo.applescript\nrm svgo.applescript\n"
  },
  {
    "path": "svgo.applescript",
    "content": "on adding folder items to this_folder after receiving these_items\n\n    repeat with i from 1 to number of items in these_items\n\n        set this_item to item i of these_items\n        set the file_path to the POSIX path of this_item\n\n        try\n            do shell script \"/bin/bash -l -c 'svgo \\\"\" & file_path & \"\\\"'\"\n        on error errStr number errorNumber\n            display dialog \"Error: \" & errStr buttons {\"OK\"} with icon stop\n            return number\n        end try\n\n    end repeat\n\nend adding folder items to\n"
  }
]