[DatTools] Allow filtering of merged data

This commit is contained in:
Matt Nadareski
2016-06-20 15:28:15 -07:00
parent a4a089f228
commit 8430b8de59
2 changed files with 10 additions and 17 deletions

View File

@@ -115,22 +115,6 @@ Options:
-ig, --ignore Don't prompt for new sources -ig, --ignore Don't prompt for new sources
-lso, --list-sources List all sources (id <= name) -lso, --list-sources List all sources (id <= name)
-lsy, --list-systems List all systems (id <= name) -lsy, --list-systems List all systems (id <= name)
-m, --merge Merge one or more DATs
-di, --diff Output all diffdats (merge flag not required)
-c, --cascade Enable cascaded diffing
-ip, --inplace Enable inplace, cascaded diff
-dd, --dedup Enable deduping in the created DAT
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-o, --old Output DAT in CMP format instead of XML
-clean Clean game names according to WoD standards
-out= Output directory (overridden by --inplace)
-sd, --superdat Enable SuperDAT creation
-n=, --name= Set the internal name of the DAT
-de=, --desc= Set the filename and description of the DAT
-ca=, --category= Set the category of the DAT
-v=, --version= Set the version of the DAT
-au=, --author= Set the author of the DAT
-ol, --offmerge Update DATS for offline arrays (see notes) -ol, --offmerge Update DATS for offline arrays (see notes)
-com= Complete current DAT -com= Complete current DAT
-fix= Complete current Missing -fix= Complete current Missing
@@ -184,6 +168,12 @@ Options:
None, Zip, Unzip None, Zip, Unzip
-clean Clean game names according to WoD standards -clean Clean game names according to WoD standards
-dd, --dedup Enable deduping in the created DAT -dd, --dedup Enable deduping in the created DAT
-m, --merge Merge the input DATs
-b, --bare Don't include date in automatic name
-di, --diff Create diffdats from inputs
-b, --bare Don't include date in automatic name
-c, --cascade Enable cascaded diffing
-ip, --inplace Enable inplace, cascaded diff
-gn=, --game-name= Filter by game name -gn=, --game-name= Filter by game name
-rn=, --rom-name= Filter by rom name -rn=, --rom-name= Filter by rom name
-rt=, --rom-type= Filter by rom type -rt=, --rom-type= Filter by rom type
@@ -195,7 +185,7 @@ Options:
-sha1=, --sha1= Filter by SHA-1 hash -sha1=, --sha1= Filter by SHA-1 hash
-nd, --nodump Include only match nodump roms -nd, --nodump Include only match nodump roms
-nnd, --not-nodump Exclude all nodump roms -nnd, --not-nodump Exclude all nodump roms
-out= Output directory -out= Output directory (overridden by --inplace)
Filenames and directories can't start with a reserved string Filenames and directories can't start with a reserved string
unless prefixed by 'input=' unless prefixed by 'input='

View File

@@ -1606,6 +1606,9 @@ namespace SabreTools.Helper
Dat userData; Dat userData;
List<Dat> datHeaders = PopulateUserData(inputFileNames, inplace, clean, outputDirectory, datdata, out userData, logger); List<Dat> datHeaders = PopulateUserData(inputFileNames, inplace, clean, outputDirectory, datdata, out userData, logger);
// If we want to filter, apply it to the userData now
userData = Filter(userData, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
// Modify the Dictionary if necessary and output the results // Modify the Dictionary if necessary and output the results
if (diff && !cascade) if (diff && !cascade)
{ {