X-Git-Url: https://fortfriendship.online/gitweb/gnargle.github.io.git/blobdiff_plain/08f2a487290b78a51fd9b086fb2537a1a66fb875..644daf75452e1a5df0e365cb4a8409379fc519a2:/RSSGen/Program.cs?ds=inline 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"))