Synchronizing Opera bookmarks with Perl, Org, and git
Who here like me still uses Opera (specifically Opera 12 on Linux)? It's being abandoned, the bugs are piling up, and more websites are not rendering correctly on it. However, the combination of keyboard shortcuts and some specific features like editing+applying source code makes me still stick to it.
The Opera makers provide a service called Opera Link that can synchronizes your browser bookmarks and a few other stuffs between computers and mobile devices. However I prefer not to use it and rely on some good ol' tools instead.
I also happen to be a fan of Org so Org will be the master document.
The steps that I describe here might be too much of a hassle, but I like it and thus share it.
First, you install the CPAN module App::ConvertOperaBookmarksToOrg which includes the utilities adr2org and org2adr.
Then you convert your Opera bookmarks to an Org document with this command:
% adr2org -T ~/.opera/bookmarks.adr > repo/opera-bookmarks.org
opera-bookmarks.org is the actual document that you will be putting into git repository and synchronize between computers. It is convenient to edit via Emacs, and is more easily diff-able by removing volatile bits that change or random written by Opera (like the ID field). The -T option is to exclude the Trash folder, which I don't care for.
In another computer, you convert back to Opera .adr format using:
% org2adr repo/opera-bookmarks.org > ~/.opera/bookmarks.adr
Make sure that Opera is not running when you override its bookmarks file.