jump to navigation

Cocoalicious to Yojimbo synchronization script January 14, 2007

Posted by James Webster in : apple , trackback

Update: Looks like there were a couple of bugs with the last version. Jim Correia of Bare Bones also pointed out a way to avoid the timeout issue. Download the new version.

Fans of Bare Bones Software’s information organisation application Yojimbo and Yahoo’s del.icio.us might find the following useful. With the latest 1.4 update Yojimbo is extensively AppleScriptable. There have been a few calls on the user mailing list for an easy way to import a user’s del.icio.us bookmarks into Yojimbo as web archives. Using Sci-Fi Hi-Fi’s excellent Cocoalicious and Growl I have come up with Cocoalicious To Yojimbo. Assuming you have set up Cocoalicious with your del.icio.us login credentials (be aware if you are downloading Cocoalicious for the first time that you will need to read this weblog post to deal with the change in del.icio.us’ API URL), my Cocoalicious To Yojimbo AppleScript will do the following:

  1. Create a collection in Yojimbo called ‘del.icio.us’, if one does not exist already.
  2. Create a web archive in the del.icio.us collection for each bookmark in your del.icio.us account. The title of the del.icio.us bookmark is used to set the name of the web archive so subsequent runs of the script should not result in duplicated web archives.
  3. The notes (aka extended) field of the del.icio.us bookmark will be copied to the Yojimbo web archive’s comment field. The tags of the bookmark will also be applied to the Yojimbo web archive (thanks to Doug’s AppleScript’s for iTune’s text_to_list function).
  4. Once all the del.icio.us bookmarks have been either skipped or downloaded, the script will check to see if there are any web archive in Yojimbo’s del.icio.us collection that no longer exist in your del.icio.us bookmarks and will move the archive to the trash if so.
  5. Growl updates are provided throughout the process (it is mandatory so please make sure it is installed).

There is one caveat with usage; Yojimbo’s current behaviour when creating a web archive is to set the name of the item to the name of the web page once the page has been completely downloaded. The script currently waits up to 30 seconds for the name of the new web archive item to change from ‘untitled’ to something else, it then sets the web archive name to the title of the del.icio.us bookmark (ie. in order to match the web archive against the corresponding bookmark; potential URL redirection make using the URL unreliable). This is necessary as the title of the bookmark is not necessarily the same as the web page or it may change. However if the page takes longer than 30 seconds to download the script will set the name regardless, only to have Yojimbo change it again when the download completes. It would be great if Bare Bones could provide a way to switch off this behaviour. Thanks to Jim Correia I have managed to avoid this issue in the latest version.

Download Cocoalicious To Yojimbo, the archive contains both an application bundle and the script code itself. I think this script is reasonably well debugged. Please leave any issues or suggestions in the comments!

Comments»

1. Links for February 7th through February 13th » jarango.com - February 14, 2008

[…] Cocoalicious to Yojimbo synchronization script […]