Export Firefox Bookmarks to Delicious
Tags:
update Here's the change I made, to lines 75-76:
# convert bookmark time to ISO time
try:
isoTime = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime (int(item.getTime())))
except:
isoTime = ''
Props to Elliot Smith for his Python scripts that automate transferring bookmarks from Firefox to Del.icio.us.
I had to make a minor tweak — it couldn't handle some of the bookmark dates, so I did a try/except that set them to '' — but it saved me a lot of time and trouble.
Thanks for sharing the hack.
Joe,
what was the tweak you made? Thanks...
Posted by: Marcus on November 10, 2004 6:40 AM | permalinkHow should the indentation work? Sorry, I'm new to Python.
C:\Documents and Settings\marcus.mattila.SYSOPEN\Desktop>c:\Python23\python.exe
BookmarksToDelicious.py "C:\Documents and Settings\marcus.mattila.SYSOPEN\Applic
ation Data\Mozilla\Firefox\Profiles\default.kss\bookmarks.html" maga pass
File "BookmarksToDelicious.py", line 77
isoTime = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime (int(item.getTime())))
^
IndentationError: expected an indented block
Hey Marcus.
Probably the simplest, easiest thing for you to do is to just change the line from:
isoTime = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime (int(item.getTime())))
to:
isoTime = ""
and keep the indentation the same.
This means that your imported bookmarks won't have the proper date stamped on them, but that's probably acceptable. If it isn't, I'll contact the original writer with my patch.
Posted by: Joe Grossberg on November 10, 2004 11:12 AM | permalinkNo more comments! Either someone has violated Godwin's Law, I'm tired of the discussion or, most likely, the ten-week window has closed. You can, however, contact me through email.