Created
May 18, 2010 03:04
-
-
Save trevorturk/404555 to your computer and use it in GitHub Desktop.
Weekly Digest - Ruby script for pulling Delicious links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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