About Social Code
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@gmail.com>2023-02-02 11:25:38 -0500
committerLucas Fryzek <lucas.fryzek@gmail.com>2023-02-02 11:25:38 -0500
commite6a77645890d37ef8906374a96d49914f773ead4 (patch)
tree47325fb2457000e2e48f6993fc0521dea551a87b
parentea2ee06c101e424cb6435b204f5d3097931e9b98 (diff)
Add igalia specific feed
-rw-r--r--html/feed.xml2
-rw-r--r--html/igalia_feed.xml2
-rw-r--r--makefile7
-rwxr-xr-xtools/rss_gen.py19
4 files changed, 26 insertions, 4 deletions
diff --git a/html/feed.xml b/html/feed.xml
index e1eb959..1d0f600 100644
--- a/html/feed.xml
+++ b/html/feed.xml
@@ -1,2 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
-<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Fryzek Concepts</title><atom:link href="https://fryzekconcepts.com/feed.xml" rel="self" type="application/rss+xml"/><link>https://fryzekconcepts.com</link><description>Lucas is a developer working on cool things</description><lastBuildDate>Thu, 02 Feb 2023 15:15:15 -0000</lastBuildDate><item><title>Generating Video</title><link>https://fryzekconcepts.com/notes/generating-video.html</link><description>One thing I’m very interested in is computer graphics. This could be complex 3D graphics or 2D</description><pubDate>Tue, 07 Apr 2020 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/generating-video.html</guid></item><item><title>N64Brew GameJam 2021</title><link>https://fryzekconcepts.com/notes/n64brew-gamejam-2021.html</link><description>So this year myself and two others decided to participate together in the N64Brew homebrew where</description><pubDate>Fri, 10 Dec 2021 05:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/n64brew-gamejam-2021.html</guid></item><item><title>Rasterizing Triangles</title><link>https://fryzekconcepts.com/notes/rasterizing-triangles.html</link><description>Lately I’ve been trying to implement a software renderer following the algorithm described by</description><pubDate>Sun, 03 Apr 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/rasterizing-triangles.html</guid></item><item><title>Baremetal RISC-V</title><link>https://fryzekconcepts.com/notes/baremetal-risc-v.html</link><description>After re-watching suckerpinch’s Reverse Emulation video I got inspired to try and replicate what</description><pubDate>Thu, 09 Jun 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/baremetal-risc-v.html</guid></item><item><title>Digital Garden</title><link>https://fryzekconcepts.com/notes/digital_garden.html</link><description>After reading Maggie Appleton page on digital gardens I was inspired to convert my own website into</description><pubDate>Sun, 30 Oct 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/digital_garden.html</guid></item><item><title>2022 Graphics Team Contributions at Igalia</title><link>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</link><description>This year I started a new job working with Igalia’s Graphics Team. For those of you who don’t</description><category>igalia</category><pubDate>Thu, 02 Feb 2023 05:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</guid></item></channel></rss> \ No newline at end of file
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Fryzek Concepts</title><atom:link href="https://fryzekconcepts.com/feed.xml" rel="self" type="application/rss+xml"/><link>https://fryzekconcepts.com</link><description>Lucas is a developer working on cool things</description><lastBuildDate>Thu, 02 Feb 2023 16:14:09 -0000</lastBuildDate><item><title>Generating Video</title><link>https://fryzekconcepts.com/notes/generating-video.html</link><description>One thing I’m very interested in is computer graphics. This could be complex 3D graphics or 2D</description><pubDate>Tue, 07 Apr 2020 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/generating-video.html</guid></item><item><title>N64Brew GameJam 2021</title><link>https://fryzekconcepts.com/notes/n64brew-gamejam-2021.html</link><description>So this year myself and two others decided to participate together in the N64Brew homebrew where</description><pubDate>Fri, 10 Dec 2021 05:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/n64brew-gamejam-2021.html</guid></item><item><title>Rasterizing Triangles</title><link>https://fryzekconcepts.com/notes/rasterizing-triangles.html</link><description>Lately I’ve been trying to implement a software renderer following the algorithm described by</description><pubDate>Sun, 03 Apr 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/rasterizing-triangles.html</guid></item><item><title>Baremetal RISC-V</title><link>https://fryzekconcepts.com/notes/baremetal-risc-v.html</link><description>After re-watching suckerpinch’s Reverse Emulation video I got inspired to try and replicate what</description><pubDate>Thu, 09 Jun 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/baremetal-risc-v.html</guid></item><item><title>Digital Garden</title><link>https://fryzekconcepts.com/notes/digital_garden.html</link><description>After reading Maggie Appleton page on digital gardens I was inspired to convert my own website into</description><pubDate>Sun, 30 Oct 2022 04:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/digital_garden.html</guid></item><item><title>2022 Graphics Team Contributions at Igalia</title><link>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</link><description>This year I started a new job working with Igalia’s Graphics Team. For those of you who don’t</description><category>igalia</category><pubDate>Thu, 02 Feb 2023 05:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</guid></item></channel></rss> \ No newline at end of file
diff --git a/html/igalia_feed.xml b/html/igalia_feed.xml
new file mode 100644
index 0000000..eab330d
--- /dev/null
+++ b/html/igalia_feed.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Fryzek Concepts</title><atom:link href="https://fryzekconcepts.com/feed.xml" rel="self" type="application/rss+xml"/><link>https://fryzekconcepts.com</link><description>Lucas is a developer working on cool things</description><lastBuildDate>Thu, 02 Feb 2023 16:24:10 -0000</lastBuildDate><item><title>2022 Graphics Team Contributions at Igalia</title><link>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</link><description>This year I started a new job working with Igalia’s Graphics Team. For those of you who don’t</description><category>igalia</category><pubDate>Thu, 02 Feb 2023 05:00:00 -0000</pubDate><guid>https://fryzekconcepts.com/notes/2022_igalia_graphics_team.html</guid></item></channel></rss> \ No newline at end of file
diff --git a/makefile b/makefile
index eb45742..9c9b0cc 100644
--- a/makefile
+++ b/makefile
@@ -34,9 +34,12 @@ $(HTML_DIR)/%.html: $(PAGE_DIR)/%.md
-o $@
$(HTML_DIR)/feed.xml: $(META_DOCS)
- ./tools/rss_gen.py
+ ./tools/rss_gen.py $@
-$(HTML_DIR)/index.html: $(HTML_DOCS) $(PAGE_FILES) $(HTML_DIR)/feed.xml
+$(HTML_DIR)/igalia_feed.xml: $(META_DOCS)
+ ./tools/rss_gen.py $@ igalia
+
+$(HTML_DIR)/index.html: $(HTML_DOCS) $(PAGE_FILES) $(HTML_DIR)/feed.xml $(HTML_DIR)/igalia_feed.xml
touch $(HTML_DIR)/.nojekyll
pandoc -s --lua-filter=./tools/front_page.lua --template=./templates/main.html main.md \
--metadata=note_list:"$(SOURCE_FILES)" \
diff --git a/tools/rss_gen.py b/tools/rss_gen.py
index 729cae1..630e154 100755
--- a/tools/rss_gen.py
+++ b/tools/rss_gen.py
@@ -5,6 +5,7 @@ import datetime
import time
import email.utils
import os
+import sys
today = email.utils.formatdate()
url = "https://fryzekconcepts.com"
@@ -39,7 +40,23 @@ for file in os.listdir(build_dir):
notes.sort(key=lambda note: datetime.datetime.strptime(note["date"], "%Y-%m-%d"))
+limit_cat = False
+categories = []
+if len(sys.argv) >= 3:
+ limit_cat = True
+ categories = sys.argv[2:]
+
for note in notes:
+ if limit_cat:
+ if not "categories" in note: continue
+ note_categories = note["categories"].split(",")
+ found = False
+ for cat in note_categories:
+ if cat in categories:
+ found = True
+ break
+
+ if not found: continue
post_time = datetime.datetime.strptime(note["date"], "%Y-%m-%d")
post_rfc_time = email.utils.formatdate(timeval=time.mktime(post_time.timetuple()))
post_url = "{}/notes/{}.html".format(url, note["name"])
@@ -54,4 +71,4 @@ for note in notes:
ET.SubElement(item, "guid").text = post_url
tree = ET.ElementTree(rss)
-tree.write("html/feed.xml", encoding='utf-8', xml_declaration=True)
+tree.write(sys.argv[1], encoding='utf-8', xml_declaration=True)