Send to Transmit

Hiya,

I don’t how feasible this is but I’d really like to be able to define a Write action that uses Transmit (5) to upload (to a specified location) at the end of a workflow.

It looks like this would be scriptable, or something like rsync would work, but a built-in action would be super.

You can use the Transmit Disk feature (of Transmit, obviously) to mount a remote server as a local folder in macOS. A simple write action will then upload automatically.

44

Hi @gingerbeardman. Thanks for the suggestion, but alas the particular protocol I want to use (Dropbox) isn’t supported by Transmit Disk. :slightly_smiling_face:

Then why not write to your local Dropbox folder?

Another option is to use the Save As Droplet feature in Transmit.

This creates a small app that will accept files and upload to that server, using Transmit behind the scenes.

18

So then you can just use Retrobatch’s Open In App.

I just tested this method with my Dropbox and it worked a treat!

(If you end up adding multiple Droplets then look into Transmit’s DockSend feature to make your life easier)

Hi.

The folder on Dropbox is not mirrored locally, so it’s not there to save to. (But also, I think Transmit is quicker to upload… not always I guess but it seems to be.)

That Droplet plus Open in App looks like it will do the job. Will test presently. Thanks for your advice!

1 Like

I tried out the Droplet + Open in App, and that worked on my end. It opened up the droplet for each image passed in, which might take a while…

It might be possible to make this happen a little faster with the AppleScript node. I’ll look into that in a bit.

OK, you might find this a bit faster with the AppleScript node:

global transmitBrowser

using terms from application "Retrobatch"

	(*
	The processStart handler is called when your workflow has started running
	*)
	on processStart()
	
	
		tell application "Transmit"
			set myFave to item 1 of (favorites whose name is "deleteme")
		
			tell current tab of (make new document at end)
				connect to myFave
			
				set transmitBrowser to remote browser
			
			end tell
		
		
		end tell
	
	end processStart

	(* 
	The processAsset handler is called for each image asset that passes through this AppleScript node
	You can return a boolean value that says wether or not this asset should continue on through the next node(s)
	*)
	on processAsset(anAsset)
	
		set assetPath to file path of anAsset
	
		tell application "Transmit"
		
			tell transmitBrowser
				upload item at path assetPath
			end tell
		end tell
	
		return true
	
	end processAsset


	(* 
	processEnd is called when your workflow is about to end
	*)
	on processEnd()
	
	end processEnd

end using terms from
1 Like

I should also note this requires build 446, which you can grab from here:
http://flyingmeat.com/download/latest/#retrobatch

I added a new AppleScript property to assets to get the file path.

Hi @ccgus.

Sorry for the slow reply. I only just had time to come back to this.

Works perfectly. Just configure the Favourite in Transmit and Go! Thanks.

Really super. Keep up the good work!

1 Like

Hi,
This script isn’t working for me, at least not as I thought it would. The files uploaded are the original files defined in the “Read images” node. I thought this script, linked from the “Write images” node, would upload the processed files.
Is it possible to get the processed file path?
I’m using 1.1.1 build 628
Thanks

This is now fixed in the latest build here: http://flyingmeat.com/download/latest/#retrobatch

If the file was written to disk, then the AppleScript interface will return the last written location for the path.

That’s perfect now. Thanks !!

Edit: I spoke too soon. This may not be related but, when I save my workflow as a droplet and run it I get an AppleScript Error “Can’t get document BaseWorkflow”. And indeed, the RB document itself has now changed name to BaseWorkflow.retrobatch.