Over a million developers have joined DZone.

Archive Flagged Items From NetNewsWire Into Yojimbo

DZone's Guide to

Archive Flagged Items From NetNewsWire Into Yojimbo

Free Resource
This lil Ruby-OSA script will allow you to import your "Flagged Items" in NetNewsWire as Web Archive Items in Yojimbo. Thus allowing you to save RSS articles for off-line viewing/storage.

['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, 
                            :name => article.title)
    # Adjust this for slower/faster bandwidth connections (or your feeling lucky, punk)
    # 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

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}