Converting chrome bookmarks

I must be missing something. I can’t be the only person who has tons of browser bookmarks that I expect would be far more usable in tiddlywiki. But I can’t find any topics discussing how to move them from chrome.

Is this obvious?
Is this very difficult?
Is this useless or somehow a bad idea?

1 Like

Try this:

  • In Chrome, press ctrl-shift-O to open the Bookmark Manager (URL=chrome://bookmarks)
  • From the “three dots” menu (upper right corner), select “export bookmarks”
  • This will save a local file with a name like bookmarks_1_2_23.html (the numbers are the current date, e.g., January 2nd, 2023)
  • You can then drag-and-drop that html file into your TiddlyWiki to import the file contents

Note that because it is imported as HTML content, the tiddler will have type=text/html, and will automatically display it’s contents inside a scrolling IFRAME element. I’m not sure how useful this is. The only obvious benefit is that your bookmarks can now “travel” with your TiddlyWiki file, so they will be available even if you are on a different system/browser.

1 Like

This thread may be of interest:

https://groups.google.com/g/tiddlywiki/c/37B5uhgbJwE/m/1rU9YBN6AwAJ

1 Like

Google wants to export a mostly useless HTML file, because of course no sane person would possibly want to migrate. But there’s an extension, " Export History/Bookmarks to JSON/CSV*/XLS* " that will let you export your bookmarks to JSON. And now we have tools in TW to work with JSON.

Use the extension to grab your JSON data and paste it into a tiddler, “data”. Make it a application/JSON tiddler. As always, make backups if there is any danger of losing data.

Then paste the following code into a tiddler to make a button that should convert your bookmark data into tiddlers. I’ve only tested it with four bookmarks, so I don’t know if there are performance issues with larger amounts. It just creates tiddlers with the title of the bookmark and a field “url”, and a tag “Bookmark”. Duplicate bookmark titles (because of Chrome bookmark folders) will just be auto-incremented. If someone needs to capture the bookmark date, or the relationship between bookmarks, my services are available at reasonable rates :wink:

<$button>Make bookmarks
<$vars data={{{ [[data]get[text]] }}} >
<$list filter="[[data]indexes[]]" variable="index">
<$list filter="""[<data>jsonextract<index>]""">
<$action-createtiddler 
  $basetitle={{{ [<currentTiddler>jsonget[title]] }}}  tags="Bookmark" 
 url={{{ [<currentTiddler>jsonget[url]] }}}
/>
</$list>
</$list>
</$vars>
</$button>
4 Likes

The whole discussion and the idea of bookmarker plugin can be found bere

[IDEA]: Drag and Drop a Bookmark.html Exported from Chrome/Edge/Firefox (google.com)

Saq developed a nice deserilizer and I hope I can publish it sometimes in the near future!

The solution by Mark is promising and I like it as it uses pure wikitext :wink:

Right.

@saqimtiaz’s thing is seriously useful. As is @Mark_S’ expansion.

This is a premium example of the importance of “preserving solutions already”.

Side note, TT

1 Like

I use Tiddlywiki to organise my Chrome/Firefox bookmarks and open tabs, and find it ideal for that purpose. Instead of numerous open tabs on browsers in various devices that I can’t keep track of or read all, I now have “open tabs” bookmarks in one Tiddlywiki file that can be tagged, commented and sorted by order of interest, on top of those old bookmarks for sites that I have visited in the past. I still won’t be able to go through all these open tabs (hundreds of them!), but they are now under control :wink: I can safely close all the tabs, and even deleted the bookmarks in the browsers without fear of losing my hoard :grin:

My solution predates my use of Tiddlywiki though and mostly uses python codes to do the processing outside of Tiddlywiki. I will just share my general approach below. I’m watching this thread with interest as there are interesting developments here that I may use.

My current approach:

  • The bookmarks (and open tabs) on browser in various devices are transitory. They accumulate until I have a real need to export them.

  • The bookmarks and open tabs are exported to html file (bookmarks) and text file (tabs), and sync to my Tiddlywiki bookmarks using Python codes.

    • ‘TiddlPy’ python library is used to read/write Tiddlywiki file directly (up to ver 5.1.2 only)

    • Bookmarks on Chrome/Firefox are manually exported to html files; open tabs in Chrome are saved into a bookmark folder.

    • Open tabs in Android firefox are exported to an app (text editor or email) and then saved to a text file as a list of urls.

    • I found python codes on the web that read both Chrome and Firefox exported bookmarks in html format.

    • Only new bookmarks are added to the bookmarks database each time. Unwanted bookmarks in the database are marked as deleted but never removed, so duplicate bookmarks and old bookmarks from the browsers are ignored and didn’t matter to the database.

    • For new bookmarks, the corresponding site image and title, if available, are retrieved using OpenGraph protocol (GitHub - erikriver/opengraph: A python module to parse the Open Graph Protocol). If you ever share a URL in WhatsApp/Facebook, the helpful image and title that magically appear after you typed in the URL are retrieved from the HTML header page of the URL based on Facebook’s OpenGraph protocol. Most news sites support the OpenGraph protocol as the visual images help to circulate their news on social media. Not as common or useful for other websites, which is a little disappointing.

    • My bookmark database includes also a folder of site icons and images.

There are improvements that I would like to make to the Tiddlywiki housekeeping of my bookmarks. I’m glad this topic has cropped up and will be watching the discussion here closely.

1 Like