a technical notebook
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.2 KiB

Monday, April 20

getting recent posts from pinboard machine-readably

I've been experimenting again with using Pinboard to track links of interest, and thought that maybe it'd be a good idea to use these to add a linkblog back to p1k3.

First I thought ok, there's probably an API, which, sure enough, is true. Here's a one-liner that will grab JSON of recent posts by a user:

curl "https://brennen:[brennen's password goes here]@api.pinboard.in/v1/posts/recent?count=25&format=json"

...but then I thought ok, this is dumb. I know there's RSS, so why not just use a standard format that could pull from other sources as well?

curl https://feeds.pinboard.in/rss/u:brennen/

Further thoughts: Instead of doing this dynamically on the server, I could just periodically pull data into the p1k3 archives and render it using some service. I'm getting ever-more leery of running any dynamic code where I don't have to, and even considering rewriting all of the p1k3 stuff to generate static files instead of building pages on the fly, so maybe this would be a good experiment.