orgmarks
Orgmarks converts browser bookmarks to Org-mode and back. Firefox and Chrome both export to the Netscape Bookmark HTML format, which is fine for machines and less fun to work with by hand; Orgmarks turns that into an Org file, where folders are headlines and each bookmark is a headline with a link under it.
HTML is the standard export format for bookmarks, but I like to keep things in an editable plain text format. I picked Org because I use Emacs, but it’s better than HTML no matter which editor you use (but way better in Emacs). Bookmarks look like this in the file:
* Bookmarks Toolbar
** Wikipedia :reference:
[[https://wikipedia.org/]]
** Development
*** GitHub
[[https://github.com]]
Code hosting platform
Tags come across as org tags, Firefox’s keyword shortcuts become
properties, and any text under a link is kept as a description. Nested
folders of any depth survive the round trip. Timestamps don’t - I
decided ADD_DATE stamps on every entry were more clutter than
they’re worth, and I doubt anyone is nostalgic about when exactly they
bookmarked something.
Once bookmarks are plain text, the usual benefits follow: they diff,
they can go in git, and you can edit them the way you edit anything
else in Emacs. The specific thing I wanted was org-refile - dumping
a messy browser export into one file and then filing bookmarks one at
a time into a clean one, without leaving the editor. The README
includes the Elisp bit of init.el I use for that, which restricts
refile targets to folders within the bookmarks file.
It’ll also merge multiple inputs into a single Org file, combining
folders with matching names, and --deduplicate drops repeated URLs
(keeping whichever came first, so listing your organized file ahead of
a fresh browser export does the sensible thing). Your browser won’t do
that for you.
This turned out to be one of my programs that I actually use regulary. It’s a Go CLI, with binaries for Linux, macOS, and Windows. The code is here on GitHub.