Lev's Hacking Notes

Integrating Openring into This Blog

2021-03-25 Tags: 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.

Articles from blogs I follow around the net

Working Code Podcast - Episode 033: Software Patents

Ben Nadel and the crew talk about software patents, patent trolls, and writing useful code that has a non-obvious function....

via Ben Nadel's Web Development and User Experience Feed @ BenNadel.com July 28, 2021

My wish-list for the next YAML

YAML is both universally used, and universally reviled. It has a lot of problems, but it also is so useful in solving specific tasks that it’s hard to replace. Some new kids on the block (such as TOML) have successfully taken over a portion of its market sha…

via Drew DeVault's blog July 28, 2021

Changes from the Dark rewrite

IF YOU USE DARK IN PRODUCTION, PLEASE READ THIS POST! We are approaching the end of the Dark backend rewrite (see previous updates: 1, 2, 3), which we are now tracking on GitHub. While there are still many tasks to be done, we're making progress and th…

via Darklang July 22, 2021

Generated by openring