#!/usr/bin/rubyrequire "rubygems"require "csv"i=0File.open('bookmarks.html', 'w') do |f| f.print <<EOF <!DOCTYPE NETSCAPE-Bookmark-file-1> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <!-- This is an automatically generated file. It will be read and overwritten. Do Not Edit! --> <TITLE>Bookmarks</TITLE> <H1>Bookmarks</H1> <DL><p>EOF CSV.foreach('bookmark.csv',{:col_sep => "\t"}) do |item| next if item[0] == "url" i += 1 puts "#{i}: #{item[0]}" #the url is position 0 puts "#{i}: #{item[1]}" #the name is position 1 puts "#{i}: #{item[3]}" #the tags are in position 3 #next if i > 3229 #r.add(item[0],item[1],"no description", getTags(item), getTime(item), true, getIsPrivate(item)) #url, name,tags,time, f.puts "<DT><A HREF=\"#{item[0]}\" LAST_VISIT=\"1248434357\" ADD_DATE=\"1248434357\" TAGS=\"#{item[3]}\">#{item[1]}</A>" end f.puts "</DL><p>"endputs "ended";