From 1cb2b2d6241b6dc88d1f5e5dcc128841e154a1d7 Mon Sep 17 00:00:00 2001 From: nathansmith Date: Wed, 7 May 2025 09:44:57 -0600 Subject: Changed the blog html generater to scheme as well --- blog/generate_html.py | 68 --------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100755 blog/generate_html.py (limited to 'blog/generate_html.py') diff --git a/blog/generate_html.py b/blog/generate_html.py deleted file mode 100755 index ce50032..0000000 --- a/blog/generate_html.py +++ /dev/null @@ -1,68 +0,0 @@ -#! /usr/bin/python3 - -""" -A script to generate html from the rss feed -""" - -import xml.etree.ElementTree as et - -# Generates a html table for the article -# I use table layout because fuck you -def make_article_table(article_info, article): - return """ - - - -

{title}

--- {date}
{article}
- """.format( - name=article_info["name"], - title=article_info["title"], - date=article_info["pubDate"], - article=article - ) - -def main(): - tree = et.parse("articles.xml") - root = tree.getroot() - - template = "" - - # Open html template - with open("template.html", "r") as fp: - template = fp.read() - - article_list = "" - - # Format the articles into the html - template = template.format(article_list=article_list, articles=article_html) - print(template) - -if __name__ == "__main__": - main() -- cgit v1.2.3