Copy bookmarks & their names & keywords as text?

User Help for Mozilla Firefox
Post Reply
kitesarefun
Posts: 170
Joined: January 18th, 2006, 4:22 pm

Copy bookmarks & their names & keywords as text?

Post by kitesarefun »

How can I copy and past multiple bookmarks into a spreadsheet so that there are separate columns for the URL, bookmark name, and keyword? In other words copy and paste as plain text, including URL, name and keyword.

My ultimate goal here is to make a printable list for quick reference of my bookmarks that have keywords. I don't need any kind of importing back into FF or clickable links. Literally just a list I can format as I like and print out.

FF 45.7.0 ESR
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Copy bookmarks & their names & keywords as text?

Post by morat »

You could use the web console to export the data in the bookmarks.html file to excel.

* export bookmarks to html
* open bookmarks.html page in current tab
* open web console ctrl+shift+k
* run code below
* select all
* copy
* paste in excel or calc or notepad

Code: Select all

(function () {
  var as = document.getElementsByTagName("a");
  var out = [];
  out.push("<table>");
  for (var i = 0; i < as.length; i++) {
    if (as[i].hasAttribute("SHORTCUTURL")) {
      out.push("<tr>");
      out.push("<td>" + as[i].textContent                 + "</td>"); // name
      out.push("<td>" + as[i].getAttribute("SHORTCUTURL") + "</td>"); // keyword
      out.push("<td>" + as[i].href                        + "</td>"); // location
      out.push("</tr>");
    }
  }
  out.push("</table>");
  document.body.innerHTML = "<div>" + out.join("") + "</div>";
})();
User avatar
therube
Posts: 21719
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Copy bookmarks & their names & keywords as text?

Post by therube »

(Nirsoft's) FavoritesView can read & export to various formats (including csv, which can be imported into a spreadsheet) - but it does not show keywords.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Post Reply