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.
Ben Nadel demonstrates that environment (ENV) variables can be read directly out of the SERVER scope in Lucee CFML 126.96.36.199 - shout-out to Julian Halliwell for the pro-top!...via Ben Nadel's Web Development and User Experience Feed @ BenNadel.com October 26, 2021
Disclaimer: I work for a GitHub competitor. One of GitHub’s “recommended” marketplace features is the “stale” bot. The purpose of this bot is to automatically close GitHub issues after a period of inactivity, 60 days by default. You have probably encountered…via Drew DeVault's blog October 26, 2021
Generated by openring