inline readme.md into install report

This commit is contained in:
Timothy Baldridge 2019-10-01 17:06:15 -06:00
parent 4597135de5
commit 5f9c947f85
3 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* Add game registry entry for Skyrim VR
* Modlists are now .zip files.
* Modlists now end with `.modlist_v1` to enable better version control
* If `readme.md` is found in the profile directory, inline it into the install report.
#### Version 0.9.3 - 9/30/2019
* Add WABBAJACK_NOMATCH_INCLUDE works like WABBAJACK_INCLUDE but only includes files that are found to be missing at the end of compilation

View File

@ -354,7 +354,7 @@ namespace Wabbajack
fs.SetLength(0);
using (var reporter = new ReportBuilder(fs, ModListOutputFolder))
{
reporter.Build(ModList);
reporter.Build(this, ModList);
}
}

View File

@ -44,9 +44,15 @@ namespace Wabbajack
wtr.WriteLine(txt);
}
public void Build(ModList lst)
public void Build(Compiler c, ModList lst)
{
Text($"### {lst.Name} - Installation Summary");
var readme_file = Path.Combine(c.MO2ProfileDir, "readme.md");
if (File.Exists(readme_file))
File.ReadAllLines(readme_file)
.Do(NoWrapText);
Text(
$"#### Download Summary ({lst.Archives.Count} archives - {lst.Archives.Sum(a => a.Size).ToFileSizeString()})");
foreach (var archive in SortArchives(lst.Archives))