Skip to content

markhepburn/daily_pinboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

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:

Secret NameDescription
EMAILThe recipient for this email
PINBOARD_TOKENFind this on the settings password page.
API_ENDPOINTCould be hard-coded, but the upcoming v2 API mentions a test endpoint. https://api.pinboard.in/v1/
SMTP_USERNAMEThe gmail (hardcoded) email address; may or may not be the same as EMAIL
SMTP_PASSWORDThe gmail password associated. (May be an application password)
VENV_CACHEBUSTERSet to a new value every time the cache expires

It uses Mako Templates if you need to edit the email output. I built the mine using Maizzle, but obviously you can use whatever you feel like.

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.

Local Development

You have two options when creating the initial PinboardAPI 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.

Caveats

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!)

About

Send a daily email with a random list of bookmarks from your Pinboard.in history.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published