Cleanup, grammar fixes, and build fix

This commit is contained in:
2026-06-18 15:00:53 -04:00
parent 9ef921f772
commit 9130cdd66f
29 changed files with 115 additions and 187 deletions
+10 -4
View File
@@ -2,8 +2,10 @@
using Markdig;
using Model;
var docsDir = Path.GetFullPath(args.Length > 0 ? args[0] : Path.Combine("..", "..", "gsr.docs"));
var outputDir = Path.GetFullPath(args.Length > 1 ? args[1] : Path.Combine("..", "Model"));
var repoRoot = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", ".."));
var docsDir = Path.GetFullPath(args.Length > 0 ? args[0] : Path.Combine(repoRoot, "gsr.docs"));
var outputDir = Path.GetFullPath(args.Length > 1 ? args[1] : Path.Combine(repoRoot, "GSR", "Model"));
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
@@ -17,6 +19,7 @@ foreach (var file in Directory.EnumerateFiles(docsDir, "*.md"))
string body;
var category = string.Empty;
bool? isVisible = true;
string? link = null;
string? git = null;
@@ -42,6 +45,7 @@ foreach (var file in Directory.EnumerateFiles(docsDir, "*.md"))
{
case "category": category = val; break;
case "link": link = val; break;
case "isVisible": isVisible = bool.Parse(val); break;
case "git": git = val; break;
}
}
@@ -70,7 +74,8 @@ foreach (var file in Directory.EnumerateFiles(docsDir, "*.md"))
Category = category,
Link = link,
Git = git,
ContentHtml = html
ContentHtml = html,
IsVisible = isVisible,
});
}
}
@@ -98,7 +103,8 @@ foreach (var g in games)
sb.AppendLine($" Category = {VStr(g.Category)},");
sb.AppendLine($" Link = {VStr(g.Link)},");
sb.AppendLine($" Git = {VStr(g.Git)},");
sb.AppendLine($" ContentHtml = {VStr(g.ContentHtml)}");
sb.AppendLine($" ContentHtml = {VStr(g.ContentHtml)},");
sb.AppendLine($" IsVisible = {(g.IsVisible != null && g.IsVisible.Value ? "true" : "false")},");
sb.AppendLine(" },");
}