How to automatically add bookmarks to Google Chrome?

6,180

Solution 1

I don't use Chrome, but since you feel comfortable with Linux tricks/hacks, why don't you:

  1. Export bookmarks from Chrome's Bookmarks Manager
  2. Study the format of the file and its entries
  3. Transform your text file into this format
  4. Import the file

I would suggest making first a try with importing one bookmark address using a hand-crafted file, just to validate the concept.

Solution 2

Google Chrome for Linux stores bookmarks in JSON file located in ~/.config/google-chrome/Default/Bookmarks. You probably can transform your line-by-line list to JSON format using linux shell commands. I hope it helps a bit.

Share:
6,180

Related videos on Youtube

user882903
Author by

user882903

Updated on September 17, 2022

Comments

  • user882903
    user882903 almost 2 years

    I have a text file that has a lot of bookmarks in text form. It looks something like this

    $ cat bookmarks
    www.google.com
    www.stackoverflow.com
    www.superuser.com
    www.unix.stackexchange.com
    $
    
    • I want all these bookmarks to be saved in my Chrome browser. How can I do it without having to open each page in the browser and adding it as a bookmark manually?

      I tried importing this text file from the Import Bookmarks option, but it doesn't work.

      Is there some good way of doing this?

    • Also, it would be awesome if I can update the bookmarks for example by adding the url at the end of the bookmarks file and then resyncing.

    • I am using Chrome on Ubuntu, so any Linux tricks/hacks for doing this are also fine.

  • Mahn
    Mahn almost 9 years
    Can confirm that this (still) works today. All you have to do is export the bookmarks, edit the resulting html file so it only contains the new bookmarks you want to add, and import it back. The new bookmarks will then show up in a folder called "Imported" in the Bookmarks Manager, which you can then freely move wherever.
  • Admin
    Admin almost 2 years
    An important note, here, is that you cannot have Chrome running while updating the bookmarks file; it will revert. And at least in my Gnome, I had to go to some lengths to make sure Chrome was truly, completely closed.