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.

28 lines
1.2 KiB

  1. <h1>Monday, April 20</h1>
  2. getting recent posts from pinboard machine-readably
  3. ---------------------------------------------------
  4. I've been experimenting again with using Pinboard to track links of interest,
  5. and thought that maybe it'd be a good idea to use these to add a linkblog back
  6. to p1k3.
  7. First I thought ok, there's probably an API, which, sure enough, [is
  8. true][api]. Here's a one-liner that will grab JSON of recent posts by
  9. a user:
  10. curl "https://brennen:[brennen's password goes here]@api.pinboard.in/v1/posts/recent?count=25&format=json"
  11. ...but then I thought ok, this is dumb. I know there's RSS, so why not just use
  12. a standard format that could pull from other sources as well?
  13. curl https://feeds.pinboard.in/rss/u:brennen/
  14. Further thoughts: Instead of doing this dynamically on the server, I could
  15. just periodically pull data into the p1k3 archives and render it using some
  16. service. I'm getting ever-more leery of running any dynamic code where I don't
  17. have to, and even considering rewriting all of the p1k3 stuff to generate
  18. static files instead of building pages on the fly, so maybe this would be a
  19. good experiment.
  20. [api]: https://pinboard.in/api