RSSGen/.vs/ProjectEvaluation/rssgen.metadata.v9.bin
RSSGen/.vs/ProjectEvaluation/rssgen.projects.v9.bin
RSSGen/.vs/ProjectEvaluation/rssgen.strings.v9.bin
-RSSGen/bin/Debug/net8.0/RSSGen.dll
-RSSGen/bin/Debug/net8.0/RSSGen.exe
-RSSGen/bin/Debug/net8.0/RSSGen.pdb
-RSSGen/obj/project.nuget.cache
-RSSGen/obj/RSSGen.csproj.nuget.dgspec.json
-RSSGen/obj/RSSGen.csproj.nuget.g.props
-RSSGen/obj/Debug/net8.0/apphost.exe
-RSSGen/obj/Debug/net8.0/RSSGen.AssemblyInfo.cs
-RSSGen/obj/Debug/net8.0/RSSGen.AssemblyInfoInputs.cache
-RSSGen/obj/Debug/net8.0/RSSGen.assets.cache
-RSSGen/obj/Debug/net8.0/RSSGen.dll
-RSSGen/obj/Debug/net8.0/RSSGen.GeneratedMSBuildEditorConfig.editorconfig
-RSSGen/obj/Debug/net8.0/RSSGen.genruntimeconfig.cache
-RSSGen/obj/Debug/net8.0/RSSGen.pdb
-RSSGen/obj/Debug/net8.0/RSSGen.sourcelink.json
-RSSGen/obj/Debug/net8.0/ref/RSSGen.dll
-RSSGen/obj/Debug/net8.0/refint/RSSGen.dll
+RSSGen/bin/
+RSSGen/obj/
--- /dev/null
+using RssFeedGenerator;
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+// See https://aka.ms/new-console-template for more information
+Console.WriteLine("Scanning entries folder for latest files");
+
+var filePaths = Directory.EnumerateFiles(Path.Combine(Directory.GetCurrentDirectory(), "../../../../entries"));
+var fileInfos = new List<FileInfo>();
+
+if (filePaths.Any())
+{
+ foreach (var path in filePaths)
+ {
+ if (Path.GetFileNameWithoutExtension(path).Equals("template", StringComparison.InvariantCultureIgnoreCase))
+ continue;
+ var fInfo = new FileInfo(path);
+ fileInfos.Add(fInfo);
+ }
+}
+
+Console.WriteLine("Scanning projects folder for latest files");
+
+filePaths = Directory.EnumerateFiles(Path.Combine(Directory.GetCurrentDirectory(), "../../../../projects"));
+
+if (filePaths.Any())
+{
+ foreach (var path in filePaths)
+ {
+ var fInfo = new FileInfo(path);
+ fileInfos.Add(fInfo);
+ }
+}
+
+fileInfos = fileInfos.OrderByDescending(f => f.CreationTimeUtc).Take(10).ToList();
+
+var myRSS = new rss();
+
+myRSS.version = 2.0m;
+
+myRSS.channel = new rssChannel
+{
+ title = "athene.gay entries",
+ description = "blog entries for athene.gay",
+ language = "en-GB",
+ link = "https://athene.gay",
+ item = new List<rssChannelItem>()
+};
+
+foreach (var file in fileInfos)
+{
+ var item = new rssChannelItem()
+ {
+ title = Path.GetFileNameWithoutExtension(file.Name),
+ pubDate = file.CreationTimeUtc.ToString(),
+ };
+ if (file.FullName.Contains("entries"))
+ {
+ item.link = "https://athene.gay/entries/" + Path.GetFileName(file.Name);
+ } else if (file.FullName.Contains("projects"))
+ {
+ item.link = "https://athene.gay/projects/" + Path.GetFileName(file.Name);
+ }
+ myRSS.channel.item.Add(item);
+}
+
+var output = Generator.SerializeRSS(myRSS);
+
+var rssPath = Path.Combine(Directory.GetCurrentDirectory(), "../../../../feed.rss");
+
+if (File.Exists(rssPath)) {
+ File.Delete(rssPath);
+}
+
+File.WriteAllText(rssPath, output);
\ No newline at end of file
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net8.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="RssFeedGenerator" Version="1.2.1" />
+ </ItemGroup>
+
+</Project>
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35707.178 d17.12
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RSSGen", "RSSGen.csproj", "{5B1B1ED0-6FEF-45A8-A5F1-60EB2EFE5B8A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5B1B1ED0-6FEF-45A8-A5F1-60EB2EFE5B8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5B1B1ED0-6FEF-45A8-A5F1-60EB2EFE5B8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5B1B1ED0-6FEF-45A8-A5F1-60EB2EFE5B8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5B1B1ED0-6FEF-45A8-A5F1-60EB2EFE5B8A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal