X
Tap here to go to the mobile version of the site.

Support Forum

Export Bookmark Name and Location in Columns?

Posted

I'm playing around with something in Google maps and need to be able to export all my bookmarks with name (ie description) and location (ie URL) into a csv or txt file into two columns that can be edited in a text editor and then imported into google maps. All the export / backup routines leave me with files that are far too complex for me to manually edit into this format. Anyone any ideas how i can do this please? Thanks.

I'm playing around with something in Google maps and need to be able to export all my bookmarks with name (ie description) and location (ie URL) into a csv or txt file into two columns that can be edited in a text editor and then imported into google maps. All the export / backup routines leave me with files that are far too complex for me to manually edit into this format. Anyone any ideas how i can do this please? Thanks.
Quote

Additional System Details

Installed Plug-ins

  • Shockwave Flash 32.0 r0

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

More Information

Yamama_sh 1 solutions 12 answers

This way you can export book marks into HTML formats https://support.mozilla.org/en-US/kb/export-firefox-bookmarks-to-backup-or-transfer

you may then be able to organize it the way you want

This way you can export book marks into HTML formats https://support.mozilla.org/en-US/kb/export-firefox-bookmarks-to-backup-or-transfer you may then be able to organize it the way you want
Was this helpful to you?
Quote

Question owner

Thanks for the reply. I have tried exporting to HTML and backing up to json. Both result in unwieldy files that are not designed for human interpretation. URL's and descriptions are discernible but so entangled with other long strings of text, not in columns or tabs or a csv format that its impossible.

Its frustrating because the FF bookmarks view when showing only name and location show exactly what I am seeking but in an editable text file.

Thanks again.

Thanks for the reply. I have tried exporting to HTML and backing up to json. Both result in unwieldy files that are not designed for human interpretation. URL's and descriptions are discernible but so entangled with other long strings of text, not in columns or tabs or a csv format that its impossible. Its frustrating because the FF bookmarks view when showing only name and location show exactly what I am seeking but in an editable text file. Thanks again.

Modified by rwpbrown

Was this helpful to you?
Quote
the-edmeister
  • Top 25 Contributor
  • Moderator
5399 solutions 40160 answers

JSON files are a pain due to there being no line breaks which would provide crude formatting.

If you would open the bookmarks.html file in Firefox that file can be easily made editable. Not 'columns' but there are paragraph type breaks and line offsets that equate to the folders in the users bookmarks.

Just open a bookmarks.html file using File > Open File ... in Firefox and view it before dismissing using that file.

These are different support articles about how to make HTML contant being viewed in Firefox editable by the user. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Midas

http://kb.mozillazine.org/Midas

That editing can be done by highlighting and deleting, and copy'n'pasting.

HTML is a human readable text file but with the long strings of "favicon.ico" ICON="data:image/png;base64 data in a bookmarks.html it requires a bit of patience when reading those file.

JSON files are a pain due to there being no line breaks which would provide crude formatting. If you would open the bookmarks.html file in Firefox that file can be easily made editable. Not 'columns' but there are paragraph type breaks and line offsets that equate to the folders in the users bookmarks. Just open a bookmarks.html file using '''File > Open File ...''' in Firefox and view it before dismissing using that file. These are different support articles about how to make HTML contant being viewed in Firefox '''editable''' by the user. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Midas http://kb.mozillazine.org/Midas That editing can be done by highlighting and deleting, and copy'n'pasting. HTML '''is a human readable text file '''but with the long strings of ''"favicon.ico" ICON="data:image/png;base64'' data in a bookmarks.html it requires a bit of patience when reading those file.
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8697 solutions 71086 answers

Let's say the links you want are all adjacent in your exported bookmarks.html file. Then you could select those links and use a script in the Web Console (or a bookmarklet) to throw up a CSV formatted version of the links.

Like:

var rng = window.getSelection().getRangeAt(0); 
if (!rng.collapsed){
  var dNew = document.createElement('div'); 
  dNew.appendChild(rng.cloneContents()); 
  var aEls = dNew.querySelectorAll('a[href], area[href]'); 
  if (aEls.length > 0){
      dNew.innerHTML = '<textarea style="width:100%; height:100%; color:#ffc; background-color:#006;"></textarea><button onclick="this.parentNode.remove(); return false;" style="position:absolute; right:1em;">X</button>'; 
      var sTemp = '"Title","URL"'; 
      for(var i=0; i<aEls.length; i++){
        sTemp += '\n"' + aEls[i].textContent.replace(/"/g, '`') + '","' + aEls[i].href + '"';
      }; 
      dNew.setAttribute('style', 'position:fixed; width:80%; height:80%; top:5%; left:5%; color:#fff; background-color:#000; padding:1em;'); 
      document.body.appendChild(dNew); 
      dNew.childNodes[0].textContent += sTemp;
    }
} 

More info on the Web Console: https://developer.mozilla.org/docs/Tools/Web_Console

(Based on a "Selection Links" bookmarklet I found in a crusty old folder in my bookmarks.)

Let's say the links you want are all adjacent in your exported bookmarks.html file. Then you could select those links and use a script in the Web Console (or a bookmarklet) to throw up a CSV formatted version of the links. Like: <pre>var rng = window.getSelection().getRangeAt(0); if (!rng.collapsed){ var dNew = document.createElement('div'); dNew.appendChild(rng.cloneContents()); var aEls = dNew.querySelectorAll('a[href], area[href]'); if (aEls.length > 0){ dNew.innerHTML = '&lt;textarea style="width:100%; height:100%; color:#ffc; background-color:#006;">&lt;/textarea>&lt;button onclick="this.parentNode.remove(); return false;" style="position:absolute; right:1em;">X&lt;/button>'; var sTemp = '"Title","URL"'; for(var i=0; i&lt;aEls.length; i++){ sTemp += '\n"' + aEls[i].textContent.replace(/"/g, '`') + '","' + aEls[i].href + '"'; }; dNew.setAttribute('style', 'position:fixed; width:80%; height:80%; top:5%; left:5%; color:#fff; background-color:#000; padding:1em;'); document.body.appendChild(dNew); dNew.childNodes[0].textContent += sTemp; } } </pre> More info on the Web Console: https://developer.mozilla.org/docs/Tools/Web_Console (Based on a "Selection Links" bookmarklet I found in a crusty old folder in my bookmarks.)
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17481 solutions 157964 answers

If you do a copy of selected bookmarks to the clipboard then you get the text/html flavor (<a href="location">name</a>) on the clipboard that you can paste in an HTML capable editor.


You can also possibly use an SQLite utility and open places.sqlite. You can use a suitable query to create a list of the bookmarks showing name and location. You can export the list to a CSV file. There are also utilities that can convert JSON data to CSV.

If you do a copy of selected bookmarks to the clipboard then you get the text/html flavor (&lt;a href="location"&gt;name&lt;/a&gt;) on the clipboard that you can paste in an HTML capable editor. ----- You can also possibly use an SQLite utility and open places.sqlite. You can use a suitable query to create a list of the bookmarks showing name and location. You can export the list to a CSV file. There are also utilities that can convert JSON data to CSV. *https://www.google.com/search?sa=N&num=100&q=convert%20json%20to%20csv
Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.