aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blog/articles/test.xml8
-rw-r--r--blog/feed.xml31
-rwxr-xr-xblog/generate.py30
-rw-r--r--blog/template.html46
-rw-r--r--images/crush_capitalism.pngbin0 -> 433 bytes
-rw-r--r--images/icon.pngbin0 -> 5546 bytes
-rw-r--r--images/linux_powered.gifbin0 -> 14619 bytes
-rw-r--r--images/ublock_now.pngbin0 -> 5152 bytes
-rw-r--r--index.html6
9 files changed, 121 insertions, 0 deletions
diff --git a/blog/articles/test.xml b/blog/articles/test.xml
new file mode 100644
index 0000000..51d440b
--- /dev/null
+++ b/blog/articles/test.xml
@@ -0,0 +1,8 @@
+<article>
+ <header>
+ <h1>Over thinking</h1>
+ <p>
+ I over think a lot tbh.
+ </p>
+ </header>
+</article>
diff --git a/blog/feed.xml b/blog/feed.xml
new file mode 100644
index 0000000..a504f41
--- /dev/null
+++ b/blog/feed.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0">
+ <channel>
+ <title>Nathan's shitty blog</title>
+ <description>The coffee powered blog of chaos</description>
+ <link>http://nathansmith117.beevomit.org/blog</link>
+ <image>
+ <url>http://nathansmith117.bevomit.org/images/icon.png</url>
+ <title>Nathan's shitty blog</title>
+ <link>http://nathansmith117.beevomit.org</link>
+ </image>
+
+ <item>
+ <title>test post</title>
+ <link>http://nathansmith117.bevomit.or/blog</link>
+ <pubDate>Sat, 29 Mar 2025 00:00:00 GMT</pubDate>
+ <description>
+ <![CDATA[
+<article>
+ <header>
+ <h1>Over thinking</h1>
+ <p>
+ I over think a lot tbh.
+ </p>
+ </header>
+</article>
+ ]]>
+ </description>
+ </item>
+ </channel>
+</rss>
diff --git a/blog/generate.py b/blog/generate.py
new file mode 100755
index 0000000..3471ef9
--- /dev/null
+++ b/blog/generate.py
@@ -0,0 +1,30 @@
+#! /usr/bin/python3
+
+"""
+A script to generate html from the rss feed
+"""
+
+import xml.etree.ElementTree as et
+
+def main():
+ tree = et.parse("feed.xml")
+ root = tree.getroot()
+ channel = root[0]
+
+ template = ""
+
+ # Open html template
+ with open("template.html", "r") as fp:
+ template = fp.read()
+
+ # Get articles from rss
+ for item in channel.findall("item"):
+ article = item.find("description").text
+
+ # Remove article tags.
+ article = article[article.find("<article>")+9::]
+ article = article[:article.find("</article>"):]
+ print(article)
+
+if __name__ == "__main__":
+ main()
diff --git a/blog/template.html b/blog/template.html
new file mode 100644
index 0000000..719d3f3
--- /dev/null
+++ b/blog/template.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>Nathan's shitty blog</title>
+ <link rel="alternate" type="application/rss+xml" title="Nathan's shitty blog" href="feed.xml">
+
+<style>
+
+body {
+ color: black;
+ background-image: url('');
+}
+
+table {
+ color: black;
+ background-color: #bebebe;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+</style>
+
+</head>
+
+<body>
+ <a href="index.html"><img src="../images/back_home.png" alt="Back to home page"/></a>
+
+ <center>
+ <table border="1" width="60%">
+ <tr>
+ <td>
+ <h1>Nathan's shitty blog</h1>
+ <p>
+ </p>
+ </td>
+ </tr>
+ </table>
+
+ <!-- Python will insert the articles from rss here -->
+ {articles}
+ </center>
+</body>
+</html>
diff --git a/images/crush_capitalism.png b/images/crush_capitalism.png
new file mode 100644
index 0000000..df2add2
--- /dev/null
+++ b/images/crush_capitalism.png
Binary files differ
diff --git a/images/icon.png b/images/icon.png
new file mode 100644
index 0000000..b531864
--- /dev/null
+++ b/images/icon.png
Binary files differ
diff --git a/images/linux_powered.gif b/images/linux_powered.gif
new file mode 100644
index 0000000..2dbe456
--- /dev/null
+++ b/images/linux_powered.gif
Binary files differ
diff --git a/images/ublock_now.png b/images/ublock_now.png
new file mode 100644
index 0000000..c82555b
--- /dev/null
+++ b/images/ublock_now.png
Binary files differ
diff --git a/index.html b/index.html
index dd28d1c..16d80fe 100644
--- a/index.html
+++ b/index.html
@@ -3,6 +3,7 @@
<head>
<title>Nathan's Shitty Web</title>
+ <link rel="icon" type="image/x-icon" href="images/icon.png">
<style>
@@ -195,7 +196,12 @@ table {
<a href="https://cloud13.neocities.org" target="_blank">
<img src="https://cloud13.neocities.org/powered%20by%20BLAHAJ.png" alt="Powered by BLAHAJ"/>
</a>
+
+ <br/>
+ <img src="images/ublock_now.png" alt="ublock now"/>
+ <img src="images/crush_capitalism.png" alt="crush capitalism!"/>
<img src="images/antinft.gif" alt="This is an Anti-NFT Site"/>
+ <img src="images/linux_powered.gif" alt="Linux powered"/>
<br/>
<img src="images/bi.gif" alt="bi pride"/>