#!/usr/bin/python # Copyright (c) 2004 Randy Gamage # Written 9/19/03 # Script to export Opera Bookmarks to HTML, for easy posting on the web # I realize this code is ugly and inefficient- please send me ideas for improvement! from string import * # Set this to your source/destination file path bookmarkpath = "D:\\Data\\Profiles\\rgamage\\Application Data\\Opera\\Opera7\\profile\\" # Set this to your source file name bookmarkname = 'opera6.adr' # Set this to your desired output file name. Warning - this will overwrite with no warnings! outfilename = 'mylinks.html' fname = bookmarkpath + bookmarkname foldermode = 0 foldername = 'Un-Categorized' URLname = '' URL = '' f = open(fname,'rb') bmlist = f.readlines() #List with n elements, each a line f.close() linkdict = {} otherdict = {} fname = bookmarkpath + outfilename f = open(fname,'w') for i in bmlist: try: if foldermode and i.find('NAME=')==1: foldername = i[6:-2] f.write("