2020-08-01 13:25:32 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
2020-12-07 13:57:26 -08:00
|
|
|
|
using SabreTools.Help;
|
2020-08-01 13:25:32 -07:00
|
|
|
|
using SabreTools.Library.DatFiles;
|
2020-08-01 22:10:29 -07:00
|
|
|
|
using SabreTools.Library.Reports;
|
2020-08-01 13:25:32 -07:00
|
|
|
|
|
|
|
|
|
|
namespace RombaSharp.Features
|
|
|
|
|
|
{
|
|
|
|
|
|
internal class DatStats : BaseFeature
|
|
|
|
|
|
{
|
|
|
|
|
|
public const string Value = "DatStats";
|
|
|
|
|
|
|
|
|
|
|
|
public DatStats()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = Value;
|
|
|
|
|
|
Flags = new List<string>() { "datstats" };
|
|
|
|
|
|
Description = "Prints dat stats.";
|
2020-12-07 13:57:26 -08:00
|
|
|
|
_featureType = ParameterType.Flag;
|
2020-08-01 13:25:32 -07:00
|
|
|
|
LongDescription = "Print dat stats.";
|
|
|
|
|
|
Features = new Dictionary<string, Feature>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ProcessFeatures(Dictionary<string, Feature> features)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ProcessFeatures(features);
|
|
|
|
|
|
|
|
|
|
|
|
// If we have no inputs listed, we want to use datroot
|
|
|
|
|
|
if (Inputs == null || Inputs.Count == 0)
|
|
|
|
|
|
Inputs = new List<string> { Path.GetFullPath(_dats) };
|
|
|
|
|
|
|
|
|
|
|
|
// Now output the stats for all inputs
|
|
|
|
|
|
ItemDictionary.OutputStats(Inputs, "rombasharp-datstats", null /* outDir */, true /* single */, true /* baddumpCol */, true /* nodumpCol */, StatReportFormat.Textfile);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|