Skip to content

Instantly share code, notes, and snippets.

@mk-qi
Forked from pdxmph/save_chrome_url.rb
Created May 10, 2012 09:41
Show Gist options
  • Save mk-qi/2652167 to your computer and use it in GitHub Desktop.
Save mk-qi/2652167 to your computer and use it in GitHub Desktop.
Add a URL from Chrome to Safari's reading list
#!/usr/bin/env ruby -wKU
require "rubygems"
require "appscript"
include Appscript
chrome = app("Google Chrome")
safari = app("Safari")
chrome_tab = chrome.windows[1].active_tab
save_url = chrome_tab.URL.get
save_title = chrome_tab.name.get
safari.add_reading_list_item(save_url, :with_title => save_title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment