beaker icon indicating copy to clipboard operation
beaker copied to clipboard

Implement bookmarks import/export

Open taravancil opened this issue 8 years ago • 10 comments

It would be great to have a set of tools for importing bookmarks from pinboard, pocket, firefox, chrome, etc., and also for exporting bookmarks from Beaker.

We'd love to have this in the upcoming 0.8 release, but probably won't be able to prioritize it ourselves.

If you want to take this issue, let us know. We've done some initial research and are happy to help.

taravancil avatar Sep 27 '17 02:09 taravancil

That would be indeed an awesome feature! Do you had a "one-time-import" in mind or more something that syncs the bookmarks in a repetitive manner?

akoenig avatar Sep 30 '17 07:09 akoenig

Hi, I am interested in working on Beaker and would love to try and tackle this issue if it would help. Feel free to get in touch with me about your initial research

dpopp07 avatar Oct 03 '17 05:10 dpopp07

Same as, can you post the "initial research" :D

tomatopeel avatar Oct 18 '17 12:10 tomatopeel

Hey @akoenig, we're thinking more like one-time import/export - so that there's as little friction as possible for someone to start using Beaker without giving up their existing bookmarks.

Pinboard exports their bookmarks in several formats (XML, JSON, HTML), but most other bookmarking tools only export to HTML. We'd be ok with only supporting HTML imports, but if someone is feeling ambitious you could implement multiple formats.

Let's not start working on this until @pfrazee and I are 100% certain that we've settled on the bookmarks format for 0.8. I'd say we're 99% of the way there, but I'd hate for someone to start working on it and for us to change our minds.

taravancil avatar Oct 18 '17 15:10 taravancil

Is this an appropriate place to discuss the bookmarks data model?

Chrome and Firefox currently export bookmarks such that both bookmarks and folders are BookmarkTreeNode's (this type appears identical over at the MDN docs here also). Folders can have children, these children can be folders or bookmarks; I don't think bookmarks themselves can have children.

Underneath this, Firefox employs a Places SQLite Database. Here, a bookmark can not only be a bookmark and a folder but can also be a tag too.

In Chromium, there is a Bookmarks file in the user profile data directory with a bunch of JSON which contains some fields in addition to those listed in the BookmarkTreeNode docs above. I'm not sure if this JSON is the authoritative bookmark data source in Chromium (if anybody knows please shout).

Personally I'd prefer a flat bookmarks model (ditching folders) and giving bookmarks a "tags" array of tags. I suppose here the word "tag" is interchangeable with "folder"; the point is that to me it makes sense for the children (the bookmarks) to store references to the parents (the tags or folders or whatever) rather than having monolithic folders being arrays of bookmarks - this way a bookmark can easily belong to many tags/folders simultaneously without duplication of data. Maybe there's a strong reason for Chrome/Firefox not doing it this way, if anybody could enlighten me I'd be very grateful!

Furthermore, I think it would then be easier to develop something like "umbrella" tags/folders, which could be container tags/folders for collections of tags/folders... Anyway...

Just adding to the discussion. Let me know when you guys have more info on what you've settled on and the specifics for what you want from this tool (I presume you just meant something to consume the Netscape Bookmark File Format HTML that Chrome/Firefox currently export? I was thinking of writing something that would be able to deal with the tags in Firefox's places.sqlite also).

tomatopeel avatar Oct 24 '17 12:10 tomatopeel

Quickly I have to point out, @rickycodes was also planning to hit this issue. Yall might need to talk out who is going to do it.

@tomatopeel we're not too concerned with following the structure of bookmarks used by other browsers. We just want the HTML import/export to work with them. I'm going to document our data model more closely soon, but https://github.com/beakerbrowser/beaker-profiles-api is a good place to start. https://github.com/beakerbrowser/beaker-profiles-api/blob/master/test/api.js#L87 for more detail.

pfrazee avatar Oct 25 '17 18:10 pfrazee

@tomatopeel have you started working on this? I had discussed taking this issue on with @pfrazee previously, but don't want to double up if you're planning on taking it on

rickycodes avatar Nov 06 '17 17:11 rickycodes

@rickycodes Hey, no I haven't and don't think I will be now. I was looking at this as an opportunity to work on something that moved away from the established bookmarking approach and more towards a tags-first approach.

tomatopeel avatar Nov 06 '17 23:11 tomatopeel

I just exported my bookmarks as an html. Then added the page to my dat library and pinned to start page. Now it's easy to click links and then bookmark/tag them ( i love the tagging pages approach ).

It's a work-around for now.

roscoevanderboom avatar Sep 16 '18 15:09 roscoevanderboom

Did this idea get abandoned, or is it already implemented? I used to be a Chrome user, but decided to swap recently both for the nifty Hyperdrive concept and the plain fact that Beaker is based on user-first principles; but it would be a lot easier if I could keep my bookmarks. Thank you for a sleek (dark mode default!), easy-to-use web browser without all the spying!

Kyllingene avatar Jun 04 '21 04:06 Kyllingene