I decided to migrating bookmarks from Firefox to org-more for multiple reasons (it's easier to add metadata, open them with different browsers, search, etc.). I started out simply copy-pasting the title, then the url, and maybe open the link to remember what it is and add some metadata into a hierarchical org-mode list, but it seemed incredibly repetitive.
What I ended up doing was opening the html file with eww, and wrote a function that copies the title and the link into the right format (using the same functions I use when editing text). Here are the functions:
(defun my/firefox-bookmark-eww-to-org-list () "convert a link representation of a firefox bookmark read from eww to that of an org mode list" (interactive) (delete-horizontal-space) (shr-copy-url) (insert "- ") (end-of-line) (insert "\n - ") (yank)) (defun my/firefox-bookmark-eww-to-org-list+next-line () "same as my/firefox-bookmark-eww-to-org-list, but moving to the next line afterwards (useful with #'repeat)" (interactive) (my/firefox-bookmark-eww-to-org-list) (move-beginning-of-line nil) (next-logical-line))
A few minutes later, I had all my bookmarks in Emacs. How people can live with text editors without a browser is beyond me (just kidding).