Skip to content

Instantly share code, notes, and snippets.

@rempargo
Forked from pdxmph/save_chrome_url.rb
Last active August 29, 2015 14:11

Revisions

  1. @pdxmph pdxmph created this gist Nov 6, 2011.
    15 changes: 15 additions & 0 deletions save_chrome_url.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/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)