document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. on run {input, parameters}
  2.     repeat with fileAlias in input
  3.        
  4.        
  5.         set filePath to (POSIX path of fileAlias)
  6.        
  7.         set fileWithPath to (characters 1 thru ((offset of "." in filePath) - 1) of filePath) as string
  8.        
  9.         set the1xFile to (fileWithPath & "-6c.jpg")
  10.         set the2xFile to (fileWithPath & "-6c@2x.jpg")
  11.        
  12.         tell application "Acorn"
  13.             set doc to open (POSIX path of fileAlias)
  14.             tell doc
  15.                 set w to width
  16.                 set h to height
  17.                 if (w - 20) > h then
  18.                     web export in the1xFile as JPEG quality 60 width 680
  19.                     web export in the2xFile as JPEG quality 50 width 1360
  20.                 else
  21.                     web export in the1xFile as JPEG quality 60 width 340
  22.                     web export in the2xFile as JPEG quality 50 width 680
  23.                 end if
  24.                 close
  25.             end tell
  26.         end tell
  27.        
  28.        
  29.         tell application "Transmit"
  30.             -- Prevent interactive alerts from popping up during script execution
  31.             set SuppressAppleScriptAlerts to true
  32.            
  33.             set myFave to item 1 of (favorites whose name is "sixcolors")
  34.            
  35.             -- Create a new window (and thus a single tab) for the script
  36.             tell current tab of (make new document at end)
  37.                 connect to myFave
  38.                 change location of remote browser to path "doc/images/content/"
  39.                
  40.                 tell remote browser
  41.                     upload item at path the1xFile
  42.                     upload item at path the2xFile
  43.                 end tell
  44.             end tell
  45.         end tell
  46.        
  47.     end repeat
  48.     return input
  49. end run
');