Skip to content

Instantly share code, notes, and snippets.

@trevorturk
Created May 18, 2010 03:04
Show Gist options
  • Save trevorturk/404555 to your computer and use it in GitHub Desktop.
Save trevorturk/404555 to your computer and use it in GitHub Desktop.
Weekly Digest - Ruby script for pulling Delicious links
require 'rubygems'
require 'rest_client'
require 'json'
req = RestClient.get 'http://feeds.delicious.com/v2/json/trevorturk?count=100'
links = JSON.parse(req.body)
body = ''
links.each do |l|
body << "<p><a href=\"#{l['u']}\">#{l['d']}</a></p>\n"
body << "<blockquote><p>#{l['n']}</p></blockquote>\n\n"
end
puts body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment