Jump to content
Jefferson

Transmit favorites workflow (works with MAS version)

Recommended Posts

Transmit.png

  • Uses AppleScript to list favorites, so it works with all versions of Transmit 4
  • Hold down command to open in a new tab or alt to open a new window (defaults to using the current window and disconnects a current session if it exists)
  • Searches by favorite name or by favorite address

You can download it from here.

 

Let me know if you guys like it or not.  If you do, check out some of my other workflows in my signature.  Some of you guys might like my Remote Desktop workflow too.

 

Updated 4/25:

Now more robust to names and addresses

 

Updated 6/19:

Now properly encodes names to UTF-8.

Edited by Jefferson

Share this post


Link to post

Hmm. It finds the list but won't actually open the favorite. Great idea, thanks.

 

Did you have any special characters in your Favorite name by any chance?  Anyways, I redid the logic of the workflow so it uses the position of the Favorite instead of name/address, so the new version should work for you no matter what.  Let me know!

 

Edit - I just updated my Remote Desktop control workflow with the same fix as my Transmit workflow, so both should be more robust now.

Edited by Jefferson

Share this post


Link to post

Bam! That works. Nicely done. I do have dashes and slashes in my favorite names. Example:

rackspace atv -- www

rackspace atv -- var/www/public

Share this post


Link to post

Bam! That works. Nicely done. I do have dashes and slashes in my favorite names. Example:

rackspace atv -- www

rackspace atv -- var/www/public

 

Awesome!  Thanks for testing it out for me and catching that issue.

 

If anyone wants the default behavior changed for when you click on a favorite, let me know. Right now it is:

  • Opens in existing window and disconnects connection if one currently exists (default)
  • Open in new tab (hold command key)
  • Open in new window (hold alt key)

Share this post


Link to post

Thanks so much! I've been trying for days to work out why the previous transmit workflow didn't work after moving to a new Mac. This does!

 

It would be great if it included a mount option mnt keyword perhaps?

Share this post


Link to post

I like this workflow because it syncs across machines, which is important to me, but it's also a PITA because it's search algorithm is broken. As best I can tell, it searches first (or only) on the server's (S)FTP address, not the favourite's name. For folks like me, who have many sites on the same server, that's a PITA. I type "ftp d", and the top result is "Bad Certificate" (a site I set up to check whether software correctly verifies SSL certs), because it's on a server whose name starts with "d". That's not optimal behaviour.

 

