[SabreTools, Flags, DatFile, Utilities, README] Stat output

Add new input that mirrors the input for DAT formats. This also introduces the SSV statistics output format
This commit is contained in:
Matt Nadareski
2018-03-12 21:18:25 -07:00
parent 79ba3c1044
commit eb71c16454
6 changed files with 106 additions and 22 deletions

View File

@@ -558,6 +558,8 @@ namespace SabreTools.Library.Tools
return new Reports.SeparatedValue(null, filename, ',', baddumpCol, nodumpCol);
case StatReportFormat.HTML:
return new Html(null, filename, baddumpCol, nodumpCol);
case StatReportFormat.SSV:
return new Reports.SeparatedValue(null, filename, ';', baddumpCol, nodumpCol);
case StatReportFormat.TSV:
return new Reports.SeparatedValue(null, filename, '\t', baddumpCol, nodumpCol);
}
@@ -918,6 +920,32 @@ namespace SabreTools.Library.Tools
}
}
/// <summary>
/// Get StatReportFormat value from input string
/// </summary>
/// <param name="input">String to get value from</param>
/// <returns>StatReportFormat value corresponding to the string</returns>
public static StatReportFormat GetStatFormat(string input)
{
switch (input?.Trim().ToLowerInvariant())
{
case "all":
return StatReportFormat.All;
case "csv":
return StatReportFormat.CSV;
case "html":
return StatReportFormat.HTML;
case "ssv":
return StatReportFormat.SSV;
case "text":
return StatReportFormat.Textfile;
case "tsv":
return StatReportFormat.TSV;
default:
return 0x0;
}
}
/// <summary>
/// Get a sanitized size from an input string
/// </summary>