mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user