Skip to content

Instantly share code, notes, and snippets.

@joshbuchea
Created July 28, 2015 00:06
Show Gist options
  • Save joshbuchea/0cc7c630d30a730b70e2 to your computer and use it in GitHub Desktop.
Save joshbuchea/0cc7c630d30a730b70e2 to your computer and use it in GitHub Desktop.
A shell script for Automator that can convert .plist to .json file.
for f in "$@"
do
filename="${f%.*}"
plutil -convert json "$filename".plist -o "$filename".json
done
@joshbuchea
Copy link
Author

Usage

  1. Open Automator and create a new workflow with Service type.
  2. Choose Run Shell Script.
  3. Copy this gist to the code field.
  4. Save the workflow. The name of the workflow is up to you, it will become the service name.

Now, just choose a .json file in Finder, and pop up the context menu, choose Convert to json (or other name you had just gave), then there would be a .plist file.

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