mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SabreTools, DatFile, Filter] Move filtering to Filter
This commit is contained in:
@@ -1572,11 +1572,8 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <param name="descAsName">True to allow SL DATs to have game names used instead of descriptions, false otherwise (default)</param>
|
/// <param name="descAsName">True to allow SL DATs to have game names used instead of descriptions, false otherwise (default)</param>
|
||||||
/// <param name="filter">Filter object to be passed to the DatItem level</param>
|
/// <param name="filter">Filter object to be passed to the DatItem level</param>
|
||||||
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
||||||
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
|
|
||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
|
||||||
public void DetermineUpdateType(List<string> inputPaths, List<string> basePaths, string outDir, UpdateMode updateMode, bool inplace, bool skip,
|
public void DetermineUpdateType(List<string> inputPaths, List<string> basePaths, string outDir, UpdateMode updateMode, bool inplace, bool skip,
|
||||||
bool bare, bool clean, bool remUnicode, bool descAsName, Filter filter, SplitType splitType, bool trim, bool single, string root)
|
bool bare, bool clean, bool remUnicode, bool descAsName, Filter filter, SplitType splitType)
|
||||||
{
|
{
|
||||||
// Ensure we only have files in the inputs
|
// Ensure we only have files in the inputs
|
||||||
List<string> inputFileNames = Utilities.GetOnlyFilesFromInputs(inputPaths, appendparent: true);
|
List<string> inputFileNames = Utilities.GetOnlyFilesFromInputs(inputPaths, appendparent: true);
|
||||||
@@ -1585,7 +1582,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If we're in standard update mode, run through all of the inputs
|
// If we're in standard update mode, run through all of the inputs
|
||||||
if (updateMode == UpdateMode.None)
|
if (updateMode == UpdateMode.None)
|
||||||
{
|
{
|
||||||
Update(inputFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType, trim, single, root);
|
Update(inputFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1601,7 +1598,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
|
|
||||||
// Populate the combined data and get the headers
|
// Populate the combined data and get the headers
|
||||||
List<DatFile> datHeaders = PopulateUserData(inputFileNames, inplace, clean,
|
List<DatFile> datHeaders = PopulateUserData(inputFileNames, inplace, clean,
|
||||||
remUnicode, descAsName, outDir, filter, splitType, trim, single, root);
|
remUnicode, descAsName, outDir, filter, splitType);
|
||||||
|
|
||||||
// If we're in merging mode
|
// If we're in merging mode
|
||||||
if ((updateMode & UpdateMode.Merge) != 0)
|
if ((updateMode & UpdateMode.Merge) != 0)
|
||||||
@@ -1624,13 +1621,13 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If we have diff against mode
|
// If we have diff against mode
|
||||||
else if ((updateMode & UpdateMode.DiffAgainst) != 0)
|
else if ((updateMode & UpdateMode.DiffAgainst) != 0)
|
||||||
{
|
{
|
||||||
DiffAgainst(inputFileNames, baseFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType, trim, single, root);
|
DiffAgainst(inputFileNames, baseFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType);
|
||||||
}
|
}
|
||||||
// If we have one of the base replacement modes
|
// If we have one of the base replacement modes
|
||||||
else if ((updateMode & UpdateMode.BaseReplace) != 0
|
else if ((updateMode & UpdateMode.BaseReplace) != 0
|
||||||
|| (updateMode & UpdateMode.ReverseBaseReplace) != 0)
|
|| (updateMode & UpdateMode.ReverseBaseReplace) != 0)
|
||||||
{
|
{
|
||||||
BaseReplace(inputFileNames, baseFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType, trim, single, root);
|
BaseReplace(inputFileNames, baseFileNames, outDir, inplace, clean, remUnicode, descAsName, filter, splitType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1648,12 +1645,9 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <param name="outDir">Optional param for output directory</param>
|
/// <param name="outDir">Optional param for output directory</param>
|
||||||
/// <param name="filter">Filter object to be passed to the DatItem level</param>
|
/// <param name="filter">Filter object to be passed to the DatItem level</param>
|
||||||
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
||||||
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
|
|
||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
|
||||||
/// <returns>List of DatData objects representing headers</returns>
|
/// <returns>List of DatData objects representing headers</returns>
|
||||||
private List<DatFile> PopulateUserData(List<string> inputs, bool inplace, bool clean, bool remUnicode, bool descAsName,
|
private List<DatFile> PopulateUserData(List<string> inputs, bool inplace, bool clean, bool remUnicode, bool descAsName,
|
||||||
string outDir, Filter filter, SplitType splitType, bool trim, bool single, string root)
|
string outDir, Filter filter, SplitType splitType)
|
||||||
{
|
{
|
||||||
DatFile[] datHeaders = new DatFile[inputs.Count];
|
DatFile[] datHeaders = new DatFile[inputs.Count];
|
||||||
InternalStopwatch watch = new InternalStopwatch("Processing individual DATs");
|
InternalStopwatch watch = new InternalStopwatch("Processing individual DATs");
|
||||||
@@ -1693,7 +1687,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Now that we have a merged DAT, filter it
|
// Now that we have a merged DAT, filter it
|
||||||
Filter(filter, single, trim, root);
|
filter.FilterDatFile(this);
|
||||||
|
|
||||||
watch.Stop();
|
watch.Stop();
|
||||||
|
|
||||||
@@ -1716,7 +1710,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
||||||
public void BaseReplace(List<string> inputFileNames, List<string> baseFileNames, string outDir, bool inplace, bool clean, bool remUnicode,
|
public void BaseReplace(List<string> inputFileNames, List<string> baseFileNames, string outDir, bool inplace, bool clean, bool remUnicode,
|
||||||
bool descAsName, Filter filter, SplitType splitType, bool trim, bool single, string root)
|
bool descAsName, Filter filter, SplitType splitType)
|
||||||
{
|
{
|
||||||
// First we want to parse all of the base DATs into the input
|
// First we want to parse all of the base DATs into the input
|
||||||
InternalStopwatch watch = new InternalStopwatch("Populating base DAT for replacement...");
|
InternalStopwatch watch = new InternalStopwatch("Populating base DAT for replacement...");
|
||||||
@@ -1803,7 +1797,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
||||||
public void DiffAgainst(List<string> inputFileNames, List<string> baseFileNames, string outDir, bool inplace, bool clean, bool remUnicode,
|
public void DiffAgainst(List<string> inputFileNames, List<string> baseFileNames, string outDir, bool inplace, bool clean, bool remUnicode,
|
||||||
bool descAsName, Filter filter, SplitType splitType, bool trim, bool single, string root)
|
bool descAsName, Filter filter, SplitType splitType)
|
||||||
{
|
{
|
||||||
// First we want to parse all of the base DATs into the input
|
// First we want to parse all of the base DATs into the input
|
||||||
InternalStopwatch watch = new InternalStopwatch("Populating base DAT for comparison...");
|
InternalStopwatch watch = new InternalStopwatch("Populating base DAT for comparison...");
|
||||||
@@ -2167,7 +2161,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
||||||
public void Update(List<string> inputFileNames, string outDir, bool inplace, bool clean, bool remUnicode, bool descAsName,
|
public void Update(List<string> inputFileNames, string outDir, bool inplace, bool clean, bool remUnicode, bool descAsName,
|
||||||
Filter filter, SplitType splitType, bool trim, bool single, string root)
|
Filter filter, SplitType splitType)
|
||||||
{
|
{
|
||||||
// Iterate over the files
|
// Iterate over the files
|
||||||
foreach (string file in inputFileNames)
|
foreach (string file in inputFileNames)
|
||||||
@@ -2176,7 +2170,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
Globals.Logger.User("Processing '{0}'", Path.GetFileName(file.Split('¬')[0]));
|
Globals.Logger.User("Processing '{0}'", Path.GetFileName(file.Split('¬')[0]));
|
||||||
innerDatdata.Parse(file, 0, 0, splitType, keep: true, clean: clean, remUnicode: remUnicode, descAsName: descAsName,
|
innerDatdata.Parse(file, 0, 0, splitType, keep: true, clean: clean, remUnicode: remUnicode, descAsName: descAsName,
|
||||||
keepext: ((innerDatdata.DatFormat & DatFormat.TSV) != 0 || (innerDatdata.DatFormat & DatFormat.CSV) != 0));
|
keepext: ((innerDatdata.DatFormat & DatFormat.TSV) != 0 || (innerDatdata.DatFormat & DatFormat.CSV) != 0));
|
||||||
innerDatdata.Filter(filter, trim, single, root);
|
filter.FilterDatFile(innerDatdata);
|
||||||
|
|
||||||
// Get the correct output path
|
// Get the correct output path
|
||||||
string realOutDir = Utilities.GetOutputPath(outDir, file, inplace);
|
string realOutDir = Utilities.GetOutputPath(outDir, file, inplace);
|
||||||
@@ -2251,66 +2245,6 @@ namespace SabreTools.Library.DatFiles
|
|||||||
|
|
||||||
#region Filtering
|
#region Filtering
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Filter a DAT based on input parameters and modify the items
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="filter">Filter object for passing to the DatItem level</param>
|
|
||||||
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
|
|
||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
|
||||||
public void Filter(Filter filter, bool single, bool trim, string root)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Loop over every key in the dictionary
|
|
||||||
List<string> keys = Keys;
|
|
||||||
foreach (string key in keys)
|
|
||||||
{
|
|
||||||
// For every item in the current key
|
|
||||||
List<DatItem> items = this[key];
|
|
||||||
List<DatItem> newitems = new List<DatItem>();
|
|
||||||
foreach (DatItem item in items)
|
|
||||||
{
|
|
||||||
// If the rom passes the filter, include it
|
|
||||||
if (filter.ItemPasses(item))
|
|
||||||
{
|
|
||||||
// If we are in single game mode, rename all games
|
|
||||||
if (single)
|
|
||||||
{
|
|
||||||
item.MachineName = "!";
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we are in NTFS trim mode, trim the game name
|
|
||||||
if (trim)
|
|
||||||
{
|
|
||||||
// Windows max name length is 260
|
|
||||||
int usableLength = 260 - item.MachineName.Length - root.Length;
|
|
||||||
if (item.Name.Length > usableLength)
|
|
||||||
{
|
|
||||||
string ext = Path.GetExtension(item.Name);
|
|
||||||
item.Name = item.Name.Substring(0, usableLength - ext.Length);
|
|
||||||
item.Name += ext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lock the list and add the item back
|
|
||||||
lock (newitems)
|
|
||||||
{
|
|
||||||
newitems.Add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Remove(key);
|
|
||||||
AddRange(key, newitems);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Globals.Logger.Error(ex.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use game descriptions as names in the DAT, updating cloneof/romof/sampleof
|
/// Use game descriptions as names in the DAT, updating cloneof/romof/sampleof
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
#if MONO
|
||||||
|
using System.IO;
|
||||||
|
#else
|
||||||
|
using Alphaleonis.Win32.Filesystem;
|
||||||
|
#endif
|
||||||
|
|
||||||
using SabreTools.Library.Data;
|
using SabreTools.Library.Data;
|
||||||
using SabreTools.Library.DatItems;
|
using SabreTools.Library.DatItems;
|
||||||
|
|
||||||
@@ -53,6 +59,9 @@ namespace SabreTools.Library.DatFiles
|
|||||||
private long _sizeEqualTo;
|
private long _sizeEqualTo;
|
||||||
private bool _includeOfInGame;
|
private bool _includeOfInGame;
|
||||||
private bool? _runnable;
|
private bool? _runnable;
|
||||||
|
private bool _single;
|
||||||
|
private bool _trim;
|
||||||
|
private string _root;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -207,6 +216,21 @@ namespace SabreTools.Library.DatFiles
|
|||||||
get { return _runnable; }
|
get { return _runnable; }
|
||||||
set { _runnable = value; }
|
set { _runnable = value; }
|
||||||
}
|
}
|
||||||
|
public bool Single
|
||||||
|
{
|
||||||
|
get { return _single; }
|
||||||
|
set { _single = value; }
|
||||||
|
}
|
||||||
|
public bool Trim
|
||||||
|
{
|
||||||
|
get { return _trim; }
|
||||||
|
set { _trim = value; }
|
||||||
|
}
|
||||||
|
public string Root
|
||||||
|
{
|
||||||
|
get { return _root; }
|
||||||
|
set { _root = value; }
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -251,12 +275,76 @@ namespace SabreTools.Library.DatFiles
|
|||||||
_sizeEqualTo = -1;
|
_sizeEqualTo = -1;
|
||||||
_includeOfInGame = false;
|
_includeOfInGame = false;
|
||||||
_runnable = null;
|
_runnable = null;
|
||||||
|
_single = false;
|
||||||
|
_trim = false;
|
||||||
|
_root = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Instance methods
|
#region Instance methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filter a DatFile using the inputs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="datFile"></param>
|
||||||
|
/// <returns>True if the DatFile was filtered, false on error</returns>
|
||||||
|
public bool FilterDatFile(DatFile datFile)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Loop over every key in the dictionary
|
||||||
|
List<string> keys = datFile.Keys;
|
||||||
|
foreach (string key in keys)
|
||||||
|
{
|
||||||
|
// For every item in the current key
|
||||||
|
List<DatItem> items = datFile[key];
|
||||||
|
List<DatItem> newitems = new List<DatItem>();
|
||||||
|
foreach (DatItem item in items)
|
||||||
|
{
|
||||||
|
// If the rom passes the filter, include it
|
||||||
|
if (ItemPasses(item))
|
||||||
|
{
|
||||||
|
// If we are in single game mode, rename all games
|
||||||
|
if (_single)
|
||||||
|
{
|
||||||
|
item.MachineName = "!";
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are in NTFS trim mode, trim the game name
|
||||||
|
if (_trim)
|
||||||
|
{
|
||||||
|
// Windows max name length is 260
|
||||||
|
int usableLength = 260 - item.MachineName.Length - _root.Length;
|
||||||
|
if (item.Name.Length > usableLength)
|
||||||
|
{
|
||||||
|
string ext = Path.GetExtension(item.Name);
|
||||||
|
item.Name = item.Name.Substring(0, usableLength - ext.Length);
|
||||||
|
item.Name += ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lock the list and add the item back
|
||||||
|
lock (newitems)
|
||||||
|
{
|
||||||
|
newitems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
datFile.Remove(key);
|
||||||
|
datFile.AddRange(key, newitems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Globals.Logger.Error(ex.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check to see if a DatItem passes the filter
|
/// Check to see if a DatItem passes the filter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -306,11 +306,7 @@ namespace SabreTools
|
|||||||
/// <param name="bare">True if the date should not be appended to the default name, false otherwise [OBSOLETE]</param>
|
/// <param name="bare">True if the date should not be appended to the default name, false otherwise [OBSOLETE]</param>
|
||||||
/// /* Filtering info */
|
/// /* Filtering info */
|
||||||
/// <param name="filter">Pre-populated filter object for DAT filtering</param>
|
/// <param name="filter">Pre-populated filter object for DAT filtering</param>
|
||||||
/// /* Trimming info */
|
|
||||||
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
||||||
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
|
|
||||||
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
|
|
||||||
/// <param name="root">String representing root directory to compare against for length calculation</param>
|
|
||||||
/// /* Output DAT info */
|
/// /* Output DAT info */
|
||||||
/// <param name="outDir">Optional param for output directory</param>
|
/// <param name="outDir">Optional param for output directory</param>
|
||||||
/// <param name="clean">True to clean the game names to WoD standard, false otherwise (default)</param>
|
/// <param name="clean">True to clean the game names to WoD standard, false otherwise (default)</param>
|
||||||
@@ -363,12 +359,7 @@ namespace SabreTools
|
|||||||
|
|
||||||
/* Filtering info */
|
/* Filtering info */
|
||||||
Filter filter,
|
Filter filter,
|
||||||
|
|
||||||
/* Trimming info */
|
|
||||||
SplitType splitType,
|
SplitType splitType,
|
||||||
bool trim,
|
|
||||||
bool single,
|
|
||||||
string root,
|
|
||||||
|
|
||||||
/* Output DAT info */
|
/* Output DAT info */
|
||||||
string outDir,
|
string outDir,
|
||||||
@@ -455,7 +446,7 @@ namespace SabreTools
|
|||||||
};
|
};
|
||||||
|
|
||||||
userInputDat.DetermineUpdateType(inputPaths, basePaths, outDir, updateMode, inplace, skip, bare, clean,
|
userInputDat.DetermineUpdateType(inputPaths, basePaths, outDir, updateMode, inplace, skip, bare, clean,
|
||||||
remUnicode, descAsName, filter, splitType, trim, single, root);
|
remUnicode, descAsName, filter, splitType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -109,9 +109,7 @@ namespace SabreTools
|
|||||||
showBaddumpColumn = false,
|
showBaddumpColumn = false,
|
||||||
showNodumpColumn = false,
|
showNodumpColumn = false,
|
||||||
shortname = false,
|
shortname = false,
|
||||||
single = false,
|
|
||||||
superdat = false,
|
superdat = false,
|
||||||
trim = false,
|
|
||||||
skip = false,
|
skip = false,
|
||||||
updateDat = false,
|
updateDat = false,
|
||||||
usegame = true;
|
usegame = true;
|
||||||
@@ -581,7 +579,7 @@ namespace SabreTools
|
|||||||
break;
|
break;
|
||||||
case "-si":
|
case "-si":
|
||||||
case "--single":
|
case "--single":
|
||||||
single = true;
|
filter.Single = true;
|
||||||
break;
|
break;
|
||||||
case "-ska":
|
case "-ska":
|
||||||
case "--skiparc":
|
case "--skiparc":
|
||||||
@@ -617,7 +615,7 @@ namespace SabreTools
|
|||||||
break;
|
break;
|
||||||
case "-trim":
|
case "-trim":
|
||||||
case "--trim":
|
case "--trim":
|
||||||
trim = true;
|
filter.Trim = true;
|
||||||
break;
|
break;
|
||||||
case "-ts":
|
case "-ts":
|
||||||
case "--type":
|
case "--type":
|
||||||
@@ -851,7 +849,7 @@ namespace SabreTools
|
|||||||
break;
|
break;
|
||||||
case "-rd":
|
case "-rd":
|
||||||
case "--root-dir":
|
case "--root-dir":
|
||||||
root = args[++i];
|
filter.Root = args[++i];
|
||||||
break;
|
break;
|
||||||
case "-rep":
|
case "-rep":
|
||||||
case "--rep-ext":
|
case "--rep-ext":
|
||||||
@@ -1293,7 +1291,7 @@ namespace SabreTools
|
|||||||
// Get statistics on input files
|
// Get statistics on input files
|
||||||
else if (stats)
|
else if (stats)
|
||||||
{
|
{
|
||||||
InitStats(inputs, filename, outDir, single, showBaddumpColumn, showNodumpColumn, statDatFormat);
|
InitStats(inputs, filename, outDir, filter.Single, showBaddumpColumn, showNodumpColumn, statDatFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert, update, merge, diff, and filter a DAT or folder of DATs
|
// Convert, update, merge, diff, and filter a DAT or folder of DATs
|
||||||
@@ -1301,8 +1299,8 @@ namespace SabreTools
|
|||||||
{
|
{
|
||||||
InitUpdate(inputs, basePaths, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
|
InitUpdate(inputs, basePaths, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
|
||||||
superdat, forcemerge, forcend, forcepack, excludeOf, sceneDateStrip, datFormat, usegame, prefix, postfix, quotes, repext, addext, remext,
|
superdat, forcemerge, forcend, forcepack, excludeOf, sceneDateStrip, datFormat, usegame, prefix, postfix, quotes, repext, addext, remext,
|
||||||
datPrefix, romba, updateMode, inplace, skip, removeDateFromAutomaticName, filter, splitType, trim, single, root, outDir,
|
datPrefix, romba, updateMode, inplace, skip, removeDateFromAutomaticName, filter, splitType, outDir, cleanGameNames, removeUnicode,
|
||||||
cleanGameNames, removeUnicode, descAsName, dedup, stripHash);
|
descAsName, dedup, stripHash);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're using the verifier
|
// If we're using the verifier
|
||||||
|
|||||||
Reference in New Issue
Block a user