Integrating Openring into this Blog

| programming | python | blogging |

I just did the jenkiest thing ever.

Openring is a cool little library written by Drew DeVault which allows you to add articles from feeds that you follow to your own blog. It’s kind of like a dynamic blog roll.

It was designed for static site generators, but since (for some reason) this blog is not statically generated, I was thinking of the best way to include it and came up with something that is either a horrible RCE waiting to happen, or a clever hack.

I set up a cron job to run openring every eight hours and pop the output to a file. Then in flask, I made a simple utility function to go find and read this file and insert it into a Jinja variable which is then rendered on every post page (look down at the bottom).

This allows readers to check out other interesting content and also has the added benefit of being fresh several times per day.

Thank you for reading! Share your thoughts with me on mastodon or via email.

Check out some more stuff to read down below.

Most popular posts this month

Recent Favorite Blog Posts

This is a collection of the last 8 posts that I bookmarked.

Articles from blogs I follow around the net

in which social media can be put in your own hands

I've been on Mastodon since early 2017 and have really enjoyed it. It's been great to see the Fediverse grow as a user-owned network that can function without a corporate overlord calling the shots, exploiting the user base, and ultimately sq…

via Technomancy September 13, 2024

Notes on OpenAI's new o1 chain-of-thought models

OpenAI released two major new preview models today: o1-preview and o1-mini (that mini one is also a preview, despite the name) - previously rumored as having the codename "strawberry". There's a lot to understand about these models - they'…

via Simon Willison's Weblog: Entries September 12, 2024

Questions and Answers vs. Features and Benefits

When making products, you can think of them as a collection of features or answers.Some people may say "you mean features or benefits?" No, I mean answers. Answers are counterpoints to questions people have in their heads. Answers fill holes, an…

via Jason Fried September 12, 2024

Generated by openring