Skip to content

Instantly share code, notes, and snippets.

@iansvo
Last active December 12, 2016 07:35
Show Gist options
  • Save iansvo/b6c18847da049b575b6037216b4e868e to your computer and use it in GitHub Desktop.
Save iansvo/b6c18847da049b575b6037216b4e868e to your computer and use it in GitHub Desktop.

#Description This AppleScript will automatically sync using a predefined Favorite and all enabled Skip Rules. I use this with Codekit to autosync files when they are processed.

##Instructions

  1. Line 2 needs to be updated with the name of the Favorite in question.
  2. For best results, set the local/remote paths directly in your favorite. If you don't, you'll need to update lines 7 and 8.

##Codekit Instructions

  1. Follow the above instructions to setup the applescript.
  2. Open your project and add a new hook
  3. Select the type: AppleScript for the hook and paste the script you edited into the hook field.
  4. For the hook condition, set the hook to run when files are processed with the name of your project folder from Disk Root.
tell application "Transmit"
set myFave to item 1 of (favorites whose name is "Favorite Name")
set myRules to (skip rules whose enabled is true)
tell current tab of (make new document at end)
connect to myFave
change location of local browser to path ""
change location of remote browser to path ""
synchronize local browser to remote browser using skip rules myRules
close remote browser
close
end tell
end tell
@iansvo
Copy link
Author

iansvo commented Nov 9, 2016

Added line 12 to insure the new document is closed when completed

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