]> fortfriendship.online Git - gnargle.github.io.git/commitdiff
particlegen too
authorAthene Allen <atheneallen93@gmail.com>
Wed, 9 Jul 2025 09:11:59 +0000 (10:11 +0100)
committerAthene Allen <atheneallen93@gmail.com>
Wed, 9 Jul 2025 09:11:59 +0000 (10:11 +0100)
SiteTools/ParticleGen/Program.cs
feed.xml

index cca813a5b925f30d4e3112496ec65912878765d5..1005586176469af27913dc325df1d1d3cdd5dade 100644 (file)
@@ -12,7 +12,7 @@ var index = FindFile("index.html");
 fileInfos.Add(new Tuple<FileInfo, string>(new FileInfo(index), "https://athene.gay"));
 
 var folder = FindDirectory("entries");
-var filePaths = Directory.EnumerateFiles(folder);
+var filePaths = Directory.EnumerateFiles(folder, "*.html");
 if (filePaths.Any())
 {
     foreach (var path in filePaths)
@@ -24,7 +24,7 @@ if (filePaths.Any())
 }
 
 folder = FindDirectory("projects");
-filePaths = Directory.EnumerateFiles(folder);
+filePaths = Directory.EnumerateFiles(folder, "*.html");
 if (filePaths.Any())
 {
     foreach (var path in filePaths)
@@ -36,7 +36,7 @@ if (filePaths.Any())
 }
 
 folder = FindDirectory("diversions");
-filePaths = Directory.EnumerateFiles(folder);
+filePaths = Directory.EnumerateFiles(folder, "*.html");
 if (filePaths.Any())
 {
     foreach (var path in filePaths)
@@ -48,7 +48,7 @@ if (filePaths.Any())
 }
 
 folder = FindDirectory("diversions/hentaigames");
-filePaths = Directory.EnumerateFiles(folder);
+filePaths = Directory.EnumerateFiles(folder, "*.html");
 if (filePaths.Any())
 {
     foreach (var path in filePaths)
@@ -59,7 +59,7 @@ if (filePaths.Any())
     }
 }
 
-List<string> textTags = new List<string>() {"p", "h1", "h2", "h3", "h4"};
+List<string> textTags = new List<string>() { "p", "h1", "h2", "h3", "h4" };
 
 foreach (var file in fileInfos)
 {
@@ -71,7 +71,7 @@ foreach (var file in fileInfos)
         Title = doc.DocumentNode.SelectSingleNode("//title").InnerText,
         Content = new List<Content>()
     };
-    
+
     TraverseHTML(doc.DocumentNode.SelectSingleNode("//body"), particleRoot, file.Item2);
     File.WriteAllText(file.Item1.FullName.Replace(".html", ".json"), JsonSerializer.Serialize(particleRoot));
 }
@@ -107,15 +107,24 @@ void TraverseHTML(HtmlNode traversalNode, ParticleRoot particleRoot, string uriP
 
 string FindFile(string fileName)
 {
+    //this is so stupid lmao
     var file = Path.Combine(Directory.GetCurrentDirectory(), $"../{fileName}");
     if (!File.Exists(file))
     {
-        file = Path.Combine(Directory.GetCurrentDirectory(), $"../../../../../{fileName}");
+        file = Path.Combine(Directory.GetCurrentDirectory(), $"../../{fileName}");
+    }
+    if (!File.Exists(file))
+    {
+        file = Path.Combine(Directory.GetCurrentDirectory(), $"../../../{fileName}");
     }
     if (!File.Exists(file))
     {
         file = Path.Combine(Directory.GetCurrentDirectory(), $"../../../../{fileName}");
     }
+    if (!File.Exists(file))
+    {
+        file = Path.Combine(Directory.GetCurrentDirectory(), $"../../../../../{fileName}");
+    }
 
     return file;
 }
index 69b2b9cdd70812eb76cde3b5d031f6a96e5880e3..12f53d3c4c579f58859b4d15097f070a5d7db834 100644 (file)
--- a/feed.xml
+++ b/feed.xml
       <link>https://athene.gay/diversions/musicivemade.html</link>
       <guid isPermaLink="true">https://athene.gay/diversions/musicivemade.html</guid>
     </item>
-    <item>
-      <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, 12 Feb 2025 00:00:00 GMT</pubDate>
-      <link>https://athene.gay/entries/thereturnofthekfcdoubledown.html</link>
-      <guid isPermaLink="true">https://athene.gay/entries/thereturnofthekfcdoubledown.html</guid>
-    </item>
     <item>
       <title>The Life and Death(ish) of Hentai Games</title>
       <description>Once upon a time, I was a horny teenage boy. Now, I'm a horny adult woman.</description>
       <guid isPermaLink="true">https://athene.gay/entries/srb2.html</guid>
     </item>
     <item>
-      <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>Tue, 28 Jan 2025 00:00:00 GMT</pubDate>
-      <link>https://athene.gay/projects/youbeat.html</link>
-      <guid isPermaLink="true">https://athene.gay/projects/youbeat.html</guid>
+      <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, 12 Feb 2025 00:00:00 GMT</pubDate>
+      <link>https://athene.gay/entries/thereturnofthekfcdoubledown.html</link>
+      <guid isPermaLink="true">https://athene.gay/entries/thereturnofthekfcdoubledown.html</guid>
+    </item>
+    <item>
+      <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>Sat, 01 Feb 2025 00:00:00 GMT</pubDate>
+      <link>https://athene.gay/entries/danddgames.html</link>
+      <guid isPermaLink="true">https://athene.gay/entries/danddgames.html</guid>
     </item>
     <item>
       <title>Athene.Gay</title>
       <guid isPermaLink="true">https://athene.gay/projects/thiswebsite.html</guid>
     </item>
     <item>
-      <title>FFXIV Plugins</title>
-      <description>I currently maintain two silly little plugins for Final Fantasy
-                XIV.</description>
+      <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>Tue, 28 Jan 2025 00:00:00 GMT</pubDate>
-      <link>https://athene.gay/projects/dalamudplugins.html</link>
-      <guid isPermaLink="true">https://athene.gay/projects/dalamudplugins.html</guid>
+      <link>https://athene.gay/projects/youbeat.html</link>
+      <guid isPermaLink="true">https://athene.gay/projects/youbeat.html</guid>
     </item>
     <item>
       <title>Miku Expo</title>
       <guid isPermaLink="true">https://athene.gay/entries/miku.html</guid>
     </item>
     <item>
-      <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>Sat, 01 Feb 2025 00:00:00 GMT</pubDate>
-      <link>https://athene.gay/entries/danddgames.html</link>
-      <guid isPermaLink="true">https://athene.gay/entries/danddgames.html</guid>
+      <title>FFXIV Plugins</title>
+      <description>I currently maintain two silly little plugins for Final Fantasy
+                XIV.</description>
+      <pubDate>Tue, 28 Jan 2025 00:00:00 GMT</pubDate>
+      <link>https://athene.gay/projects/dalamudplugins.html</link>
+      <guid isPermaLink="true">https://athene.gay/projects/dalamudplugins.html</guid>
     </item>
     <item>
       <title>Bringing Static Websites Back</title>