Exporting Chrome and Google Bookmarks to Evernote

Recently I started revisiting the way my data was spread across different cloud services. Up until now, I’ve been using Google Bookmarks to keep all my bookmarks, lots and lots of them, using mainly tags to keep organized. A few years ago when I decided to move from Delicious, it felt like an obvious choice. A few hiccups along the way, but so far, it worked really well. I even created a Chrome extension to help bookmarking and searching  bookmarks from the omnibar. A few things annoyed me, like presenting tags the same way as folders, all listed on the left sidebar, creating a loooong page with only links on the side.

Lately I also started bookmarking a few links on Evernote, specially references to technical articles and so on. In the spirit of simplifying, I decided to consolidate everything in the same place, Evernote. This meant I would have to migrate my 3k+ bookmarks from Google to Evernote, trying to preserve all tags and possibly creation dates.

Google Bookmarks doesn’t provide a huge list of exporting options, only one HTML format, with links grouped by tag. The interesting thing about the format is that bookmarks are duplicated if they have more than one tag. One annoying thing I would have to deal with.

Looked around for services or scripts that could help migrating, but not much luck. Most guides only suggested importing the HTML file directly to Evernote, creating one singe note, and that’s not what I wanted. Looked a little bit further and found a Python script on GitHub. Very simplistic. The script would parse the file and write the output in an Evernote format, or ENEX, a simple XML file with Evernote tags.

Tried it and it worked, at least it ran and created a new file. Tried to import it on Evernote and no luck. It failed giving no clue about what was wrong. I decided to play with the file a little bit and found the problem, a few spaces and empty lines in the wrong place. Fixed the script and import worked, sort of…

Remember I mentioned about duplicate entries on the exported file. The script did not account for that, so all entries with more than one tag were duplicated.  That would not work. Since the script was almost done, I just decided to fork it and fix this small things. Included a check for duplicated bookmarks. While I was at it, I also minified the output and included created dates to the exported fields.

If you are looking for something similar, the script is on GitHub…

https://github.com/spiermar/bookmarks2evernote

Use it, fork it, improve it. And let me know what you think! ;-)