Pinboard is a great bookmarking service. I was grandfathered in on the original one-time payment plan, and recently switched to a regular subscription when he politely requested I consider it.
The thing is… I hardly ever use pinboard! Bookmarking just isn’t on my radar these days; that’s what search-engines are for.
What I’ve long wanted though is some sort of serendipity in the service. I don’t often have a problem locating something again if I remember what it was, but I have no idea what I’ve since forgotten about. When I recently realised that it was pretty easy to implement and host, I knew this little project wasn’t far away. In readiness, I’ve tried to be a lot more cavailier about bookmarking anything that seems randomly interesting.
This repository (clone away!) will send you a daily email of 5 random links from your pinboard account.
Want to run your own?
Fork this repository! It should run as-is, after configuration.
You will need to create the following secrets for the action:
|The recipient for this email
|Find this on the settings password page.
|Could be hard-coded, but the upcoming v2 API mentions a test endpoint. https://api.pinboard.in/v1/
|The gmail (hardcoded) email address; may or may not be the same as EMAIL
|The gmail password associated. (May be an application password)
|Set to a new value every time the cache expires
It uses the ”all bookmarks” API; note that this is rate-limited so if you are testing you probably want to temporarily change it to ~posts/recent~. There is no pagination for now, because I don’t have that many bookmarks yet.
You have two options when creating the initial
object; pass it a dictionary with your configuration variables
above (it only needs the first three), or by default it will load
from the environment. I prefer the latter, using direnv (the
.envrc file is in
.gitignore). It also has Emacs support.
The scheduled action will not run forever without maintenance. The virtualenv will eventually expire from the cache (see the VENV_CACHEBUSTER secret, and also the setting it passes through to). The action itself will be disabled after 60 days of repository inactivity. (There may be other limits I haven’t hit yet!)