HackedHow I centralize and distribute my bookmarks

How I centralize and distribute my bookmarks


- Advertisment -

Robin Glen

At a large company there are thousands of different internal URLs, from multiple development environments, workflow tools and HR systems. New tools are often introduced, old ones decommissioned or hostnames changed, I often joked that if I cleared my internet history I wouldn’t be able to do my job.

The only real authority of truth was crowdsourced by asking in Slack what the URL was for a certain service. If you were lucky someone might have already set up a bot to respond, if you were unlucky it might start a flamewar about how bad the latest HR platform was. The idea of crowdsourcing URLs and their authority of truth would run through mind for a while.

At the start of this year I moved to a start up and while there are a lot less URLs they were still distributed in different tools and not always up-to date. I again started thinking about a way to centralise bookmarks while still allowing you to use your existing tools. Having spent the last few years of my career working in infrastructure there was only one solution in my mind… YAML!

label: Bookworms

description: These are sample bookmarks


- label: folder 1

description: This is to describe the folder structure


- label: sub folder 1

description: This is to describe the sub folder structure


- label: sample url 1

description: this is used to describe the bookmark

href: 'https://www.mywebsite.com'

- label: folder 2


- label: sub folder 2


- label: sample url 2

description: this is used to describe the bookmark

href: 'https://www.mywebsite.com'

- label: sample url 3

description: this is used to describe the bookmark

href: 'https://www.mywebsite.com'

- label: sub folder 3


- label: sample url 4

description: this is used to describe the bookmark

href: 'https://www.mywebsite.com'
- Advertisement -

Creating a standardised structure for URLs based on bookmarks and folders would allow people to easily contribute and add the ability to transform this data into different formats.


Something very common in the industry is people maintaining a list of useful links and storing them in Github as a README.md . You can see a great example here: https://github.com/binhnguyennus/awesome-scalability

If you have your bookmarks stored as YAML this is a pretty straight forward transformation. With a few lines in NodeJS I was able to convert the bookmarks YAML into a README.md.


- Advertisement -

While converting into markdown is a nice way to self document a repository I wanted these bookmarks to be more practical and be available when and where I need them.

Looking into the Chrome Bookmark manager I saw exporting your bookmarks just saved a HTML file. All I needed to do was generate this HTML file from the YAML.

Again I was able to do this with NodeJS, generating and saving a file I could import into my browser.

- Advertisement -

My bookmarks were now available within my Chrome toolbar. To my surprise this HTML is standardised in most common browsers, from testing file works for:

You can find instructions of how to import bookmarks on the links above, other browsers might also work but they have not yet been tested.

Bookworms is the tool I wrote that allows, people, teams or a company to store, share, update and centralize their important links while giving multiple useful outputs.

Currently you need to have Node and npm installed on your machine once this is done you can use it with the following command:

npx bookworms get ./my-bookmarks.yaml

This will generate the files README.md and a browsers.html in the same directory it’s run. You can also fetch bookmarks from a remote location and output the exports into a different directory:

npx bookworms get https://raw.githubusercontent.com/thearegee/bookworms/main/demo/config/bookmarks.yaml -d="./output"

For storing your bookmarks I recommend having a repository that contains the YAML, README.md and browsers.html files together, here people can view, import or contribute to your bookmarks. You can see an example here: https://github.com/thearegee/bookworms/tree/main/demo

Currently you need to run the npx command after each update to the YAML file, check in the the changes and then reimport browsers.html, however this is something I’m working on automating.

You can also import Bookworms like a normal npm module and then use it programmatically. I recently did this at a company hackathon where I built a Slackbot that could respond with company bookmarks.

This started by building a simple web server using Fastify.

This server is exposing an endpoint that can be used by Slack’s slash commands. When this endpoint is called we inspect the body looking to see if they added additional information after the the slash. This allows us to give different responses based on what the user requests but before that we need to load the bookmarks into memory.

