Jump to content

Transmit 4 Favorites Workflow, FAST


Recommended Posts

Posted (edited)

Transmit 4 Workflow for Alfred app
Workflow for searching and opening Favorites in Transmit 4 App. It's really fast, because it reads the SQLite Database or XML datasource in latests releases of Transmit 4.
There are already at least 2 Transmit workflows, but one is incompatible with latests Transmit 4 and the other, although very good, uses AppleScript to do the searching, and thus you need to wait for Transmit to open to get feedback. This is particulary slow on non SSD machines.
 
Usage
Type the keyword (default ftp) and start typing the name of the favorite to search; dead simple.
search.png
 
Installation
For OS X 10.9 Mavericks, Download the alfred-transmit.alfredworkflow and import to Alfred 2.
For Previous OS X Versions, Download the alfred-transmit.alfredworkflow and import to Alfred 2.
 
Source Code
Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-transmit-workflow
 
Changelog

  • 2013-12-16 - Released
  • 2014-01-02 - Added support for previous OS versions, using System Ruby 1.8, tested up to Lion
  • 2014-01-03 - Search in both Favorite name and host
  • 2014-01-20 - Added support for Favorites.xml
  • 2014-01-30 - Rebuilt XML search to use different Ruby xml parser

Note: I updated the original description to match the project readme file

Edited by Ramiro Araujo
Posted

It’s working for me, but it’d be great if it could search domains as well as titles. Not sure if that’s doable using the SQLite database, but if it is doable that’d make it that little bit more awesome.

Posted

@akella, I'm not sure when Transmit 4 started using sqlite for saving Favorites, and I couldn't find anything in their site. This workflow only works with the SQLite version. I would be happy to also try to implement it using this xml, if you can cleanup personal and credential data and send it to me I could try :)

 

Also, if anyone has info about when Transmit 4 started using SQLite, specifically from which version, I could update the README and post to reflect this

Posted (edited)

It only works with Mavericks, or more precisely Ruby v2 that ships with Mavericks (ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]). This is because it uses the SQLite3 Gem, which has to be built with native extensions, and thus it's build for this precise version. I'm not very keen on Ruby, specially this kind of environment issues, so any help on this limitation is appreciated.

 

You can safely shorten that to “It only works on Mavericks” and stop worrying about the SQLite3 gem dependency, as Apple is taking care of the issue for you: SQLite3 it’s part of the gems included in Mavericks’ system Ruby install, along CFPropertyList and Nokogiri: do gem list on a pristine Mavericks install, or gem which --all sqlite3 if you already installed gems of your own :).

Edited by kopischke
Posted

@kopischke, thanks! Actually I'm still trying to figure out quite a few things about Ruby, and messed up with the OS ruby, so I timemachined a few weeks back to bring it all back to zero.

gem list lists no gems, sudo gem list 4, and among them sqlite3, so that's great! thanks!

 

Are you experienced with Ruby and specially ruby environments? I have quite a few doubts :)

 

Cheers

  • 2 weeks later...
Posted

@kopischke, I ended up switching from RVM to rbenv, and everything is working great now. I can safely fetch gems for Ruby 2.0 and 1.8 and all work well with the system Ruby. The only caveat, I need to pack two extensions, one for mavericks and one for previous versions.

Posted

It’s working for me, but it’d be great if it could search domains as well as titles. Not sure if that’s doable using the SQLite database, but if it is doable that’d make it that little bit more awesome.

makes sense, It now searches in both favorite name and host name

Posted

I'm using Mavericks 10.9 and Transmit 4.4.5 and the workflow lists the favourites but when I select on it opens a new transmit window and stops there. It don't actually load the favourite. 


Posted

The script works (it says I can't connect to ftp.panic.com, but loads the desktop in the left side and tries to connect. The workflow does show a notification that it's "connecting to favourite" but doesn't say what favourite. Is that where the problem is? Is it not passing the favourite to transmit to connect to?

Posted

Transmit is syncing via dropbox and the sql and xml files are in the same directory, but the sql file hasn't been updated since November, but I just deleted a favourite so it updated the xml file.

Posted

Transmit is syncing via dropbox and the sql and xml files are in the same directory, but the sql file hasn't been updated since November, but I just deleted a favourite so it updated the xml file.

Well, after deleting all my Transmit prefs and updating to last Transmit 4.4.5 I can see there's a Favorites/Favorites.xml file and no Favoriltes.sqlite file, at least in a plain base install. I'm not sure right now under what circumstances the sqlite file is created/used. I'll check it

  • 2 weeks later...
Posted

@Cicilia: OS version? Transmit version? Sure you downloaded the correct OS version? Describe "does not work", as in: no feedback at all? or feedback appears but does not trigger the Transmit app? Etc. Any chance you send me your Favorites.xml, maybe a part of it and with host, user, etc modified?

Posted

still does not work with xml.

 

Hi there,

 

Could you please fill in your Powerpack details on your forum profile before taking part in Powerpack-related topics? :)

 

Cheers,

Vero

Posted

@everyone

I rebuilt the workflow with a different XML parser, quite simpler actually. I've tested it in Mavericks only, but with both Ruby 2.0.0 and Ruby 1.8.7 (1.8.7 used in previous OS X versions), and in Transmit 4.4.5 and Transmit 4.4, which use XML and SQLite respectively. I Hope everything should work now.

 

cheers

Posted

thanks for the work, unfortunately it still does not work properly.

 

install and type ftp

 

bildschirmfoto2014-01tppk9.png

 

close, and reopen

bildschirmfoto2014-011cq5q.png

E, [2014-01-31 14:54:42 #1060] ERROR -- com.tumblr.ramiroaraujo.alfred-transmit-workflow: A fatal error has occurred. You may seek help in the Alfred supporting site, forum or raise an issue in the bug tracking site.
  #<Encoding::InvalidByteSequenceError: "\xC3" on US-ASCII>
  /Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/bundle/ruby/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `encode'  
/Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/bundle/ruby/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `initialize'  
/Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/bundle/ruby/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `new'  
/Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/bundle/ruby/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `parse'  
/Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/transmit.rb:31:in `search'  
./feedback.rb:37:in `block in <main>'  
/Users/admin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B76AF72A-9906-474C-A7FD-CF5166BBEFEE/bundle/ruby/2.0.0/gems/alfred-workflow-2.0.5/lib/alfred.rb:82:in `with_friendly_error'  
./feedback.rb:13:in `<main>'

"Rebuild Transmit Favorites cache" does not solve the problem.

 

:/

Posted (edited)

@Cicilia, damn it! ok, but tell me one thing, given your screenshot, a list of FTPs is populated, right? then when do that error happen? 

on the other hand, looks like a text encoding error, I'll check myself and with the favorites file you sent me.

 

 

edit:

definitely text encoding issue, my bad, specially since I'm a spanish speaker :) I'll fix it asap

cheers

Edited by Ramiro Araujo

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
×
×
  • Create New...