Jump to content

Transmit 4 Favorites Workflow, FAST


Recommended Posts

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
Link to comment

@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

Link to comment

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
Link to comment

@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

Link to comment
  • 2 weeks later...

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?

Link to comment

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

Link to comment
  • 2 weeks later...

@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

Link to comment

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.

 

:/

Link to comment

@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
Link to comment

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...