Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 6, 2011 06:20
Show Gist options
  • Save pdxmph/1342551 to your computer and use it in GitHub Desktop.
Save pdxmph/1342551 to your computer and use it in GitHub Desktop.
Add current NetNewsWire headline to Safari reading list
#!/usr/bin/env ruby -wKU
require "rubygems"
require "appscript"
include Appscript
nnw = app("NetNewsWire")
safari = app("Safari")
save_url = nnw.selectedHeadline.URL.get
save_title = nnw.selectedHeadline.title.get
save_desc = nnw.selectedHeadline.subject.get
safari.add_reading_list_item(save_url, :with_title => save_title, :and_preview_text => save_desc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment