From: Athene Allen Date: Wed, 19 Feb 2025 18:56:09 +0000 (+0000) Subject: use opengraph for rssgen X-Git-Url: https://fortfriendship.online/gitweb/gnargle.github.io.git/commitdiff_plain/644daf75452e1a5df0e365cb4a8409379fc519a2?ds=inline;hp=18ed87b21ebc50a7cadbcb27714ceed972d2e3b3 use opengraph for rssgen --- diff --git a/RSSGen/Program.cs b/RSSGen/Program.cs index b6c16b0..a574f9a 100644 --- a/RSSGen/Program.cs +++ b/RSSGen/Program.cs @@ -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")) diff --git a/RSSGen/RSSGen.csproj b/RSSGen/RSSGen.csproj index 278f221..0c8ed35 100644 --- a/RSSGen/RSSGen.csproj +++ b/RSSGen/RSSGen.csproj @@ -8,6 +8,7 @@ + diff --git a/feed.xml b/feed.xml index 680ccf9..23db3eb 100644 --- a/feed.xml +++ b/feed.xml @@ -7,44 +7,55 @@ en-GB - thereturnofthekfcdoubledown - Wed, 12 Feb 2025 13:56:58 GMT + The Return of the KFC Double Down + 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. + Wed, 19 Feb 2025 18:52:42 GMT https://athene.gay/entries/thereturnofthekfcdoubledown.html https://athene.gay/entries/thereturnofthekfcdoubledown.html - danddgames - Sun, 02 Feb 2025 13:08:49 GMT + It's 2025 and I am playing a D&D Game... + ... and it's not Baldurs Gate 3; it is, however, equally 7/10. + Thu, 06 Feb 2025 16:18:40 GMT https://athene.gay/entries/danddgames.html https://athene.gay/entries/danddgames.html - miku - Thu, 30 Jan 2025 12:36:47 GMT - https://athene.gay/entries/miku.html - https://athene.gay/entries/miku.html - - - thiswebsite - Thu, 30 Jan 2025 12:36:47 GMT + Athene.Gay + It's the website you're looking at right now, baby!! + Wed, 29 Jan 2025 10:02:13 GMT https://athene.gay/projects/thiswebsite.html https://athene.gay/projects/thiswebsite.html - youbeat - Tue, 28 Jan 2025 15:26:11 GMT + Youbeat + A while ago, I wanted to adapt arcade game Jubeat for home play, + using a device called a launchpad. + Sun, 26 Jan 2025 18:30:27 GMT https://athene.gay/projects/youbeat.html https://athene.gay/projects/youbeat.html - dalamudplugins - Tue, 28 Jan 2025 14:26:26 GMT + Miku Expo + I've been thinking again about Miku Expo recently. + Sun, 26 Jan 2025 18:30:03 GMT + https://athene.gay/entries/miku.html + https://athene.gay/entries/miku.html + + + FFXIV Plugins + I currently maintain two silly little plugins for Final Fantasy + XIV. + Sat, 25 Jan 2025 21:47:06 GMT https://athene.gay/projects/dalamudplugins.html https://athene.gay/projects/dalamudplugins.html - 1 - Tue, 28 Jan 2025 14:07:01 GMT + Bringing Static Websites Back + Look I'm hardly the first to do this but I think we all know the + internet is shit now. + Sat, 25 Jan 2025 21:47:06 GMT https://athene.gay/entries/1.html https://athene.gay/entries/1.html