Believe it or not, I have been writing every day since my last post. Invisibly writing Python to publish an RSS feed. So it hasn’t shown up here, but I feel it was in the spirit of the month, as it was in service of this blog.

The RSS feed stuff was incredibly simple. I had the mechanism for writing the file very quickly, once I understood fstrings weren’t going to work for me in this case. (This is because they have to be evaluated before they are imported, and I wanted to store them in a separate file because I hadn’t completely given up on having a clean code base yet). 2 for loops and 2 strings.format() and we were away to the races. If you haven’t read my last blog it details where to find info on the RSS standard that I used.

It was getting the information from my files and filesystem that was the hardest thing. And it wasn’t hard, it was just tedious. There’s good reason interviews and beginner python courses focus so heavily on string manipulation, because it’s really fucking useful. I like to practice it every now and then to remind myself of my humanity.

The original idea was to keep it as generic as possible. I suppose it still is, as long as not many of blog lines start with “description:” but I ended up making it to suit the hexo blog format, since that’s what I’m using. I already know of at least one edge case it won’t handle well, but I’ll cross those bridges as they come, because I need to go make myself a rain jacket.

Once the script was written, all I had to do was get it onto my server (I chose git clone), and to create a cron to run it with. I accomplished this with crontab -e and my favourite website for writing crons, crontab guru. So now, this post should be available on the rss feed, available at test.mhalton.com/feed at a maximum of 15 minutes after I created it.

Now that we have almost a real blog, I think I’ll write my next post about choosing a name for it, and perhaps writing a proper description. If you subscribe to the rss right now, expect that name to change, but please do subscribe.

Talk soon,
Meghan