Big Data/Analytics Zone is brought to you in partnership with:
DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Archive Flagged Items From NetNewsWire Into Yojimbo

  • submit to reddit
        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 ='NetNewsWire')
yojimbo ='Yojimbo')

nnw.subscriptions.find { |s| s if s.display_name == 'Flagged Items' }.headlines.each do |article|
  unless { |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 == 'untitled' && archived.source_url.empty?
    #   puts "!!! #{article.title} does not look to be imported !!!"
    # else
    #   article.delete
    # end


Js Jullia replied on Thu, 2012/07/12 - 8:37am

Nice And Informative..... It Is So Nice Writing,Please Keep It Up.I Like It Very Much And Will share This Information With My Friends. Ink Cartridges for printers

Snippets Manager replied on Wed, 2007/05/16 - 6:54pm

Note: I check to make sure we're not importing double articles... you can remove the unless statement before archived= for further speediness.