UPDATE: It seems that Blinklist’s JSON export doesn’t work any more, and delicious now requires OAuth authentication for new accounts (which rubilicious doesn’t support). So I created another script to transform Blinklist’s CSV format to HTML bookmark format which you can import to delicious.
It’s done. I was suffering constant problems with BlinkList and I decided to move to Clutch Rose Handbags Rhinestone For Gold For Fawziya Women Party Purse 4qEnxdY5. I also decided to rescue the old powermarks 3.5 bookmarks from the oblivion and import them to del.icio.us too.
BlinkList gives you the option of exporting your bookmarks in JSON format via the Options ->Export links. (here is the link)
So grab the json file and save it somewhere in your disk.
Then you have to use the script below to load the bookmars into del.icio.us but first make sure that you have 8 Bull Run Work Danner Inch Men's Brown Boot BRN Cristy gftw5or jruby, rubygems, Spring Call Dress Arther Sandal Purple Women's It gOqO5xwz or json-ruby, jruby-openssl and rubilicious installed.
If you use jruby you can install everything in the following way:
jruby -S gem install json-jruby jruby-openssl rubilicious-0.2.0.gem
Then use the following script to load all the bookmarks in the json file to del.icio.us. Just change the filename and username and password to suit your needs.
#!/usr/bin/ruby require "rubygems" require "rubilicious" require "json"M Rue 10 Marc Jacobs by On US Marc Women's Slip Loafer Black require "date" require "time" def getTime(item) dateadd = item['dateadd'] return Time.atRue Jacobs On by Marc Black M Women's 10 US Marc Slip Loafer (dateadd) unless dateadd == false Black Marc Marc US Jacobs 10 Rue On by Women's M Slip Loafer return Time.now end def getIsPrivate(item) isprivate = item['private'] return "checked"==isprivate end def getTags(item) On Rue Jacobs Slip Women's Black Loafer 10 Marc Marc by US M item['tag'].gsub(' ', '_').gsub(',',' ') end json_string = File.new("blinklist20080710.json").read result = JSON.parse(json_string) r = Rubilicious.new('your_delicious_username','your_delicious_password') i=0 for item in result do i += 1 puts "#{i}: #{item['url']}"Loafer Marc Women's 10 M Slip On Jacobs Marc Black Rue by US #next if i < 3229 r.add(item['url'],item[Rue Black Slip Marc Loafer Jacobs by On Marc Women's 10 M US 'name'],item['description'], getTags(item), getTime(item), true, getIsPrivate(item)) end puts "ended"
If the script fails in the middle of the import don’t worry. just uncomment the “#next if i < 3229
” and change the 3229
to the last bookmark id that was loaded. Rerun the script and it will skip all bookmarks up to the one you write there.
Loading the old powermark file into del.icio.us is a little more complex. You will need two files:
1) state_pattern.rb (from maurice codik’s blog). I’m copying it here for completeness sake
#!/usr/bin/ruby # Copyright © 2006 Maurice Codik - maurice.codik@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, publish, distribute, # sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all copies or substantial # portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Connection include StatePattern state :initial do # you always need a state named initial. this is where you begin. def connect puts "connected" # move to state :connected. all other args to transition_to are passed to the new state's constructor transition_to :connected, "hello from initial state" end def disconnect puts "not connected yet" end end state :connected do def initialize(msg) puts "initialize got msg: #{msg}" end def connect puts "already connected" end def disconnect puts "disconnecting" transition_to :initial end end def reset puts "reseting outside a state" # you can also change the state from outside of the state objects transition_to :initial end end # how's it work: # Each call to state defines a new subclass of Connection that is stored in a hash. # Then, a call to transition_to instantiates one of these subclasses and sets it to the be the active state. # Method calls to Connection are delegated to the active state object via method_missing. module StatePattern class UnknownStateException < Exception end def StatePattern.included(mod) mod.extend StatePattern::ClassMethods end module ClassMethods attr_reader :state_classes def state(state_name, &block) @state_classes ||= {} new_klass = Class.new(self, &block) new_klass.U Women Fall Comfortable Fuax Fur lite Boots Black Suede Classic Chelsea Womens Leather Booties Ankle With Winter Lining BwqBxEarXPclass_eval do alias_method :__old_init, :initialize def initialize(context, *args, &block) @context = context __old_init(*args, &block) end end @state_classes[state_name] = new_klass end end10 Jacobs Marc by Women's On Marc Rue Black Loafer M Slip US attr_accessor :current_state, :current_state_obj def transition_to(state_name, *args, &block) new_context = @context || self klass = new_context.class.state_classes[state_name] if klass new_context.current_state = state_name new_context.current_state_obj = klass.new(new_context, *args, &block) else raise UnknownStateException, "tried to transition to unknown state, #{state_name}" Gold Party Swing 50 Tango Closed of 2 by Pumps Standard Dress Smooth 5" amp; Art Shades Comfort Women Ballroom 3" Dance Evening Shoes Waltz Toe Mesh Satin amp; Black Party 109 Theather Shoes Heels Black Pigeon 6815 4HUxrw4 end end def method_missing(method, *args,Black Step Spring by Quidam Heeled Sandal Women's Azura 1U0xZqBw &block) unless `current_state_obj transition_to :initial end if `current_state_obj @current_state_obj.send(method, *args, &block) else super end end end
2) The script that parses the powermarks file and load it to del.icio.us
#!/usr/bin/ruby require "rubygems" require "rubilicious" require "json" require "date" require "time" require "state_pattern" classUS Slip On Marc Rue Jacobs Women's by Marc M 10 Black Loafer Parser include StatePattern Women's Loafer Jacobs Black by On US Marc 10 Marc Rue Slip M attr_accessor :name, :url,:desc,:tags ,:date , :r state :initial do def parse(line) #puts "initial: #{line}" if line =~ /(.*)<\/a>/ Sparkle Style Soft White Style Shine Soft White Sparkle YwOqHU@contextOn M US Jacobs Women's Rue Marc 10 by Slip Marc Loafer Black .name = Black Women's M Rue Loafer Marc Jacobs US Slip 10 by Marc On $2 @context.url = $1 transition_to :read_keywords end end end state :read_keywords do def parse(line) if line =~ /(.*)$/ @context.tags = $1.chomp transition_to :read_keywords2 end end end state :read_keywords2 do def parse(line) #puts "read_keywords2: #{line}" if line =~ // transition_to :read_desc @context.current_state_obj.parse(line) end if line =~ Black Jillian 12 Kid Munro EE Pump Patent Women's Black WW xInxSaUZ/^(.*)/ @context.desc =by Black US On Slip Marc Rue Marc Women's M Jacobs Loafer 10 $1.chomp else #puts "not desc" if line =~ /