This code is loading the YAML into memory, converting it into markdown then based on the slash comment coming from the webhook returning the bookmarks of the folder requested.

The final part is formatting a response for Slack.

These two simple methods are used to respond to Slack slash commands returning a stylised response. There are some slight nuances between standard markdown and Slacks version, I used slackifyMarkdown to take care of that.

Below you can see some examples that are running on our AGORA Slack channel. When a user calls /bookmarks or /bookmarks all they are returned all the different commands they can use based on the top level folders in the bookmarks YMAL .

If the user enters a folder name not recognised they get returned a helpful error:

On a successful request they will get all the bookmarks returned in the same structure as the README.md but this time only scooped to the requested folder.

The CLI is available on Github to export your existing bookmarks, generate bookmark YAMLand import them into your browser or project. If you are interested in contributing or maybe you have another idea for how you can use Bookworms, you can read more here: https://github.com/thearegee/bookworms

Thank you and happy bookmarking!

NOW WITH OVER +8500 USERS. people can Join Knowasiak for free. Sign up on Knowasiak.com
Read More

- Advertisement -

1 Comment

  1. For my 80k+ bookmarks I use buku.
    Everything goes in there. It`s just a sqlite database (and buku is also a library for python). Good resources are saved in archivebox.io and are searchable via `rga`.

    In order to access my bookmarks i either need a local copy or have access to where my stuff is stored.
    To open any bookmark i search with `fzf` outside the browser. so i can work browser independently. (Can be integrated in rofi or dmenu.)

    And in the near future I`ll upload resources in a webarchive format to ipfs node to preserve some of the current internet (and to not get involved with rate limiting when I update my buku metadata. Sorry HN, I'm not spamming, just updating meta data for my bookmark archive.)




    [edited1 for formatting]
    [edited2 forgot to relate to the linked article]

You might also likeRELATED
Recommended to you

Myocarditis linked to Covid-19 when compared to mRNA vaccines

AbstractAlthough myocarditis and pericarditis were not observed as adverse events in coronavirus disease 2019 (COVID-19) vaccine trials, there have been numerous reports of suspected cases following vaccination in the general population. We undertook a self-controlled case series study of people aged 16 or older vaccinated for COVID-19 in England between 1 December 2020 and 24…

Building Remote Teams for Startups

While there were many skeptics of remote workspaces a few years back, most of the companies in the last year had to try out remote work in one way or the other. To their surprise, the effectiveness of the people did not drop when they worked from home. Who could’ve thought? In my opinion, a…
- Advertisement -

Thich Nhat Hanh, Vietnamese Zen Master, Dies at 95

Thich Nhat Hanh at the Plum Village monastery in southern France | Courtesy Plum Village Community of Engaged Buddhism Vietnamese Zen Master Thich Nhat Hanh—a world-renowned spiritual leader, author, poet, and peace activist—died on January 22, 2022 at midnight (ICT) at his root temple, Tu Hien Temple, in Hue, Vietnam. He was 95. “Our beloved…

Before wave of train thefts, Union Pacific laid off some of its police force

News organizations both locally and nationally have been covering the rise of cargo theft in L.A.’s northeast train tracks in the past few days. Anchors on morning news have been quick to point out that there have been over 100 arrests, and even Forbes have been quick to point out the staggering $5 million worth…

Must read

The vagaries of 1990s 32-bit Dwelling windows networking

Wed, Dec. 8th, 2021, 12:16 pm The vagaries of 1990s 32-bit Windows networking I recently commented about a deeply misguided comment on HN that claimed that Windows 98 was the beginning of integrated networking in Windows. Wolfie Pauli (as I like to call him) applies: "that is not only not right, that is not even…

Show HN: Chrome extension to see if the site you’re on belongs to a YC company

Easily find out if the website you are on belongs to a company that graduated Y Combinator.Have you ever landed on a website and wondered if that company graduated Y Combinator? Well, now you don't have to go searching anywhere else. Just install YC Snooper and you'll easily see if the company graduated YC or…
- Advertisement -