full run. Ready to start creating reporters.

This commit is contained in:
Adam R Grey 2023-03-23 11:48:39 -04:00
parent 72d6e1e254
commit 56a4bcbcb5

View File

@ -113,10 +113,17 @@ namespace newsletter
static HtmlDocument AssembleHTML(IEnumerable<HtmlNode> reportSections) static HtmlDocument AssembleHTML(IEnumerable<HtmlNode> reportSections)
{ {
//TODO
Console.WriteLine($"assembling {reportSections.Count()} sections"); 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;
} }
} }
} }