Skip to content

Instantly share code, notes, and snippets.

@DRMacIver
Created June 12, 2009 16:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
require "rubygems"
require "json"
require "httparty"
module Delicious
include HTTParty
base_uri "https://api.del.icio.us/v1"
basic_auth ARGV[0],ARGV[1]
def self.add_post(it)
post("/posts/add", :query => it)
end
end
JSON.parse(IO.read(ARGV[2])).each do |post|
puts "Importing #{post["description"].inspect}"
Delicious.add_post(post)
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment