#!/usr/local/bin/ruby ['rubygems', 'rbosa'].each {|lib| require lib} nnw = OSA.app('NetNewsWire') yojimbo = OSA.app('Yojimbo') nnw.subscriptions.find { |s| s if s.display_name == 'Flagged Items' }.headlines.each do |article| unless yojimbo.web_archive_items.map { |f| f.source_url }.include?(article.url) archived = yojimbo.make(OSA::Yojimbo::WebArchiveItem, article.url, :name => article.title) # Adjust this for slower/faster bandwidth connections (or your feeling lucky, punk) sleep(5) # Uncomment below to remove the flagged items upon successfully archiving # if archived.name == 'untitled' && archived.source_url.empty? # puts "!!! #{article.title} does not look to be imported !!!" # else # article.delete # end end end
You need to create an account or log in to post comments to this site.