From 56a4bcbcb577777de38ab87dac50074c52af6e10 Mon Sep 17 00:00:00 2001 From: Adam R Grey Date: Thu, 23 Mar 2023 11:48:39 -0400 Subject: [PATCH] full run. Ready to start creating reporters. --- Program.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index a02ab13..7259aa3 100644 --- a/Program.cs +++ b/Program.cs @@ -113,10 +113,17 @@ namespace newsletter static HtmlDocument AssembleHTML(IEnumerable reportSections) { - //TODO Console.WriteLine($"assembling {reportSections.Count()} sections"); - throw new NotImplementedException(); + var doc = new HtmlDocument(); + doc.LoadHtml(File.ReadAllText("template.html")); + var htmlBody = doc.DocumentNode.SelectSingleNode("//body"); + htmlBody.RemoveAll(); + foreach(var section in reportSections) + { + section.AddClass("report-content"); + htmlBody.AppendChild(section); + } + return doc; } - } }