Also, I find that opening the favourite in the current session by default is suboptimal behaviour (if I didn't want the open session, I would have already closed it), but that's easily remedied in Alfred's UI by switching the modifiers.

Share this post


Link to post

New version uploaded.

 

Thanks so much! I've been trying for days to work out why the previous transmit workflow didn't work after moving to a new Mac. This does!

 

It would be great if it included a mount option mnt keyword perhaps?

 

If you hold down the shift key, it will now prompt you to mount as a volume.

 

I like this workflow because it syncs across machines, which is important to me, but it's also a PITA because it's search algorithm is broken. As best I can tell, it searches first (or only) on the server's (S)FTP address, not the favourite's name. For folks like me, who have many sites on the same server, that's a PITA. I type "ftp d", and the top result is "Bad Certificate" (a site I set up to check whether software correctly verifies SSL certs), because it's on a server whose name starts with "d". That's not optimal behaviour.

 

Also, I find that opening the favourite in the current session by default is suboptimal behaviour (if I didn't want the open session, I would have already closed it), but that's easily remedied in Alfred's UI by switching the modifiers.

 

I can't reproduce your search issue.  It should be searching by both name and address.  Can you give me a reproducible example of favorite names and addresses that don't filter correctly for you (you can make them up)?

 

I switched the modifier keys per your feedback.  They are now:

  • Open in new tab (default, no modifiers)
  • Open in same tab or window (command)
  • Open in new window (alt)
  • Mount (shift) *new*

Share this post


Link to post

Thanks for the new version. I changed the modifiers again, though, because I want new connections to open in new windows not tabs. That way, it always works, regardless of whether I have a window open or not. Easily changed.

 

So, I've been testing the workflow. It is searching on both name and server, but I don't like the way it doesn't prioritise the favourite names, but it does sort results by them:

 

If I just enter "d", my first two results are:

 

Bad Certificate

badcert.domain-starting-with-d.com

Bob's Diskstation

diskstation.local

 

The following results do have names starting with "d".

 

If I enter "ra" my results are:

 

Downloads

randy.home.lan

Incoming

randy.home.lan

Media

randy.home.lan

...

...

...

...

Radreisekarte

ftp5.gwdg.de

 

So, the first result whose favourite name starts with "ra" is number 8. The previous 7 are on a server whose name starts with "ra".

 

IMO, the favourite name should be prioritised over the server name. That's the name I chose because that's the name I want to use.

 

I hadn't realised the important part of the workflow was in Python (I thought it was all AppleScript), so I had a poke about, and I've changed the filtering to the following:

faves = zip(names, addresses, indexes)

results = []
q = q.lower()
for t in faves:  # name
    if t[0].lower().startswith(q):
        results.append(t)
for t in faves:  # address
    if t not in results and t[1].lower().startswith(q):
        results.append(t)
for t in faves:  # in name
    if t not in results and q.lower() in t[0].lower():
        results.append(t)
for t in faves:  # in addr
    if t not in results and q.lower() in t[1].lower():
        results.append(t)

feedback = Feedback()
for name, addr, idx in results:
    feedback.add_item(name.decode("utf-8"), addr, idx + "," + str(len(indexes)))
print feedback

This prioritises favourite names over server addresses and startswith over contains.

 

I wish I were smart enough to make it do the "PS = Photoshop" style filtering :(

 

P.S. I love the way you set names, addresses and indexes using steps of 3. I'll try to remember that trick.

Edited by deanishe

Share this post


Link to post

How can you change this to make it open in new windows not tabs as I always have Transmit minimised and so often this script fails to start/work?

 

Thanks.

Share this post


Link to post

I do exactly the same. Here's how to do it:

 

Select the workflow in Alfred's preferences and double-click on the lines connecting the Script Filter to the Run NSAppleScript actions.

 

Change the action modifiers so that the open new window one has no modifier, but the others do.

 

On my system, that's the bottom script. It's longest line (2/3 of the way down) is tell current tab of (make new document at end).

 

That make new document at end is the new window bit.

Edited by deanishe

Share this post


Link to post

Great workflow! I used the previous one a lot but doesn't seem to work with last version of Transmit, even if I don't sync with Dropbox and symlink the plist file.

 

I'm having one strange problem though:

When connecting to an FTP through the workflow, it connects just fine, but I can't navigate to parent folder using the Cmd+UP shortcut. I can navigate inside (Cmd + DOWN) and move around with keys, but not up. The funny thing is, the shortcuts all work fine if I connect normally to the FTP by opening transmit and launching some favorite. I noticed it opens an extra tab, but closing the previous one doesn't solve it.

 

Really weird, but it only happens when I connect through the workflow, and I really need the shortcuts!! :D

 

I'll check the Applescript if I can later

 

Cheers

Share this post


Link to post

oookey, follow up on this. The problem is with the default "new tab" option. If I open the favorite in the current tab or in a new window everything works just fine. I set the default functionality to current tab, set Cmd modifier to new window, deleted default functionality an called the day :D

Share this post


Link to post

I have tested this and found it extremely useful! Thank you so much for this workflow - I do not know of any faster way to connect via ftp than this. This is amazing. 

 

Since I saw how excellent this is working, I was wondering if there would not be a possibility to have a similar workflow setup for coda 2 from panic. Since these are the same favories. And I sure would appreciate to connect just as fast to the websites with the live editor via coda 2 as it is now possible to connect via transmit in light speed, thanks to your plugin. 

 

Ah - I just saw other Transmit workflows as well - and will post there too. I really hope someone was already thinking about this, or maybe there is a workflow for coda 2 already out there. I so I would really appreciate getting in touch. 

 

Looking very much forward to your answer. 

 

 - Arne

Share this post


Link to post

I used another workflow (ceated by ramiro.araujo) and it didn't connect to specific favourite.

 

Then I messaged Transmit support about that and they said that " Transmit 5 has required the site/favorite architecture to be rewritten so it's likely that the Alfred workflow will need to update their support in order to be compatible with Transmit 5."

 

I can't check wheeather or not THIS workflow works (I supposed that id doesn't because of that different architecture which transmit 5 has) simply because the dropbox link does not work. Can anyone reuplad this workflow? @iEnno?

Share this post


Link to post
7 hours ago, iEnno said:

I installed Transmit 5 and the workflow works for me. What exactly doesn't work?

I've used the Transmit Favourites workflow and I've downloaded and installed the one by ramiro.araujo. The first one only starts Transmit 5 but doesn't show the connection window. The second starts Transmit 5 AND opens the connection window, but none of them actually connect to the selected favourite.

 

I'd like to try this workflow, but the link is dead.

 

Can anyone upload this workflow?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×