]> fortfriendship.online Git - gnargle.github.io.git/commitdiff
use opengraph for rssgen
authorAthene Allen <atheneallen93@gmail.com>
Wed, 19 Feb 2025 18:56:09 +0000 (18:56 +0000)
committerAthene Allen <atheneallen93@gmail.com>
Wed, 19 Feb 2025 18:56:09 +0000 (18:56 +0000)
RSSGen/Program.cs
RSSGen/RSSGen.csproj
feed.xml

index b6c16b016d37622515e7be67bd2e3ae0347e3e7c..a574f9a89c45e00a43bae23480ddbf81569b2984 100644 (file)
@@ -1,4 +1,5 @@
-using RssFeedGenerator;
+using OpenGraphNet;
+using RssFeedGenerator;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -76,9 +77,12 @@ myRSS.channel = new rssChannel
 
 foreach (var file in fileInfos)
 {
+    var htmlString = File.ReadAllText(file.FullName);
+    OpenGraph graph = OpenGraph.ParseHtml(htmlString);
     var item = new rssChannelItem()
     {
-        title = Path.GetFileNameWithoutExtension(file.Name),
+        title = graph.Title,
+        description = graph.Metadata["og:description"].First(),
         pubDate = file.CreationTimeUtc.ToString("r"),
     };
     if (file.FullName.Contains("entries"))
index 278f2214ab492ab3c3713bf8e9ed2472b5363066..0c8ed3521f1910143f0261962ece5c3944674c76 100644 (file)
@@ -8,6 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <PackageReference Include="OpenGraph-Net" Version="4.0.1" />
     <PackageReference Include="RssFeedGenerator" Version="1.2.1" />
   </ItemGroup>
 
index 680ccf982983dcf70336b2370a94b43ab1d681f5..23db3eb03a4e121141c547156ae4bf98fed95412 100644 (file)
--- a/feed.xml
+++ b/feed.xml
@@ -7,44 +7,55 @@
     <language>en-GB</language>
     <link href="https://athene.gay/feed.xml" rel="self" type="application/rss+xml" xmlns="http://www.w3.org/2005/Atom" />
     <item>
-      <title>thereturnofthekfcdoubledown</title>
-      <pubDate>Wed, 12 Feb 2025 13:56:58 GMT</pubDate>
+      <title>The Return of the KFC Double Down</title>
+      <description>OK this is a silly post but my friends asked me for a full
+                review of the new kfc zinger double down. So here it is.</description>
+      <pubDate>Wed, 19 Feb 2025 18:52:42 GMT</pubDate>
       <link>https://athene.gay/entries/thereturnofthekfcdoubledown.html</link>
       <guid isPermaLink="true">https://athene.gay/entries/thereturnofthekfcdoubledown.html</guid>
     </item>
     <item>
-      <title>danddgames</title>
-      <pubDate>Sun, 02 Feb 2025 13:08:49 GMT</pubDate>
+      <title>It's 2025 and I am playing a D&amp;D Game...</title>
+      <description>... and it's not Baldurs Gate 3; it is, however, equally 7/10.</description>
+      <pubDate>Thu, 06 Feb 2025 16:18:40 GMT</pubDate>
       <link>https://athene.gay/entries/danddgames.html</link>
       <guid isPermaLink="true">https://athene.gay/entries/danddgames.html</guid>
     </item>
     <item>
-      <title>miku</title>
-      <pubDate>Thu, 30 Jan 2025 12:36:47 GMT</pubDate>
-      <link>https://athene.gay/entries/miku.html</link>
-      <guid isPermaLink="true">https://athene.gay/entries/miku.html</guid>
-    </item>
-    <item>
-      <title>thiswebsite</title>
-      <pubDate>Thu, 30 Jan 2025 12:36:47 GMT</pubDate>
+      <title>Athene.Gay</title>
+      <description>It's the website you're looking at right now, baby!!</description>
+      <pubDate>Wed, 29 Jan 2025 10:02:13 GMT</pubDate>
       <link>https://athene.gay/projects/thiswebsite.html</link>
       <guid isPermaLink="true">https://athene.gay/projects/thiswebsite.html</guid>
     </item>
     <item>
-      <title>youbeat</title>
-      <pubDate>Tue, 28 Jan 2025 15:26:11 GMT</pubDate>
+      <title>Youbeat</title>
+      <description>A while ago, I wanted to adapt arcade game Jubeat for home play,
+                using a device called a launchpad.</description>
+      <pubDate>Sun, 26 Jan 2025 18:30:27 GMT</pubDate>
       <link>https://athene.gay/projects/youbeat.html</link>
       <guid isPermaLink="true">https://athene.gay/projects/youbeat.html</guid>
     </item>
     <item>
-      <title>dalamudplugins</title>
-      <pubDate>Tue, 28 Jan 2025 14:26:26 GMT</pubDate>
+      <title>Miku Expo</title>
+      <description>I've been thinking again about Miku Expo recently.</description>
+      <pubDate>Sun, 26 Jan 2025 18:30:03 GMT</pubDate>
+      <link>https://athene.gay/entries/miku.html</link>
+      <guid isPermaLink="true">https://athene.gay/entries/miku.html</guid>
+    </item>
+    <item>
+      <title>FFXIV Plugins</title>
+      <description>I currently maintain two silly little plugins for Final Fantasy
+                XIV.</description>
+      <pubDate>Sat, 25 Jan 2025 21:47:06 GMT</pubDate>
       <link>https://athene.gay/projects/dalamudplugins.html</link>
       <guid isPermaLink="true">https://athene.gay/projects/dalamudplugins.html</guid>
     </item>
     <item>
-      <title>1</title>
-      <pubDate>Tue, 28 Jan 2025 14:07:01 GMT</pubDate>
+      <title>Bringing Static Websites Back</title>
+      <description>Look I'm hardly the first to do this but I think we all know the
+                internet is shit now.</description>
+      <pubDate>Sat, 25 Jan 2025 21:47:06 GMT</pubDate>
       <link>https://athene.gay/entries/1.html</link>
       <guid isPermaLink="true">https://athene.gay/entries/1.html</guid>
     </item>