From 326a09a52db8ff2058253f47d27f110f12aad873 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 8 Jan 2018 11:34:56 -0800 Subject: [PATCH] [SabreTools, Flags, DatFiles/, Utilities] Fix flags Fix some long flag names to be more descriptive --- SabreTools.Library/DatFiles/DatFile.cs | 8 +- .../DatFiles/{Listroms.cs => Listrom.cs} | 10 +- SabreTools.Library/Data/Flags.cs | 4 +- SabreTools.Library/README.1ST | 206 ++-- SabreTools.Library/SabreTools.Library.csproj | 2 +- SabreTools.Library/Tools/Utilities.cs | 6 +- SabreTools/SabreTools.Help.cs | 938 +++++++++--------- SabreTools/SabreTools.cs | 180 ++-- 8 files changed, 710 insertions(+), 644 deletions(-) rename SabreTools.Library/DatFiles/{Listroms.cs => Listrom.cs} (98%) diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index cd6c6d67..c69880b2 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -5591,15 +5591,15 @@ namespace SabreTools.Library.DatFiles } //MAME Listroms - if ((DatFormat & DatFormat.Listroms) != 0 + if ((DatFormat & DatFormat.Listrom) != 0 && (DatFormat & DatFormat.AttractMode) == 0) { - outfileNames.Add(DatFormat.Listroms, CreateOutfileNamesHelper(outDir, ".txt", overwrite)); + outfileNames.Add(DatFormat.Listrom, CreateOutfileNamesHelper(outDir, ".txt", overwrite)); } - if ((DatFormat & DatFormat.Listroms) != 0 + if ((DatFormat & DatFormat.Listrom) != 0 && (DatFormat & DatFormat.AttractMode) != 0) { - outfileNames.Add(DatFormat.Listroms, CreateOutfileNamesHelper(outDir, ".lr.txt", overwrite)); + outfileNames.Add(DatFormat.Listrom, CreateOutfileNamesHelper(outDir, ".lr.txt", overwrite)); } // Logiqx XML diff --git a/SabreTools.Library/DatFiles/Listroms.cs b/SabreTools.Library/DatFiles/Listrom.cs similarity index 98% rename from SabreTools.Library/DatFiles/Listroms.cs rename to SabreTools.Library/DatFiles/Listrom.cs index e619d6f8..390f7d6c 100644 --- a/SabreTools.Library/DatFiles/Listroms.cs +++ b/SabreTools.Library/DatFiles/Listrom.cs @@ -21,21 +21,21 @@ using NaturalSort; namespace SabreTools.Library.DatFiles { /// - /// Represents parsing and writing of a MAME Listroms DAT + /// Represents parsing and writing of a MAME Listrom DAT /// - internal class Listroms : DatFile + internal class Listrom : DatFile { /// /// Constructor designed for casting a base DatFile /// /// Parent DatFile to copy from - public Listroms(DatFile datFile) + public Listrom(DatFile datFile) : base(datFile, cloneHeader: false) { } /// - /// Parse a MAME Listroms DAT and return all found games and roms within + /// Parse a MAME Listrom DAT and return all found games and roms within /// /// Name of the file to be parsed /// System ID for the DAT @@ -44,7 +44,7 @@ namespace SabreTools.Library.DatFiles /// True if game names are sanitized, false otherwise (default) /// True if we should remove non-ASCII characters from output, false otherwise (default) /// - /// In a new style MAME listroms DAT, each game has the following format: + /// In a new style MAME listrom DAT, each game has the following format: /// /// ROMs required for driver "005". /// Name Size Checksum diff --git a/SabreTools.Library/Data/Flags.cs b/SabreTools.Library/Data/Flags.cs index 1b06e652..a3b81d7c 100644 --- a/SabreTools.Library/Data/Flags.cs +++ b/SabreTools.Library/Data/Flags.cs @@ -208,10 +208,10 @@ namespace SabreTools.Library.Data MissFile = AttractMode << 1, CSV = MissFile << 1, TSV = CSV << 1, - Listroms = TSV << 1, + Listrom = TSV << 1, // SFV-similar Formats - RedumpSFV = Listroms << 1, + RedumpSFV = Listrom << 1, RedumpMD5 = RedumpSFV << 1, RedumpSHA1 = RedumpMD5 << 1, RedumpSHA256 = RedumpSHA1 << 1, diff --git a/SabreTools.Library/README.1ST b/SabreTools.Library/README.1ST index b29f4af2..936b66a8 100644 --- a/SabreTools.Library/README.1ST +++ b/SabreTools.Library/README.1ST @@ -169,30 +169,30 @@ Options: current date. It will also treat all archives as possible games and add all three hashes for each file. - -nm, --noMD5 Don't include MD5 in output + -nm, --skip-md5 Don't include MD5 in output This allows the user to skip calculating the MD5 for each of the files which will speed up the creation of the DAT. - -ns, --noSHA1 Don't include SHA1 in output + -ns, --skip-sha1 Don't include SHA1 in output This allows the user to skip calculating the SHA-1 for each of the files which will speed up the creation of the DAT. - -ns256, --noSHA256 Include SHA-256 in output + -ns256, --skip-sha256 Include SHA-256 in output This allows the user to include calculating the SHA-256 for each of the files which will speed up the creation of the DAT. (Will be inverted later) - -ns384, --noSHA384 Include SHA-384 in output + -ns384, --skip-sha384 Include SHA-384 in output This allows the user to include calculating the SHA-384 for each of the files which will speed up the creation of the DAT. (Will be inverted later) - -ns512, --noSHA512 Include SHA-512 in output + -ns512, --skip-sha512 Include SHA-512 in output This allows the user to include calculating the SHA-512 for each of the files which will speed up the creation of the DAT. (Will be inverted later) - -b, --bare Don't include date in file name + -b, --no-automatic-date Don't include date in file name Normally, the DAT will be created with the date in the file name. This flag removes that but keeps the date tag intact. @@ -200,7 +200,7 @@ Options: Set the forcepacking flag to one of the supported values: None, Zip, Unzip - -f, --files Treat archives as files + -f, --archives-as-files Treat archives as files Instead of trying to enumerate the files within archives, treat the archives as files themselves. This is good for uncompressed sets that include archives that should be read as-is. @@ -209,7 +209,7 @@ Options: Add outputting the created DAT in all available formats. See specific formats for additional flags that may be used. - -oam, --output-am Output in AttractMode format + -oam, --output-attractmode Output in AttractMode format Add outputting the created DAT to AttractMode format -oc, --output-cmp Output in CMP format @@ -218,10 +218,10 @@ Options: -ocsv, --output-csv Output in Comma-Separated Value format Add outputting the created DAT to standardized CSV format - -od, --output-dc Output in DOSCenter format + -od, --output-doscenter Output in DOSCenter format Add outputting the created DAT to DOSCenter format - -olr, --output-lr Output in MAME Listrom format + -olr, --output-listrom Output in MAME Listrom format Add outputting the created DAT to MAME Listrom format -om, --output-miss Output in Missfile format @@ -230,13 +230,13 @@ Options: -omd5, --output-md5 Output in MD5 format Add outputting the created DAT to MD5 format - -ool, --output-ol Output in OfflineList format + -ool, --output-offlinelist Output in OfflineList format Add outputting the created DAT to OfflineList XML format - -or, --output-rc Output in RomCenter format + -or, --output-romcenter Output in RomCenter format Add outputting the created DAT to RomCenter format - -os, --output-sd Output in SabreDAT format + -os, --output-sabredat Output in SabreDAT format Add outputting the created DAT to SabreDAT XML format -osfv, --output-sfv Output in SFV format @@ -254,7 +254,7 @@ Options: -osha512, --output-sha512 Output in SHA-512 format Add outputting the created DAT to SHA-512 format - -osl, --output-sl Output in Software List format + -osl, --output-softwarelist Output in Software List format Add outputting the created DAT to Software List XML format -otsv, --output-tsv Output in Tab-Separated Value format @@ -268,10 +268,10 @@ Options: depot. This implies that the files will be in the TorrentGZ format as well, including naming convention. - -ska, --skiparc Skip archive files + -ska, --skip-archives Skip archive files Skip any files that are treated like archives - -skf, --skipfile Skip non-archive files + -skf, --skip-files Skip non-archive files Skip any files that are not treated like archives -f=, --filename= Set the external name of the DAT @@ -321,7 +321,7 @@ Options: removed from the beginning. For example "01.01.01-Game_Name-GROUP" would become "Game_Name-Group". - -ab, --add-blank Output blank files for folders + -ab, --add-blank-files Output blank files for folders If this flag is set, then blank entries will be created for each of the empty directories in the source. This is useful for tools that require all folders be accounted for in the output DAT. @@ -345,7 +345,7 @@ Options: that skipper exists, then it will be used instead of trying to find one that matches. - -ic, --ignore-chd Treat CHDs as regular files + -ic, --chds-as-files Treat CHDs as regular files Normally, CHDs would be processed using their internal hash to compare against the input DATs. This flag forces all CHDs to be treated like regular files. @@ -420,7 +420,7 @@ Options: Add outputting the created DAT in all available formats. See specific formats for additional flags that may be used. - -oam, --output-am Output in AttractMode format + -oam, --output-attractmode Output in AttractMode format Add outputting the created DAT to AttractMode format -oc, --output-cmp Output in CMP format @@ -429,10 +429,10 @@ Options: -ocsv, --output-csv Output in Comma-Separated Value format Add outputting the created DAT to standardized CSV format - -od, --output-dc Output in DOSCenter format + -od, --output-doscenter Output in DOSCenter format Add outputting the created DAT to DOSCenter format - -olr, --output-lr Output in MAME Listrom format + -olr, --output-listrom Output in MAME Listrom format Add outputting the created DAT to MAME Listrom format -om, --output-miss Output in Missfile format @@ -441,13 +441,13 @@ Options: -omd5, --output-md5 Output in MD5 format Add outputting the created DAT to MD5 format - -ool, --output-ol Output in OfflineList format + -ool, --output-offlinelist Output in OfflineList format Add outputting the created DAT to OfflineList XML format - -or, --output-rc Output in RomCenter format + -or, --output-romcenter Output in RomCenter format Add outputting the created DAT to RomCenter format - -os, --output-sd Output in SabreDAT format + -os, --output-sabredat Output in SabreDAT format Add outputting the created DAT to SabreDAT XML format -osfv, --output-sfv Output in SFV format @@ -465,7 +465,7 @@ Options: -osha512, --output-sha512 Output in SHA-512 format Add outputting the created DAT to SHA-512 format - -osl, --output-sl Output in Software List format + -osl, --output-softwarelist Output in Software List format Add outputting the created DAT to Software List XML format -otsv, --output-tsv Output in Tab-Separated Value format @@ -483,7 +483,7 @@ Options: writing them out to the runtime folder by default (or the output folder if overridden). - -es, --ext Split a DAT by two file extensions + -es, --extension Split a DAT by two file extensions For a DAT, or set of DATs, allow for splitting based on a list of input extensions. This can allow for combined DAT files, such as those combining two separate systems, to be split. Files with any @@ -572,7 +572,7 @@ Options: to the temp folder. On the downside, it can only get the CRC and size from most archive formats, leading to possible issues. - -ic, --ignore-chd Treat CHDs as regular files + -ic, --chds-as-files Treat CHDs as regular files Normally, CHDs would be processed using their internal hash to compare against the input DATs. This flag forces all CHDs to be treated like regular files. @@ -583,7 +583,7 @@ Options: This will technically invalidate the output files as proper TorrentZip files because the date will not match the standard. - -t7z Enable Torrent 7zip output + -t7z, --torrent-7zip Enable Torrent 7zip output Instead of ouputting the files to folder, files will be rebuilt to Torrent7Zip (T7Z) files. This format is based on the LZMA container format 7zip, but with custom header information. This is currently @@ -597,7 +597,7 @@ Options: formats around it. It is widely used in backup applications and source code archives. - -tgz Enable Torrent GZ output + -tgz, --torrent-gzip Enable Torrent GZ output Instead of outputting the files to folder, files will be rebuilt to TorrentGZ (TGZ) files. This format is based on the GZip archive format, but with custom header information and a file name replaced @@ -613,48 +613,48 @@ Options: files, .romba_size and .romba_size.backup, that have the compressed size of the folder inside for use with Romba. - -tlrz Enable Torrent Long-Range Zip output [UNIMPLEMENTED] + -tlrz, --torrent-lrzip Enable Torrent Long-Range Zip output [UNIMPLEMENTED] Instead of ouputting the files to folder, files will be rebuilt to Torrent Long-Range Zip (TLRZ) files. This format is based on the LRZip file format as defined at https://github.com/ckolivas/lrzip but with custom header information. This is currently unused by any major application. - -tlz4 Enable Torrent LZ4 output [UNIMPLEMENTED] + -tlz4, --torrent-lz4 Enable Torrent LZ4 output [UNIMPLEMENTED] Instead of ouputting the files to folder, files will be rebuilt to Torrent LZ4 (TLZ4) files. This format is based on the LZ4 file format as defined at https://github.com/lz4/lz4 but with custom header information. This is currently unused by any major application. - -trar Enable Torrent RAR output [UNIMPLEMENTED] + -trar, --torrent-rar Enable Torrent RAR output [UNIMPLEMENTED] Instead of outputting files to folder, files will be rebuilt to Torrent RAR (TRAR) files. This format is based on the RAR propietary format but with custom header information. This is currently unused by any major application. - -txz Enable Torrent XZ output [UNSUPPORTED] + -txz, --torrent-xz Enable Torrent XZ output [UNSUPPORTED] Instead of outputting files to folder, files will be rebuilt to Torrent XZ (TXZ) files. This format is based on the LZMA container format XZ, but with custom header information. This is currently unused by any major application. Currently does not produce proper Torrent-compatible outputs. - -tzip Enable Torrent Zip output + -tzip, --torrent-zip Enable Torrent Zip output Instead of ouputting files to folder, files will be rebuilt to TorrentZip (TZip) files. This format is based on the ZIP archive format, but with custom header information. This is primarily used by external tool RomVault (http://www.romvault.com/) and is already widely used. - -tzpaq Enable Torrent ZPAQ output [UNIMPLEMENTED] + -tzpaq, --torrent-zpaq Enable Torrent ZPAQ output [UNIMPLEMENTED] Instead of ouputting the files to folder, files will be rebuilt to Torrent ZPAQ (TZPAQ) files. This format is based on the ZPAQ file format as defined at https://github.com/zpaq/zpaq but with custom header information. This is currently unused by any major application. - -tzstd Enable Torrent Zstd output [UNIMPLEMENTED] + -tzstd, --torrent-zstd Enable Torrent Zstd output [UNIMPLEMENTED] Instead of ouputting the files to folder, files will be rebuilt to Torrent Zstd (TZstd) files. This format is based on the Zstd file format as defined at https://github.com/skbkontur/ZstdNet but with @@ -695,17 +695,17 @@ Options: children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-nonmerged Force creating non-merged sets + -dnm, --dat-non-merged Force creating non-merged sets Preprocess the DAT to have child sets contain all items from the parent set based on the cloneof tag. This is incompatible with the other --dat-X flags. - -dnd, --dat-devnonmerged Force creating device non-merged sets + -dnd, --dat-device-non-merged Force creating device non-merged sets Preprocess the DAT to have child sets contain all items from the device references. This is incompatible with the other --dat-X flags. - -df, --dat-fullnonmerged Force creating fully non-merged sets + -df, --dat-full-non-merged Force creating fully non-merged sets Preprocess the DAT to have child sets contain all items from the parent sets based on the cloneof and romof tags as well as device references. This is incompatible with the other --dat-X flags. @@ -736,7 +736,7 @@ Options: -as, --all-stats Write all statistics to all available formats Output all rom information to all available formats - -bc, --baddump-col Add statistics for baddumps to output + -bc, --baddump-column Add statistics for baddumps to output Add a new column or field for counting the number of baddumps in the DAT @@ -754,7 +754,7 @@ Options: This will output by default the combined statistics for all input DAT files. - -nc, --nodump-col Add statistics for nodumps to output + -nc, --nodump-column Add statistics for nodumps to output Add a new column or field for counting the number of nodumps in the DAT @@ -780,7 +780,7 @@ Options: Add outputting the created DAT in all available formats. See specific formats for additional flags that may be used. - -oam, --output-am Output in AttractMode format + -oam, --output-attractmode Output in AttractMode format Add outputting the created DAT to AttractMode format -oc, --output-cmp Output in CMP format @@ -809,10 +809,10 @@ Options: -q, --quotes Put double-quotes around each item This quotes only the item and not the prefix and postfix - -od, --output-dc Output in DOSCenter format + -od, --output-doscenter Output in DOSCenter format Add outputting the created DAT to DOSCenter format - -olr, --output-lr Output in MAME Listrom format + -olr, --output-listrom Output in MAME Listrom format Add outputting the created DAT to MAME Listrom format -om, --output-miss Output in Missfile format @@ -852,7 +852,7 @@ Options: -re=, --rep-ext= Replace all extensions with specified When an extension exists, replace it with the provided instead - -rme, --rem-ext Remove all extensions from all items + -rme, --remove-extensions Remove all extensions from all items For each item, the extension is removed -ro, --romba Output in Romba format (requires SHA-1) @@ -867,13 +867,13 @@ Options: This allows for the name of the game to be used as a prefix to each file - -ool, --output-ol Output in OfflineList format + -ool, --output-offlinelist Output in OfflineList format Add outputting the created DAT to OfflineList XML format - -or, --output-rc Output in RomCenter format + -or, --output-romcenter Output in RomCenter format Add outputting the created DAT to RomCenter format - -os, --output-sd Output in SabreDAT format + -os, --output-sabredat Output in SabreDAT format Add outputting the created DAT to SabreDAT XML format -osfv, --output-sfv Output in SFV format @@ -911,7 +911,7 @@ Options: This allows for the name of the game to be used as a prefix to each file - -osl, --output-sl Output in Software List format + -osl, --output-softwarelist Output in Software List format Add outputting the created DAT to Software List XML format -otsv, --output-tsv Output in Tab-Separated Value format @@ -1008,32 +1008,32 @@ Options: standards deemed as unneeded information, such as parenthized or bracketed strings - -ru, --rem-uni Remove unicode characters from names + -ru, --remove-unicode Remove unicode characters from names By default, the character set from the original file(s) will be used for item naming. This flag removes all Unicode characters from the item names, machine names, and machine descriptions. - -rmd5, --rem-md5 Remove MD5 hashes from the output + -rmd5, --remove-md5 Remove MD5 hashes from the output By default, all available hashes will be written out to the DAT. This will remove all MD5 hashes from the output file(s). - -rsha1, --rem-sha1 Remove SHA-1 hashes from the output + -rsha1, --remove-sha1 Remove SHA-1 hashes from the output By default, all available hashes will be written out to the DAT. This will remove all SHA-1 hashes from the output file(s). - -rsha256, --rem-sha256 Remove SHA-256 hashes from the output + -rsha256, --remove-sha256 Remove SHA-256 hashes from the output By default, all available hashes will be written out to the DAT. This will remove all SHA-256 hashes from the output file(s). - -rsha384, --rem-sha384 Remove SHA-384 hashes from the output + -rsha384, --remove-sha384 Remove SHA-384 hashes from the output By default, all available hashes will be written out to the DAT. This will remove all SHA-384 hashes from the output file(s). - -rsha512, --rem-sha512 Remove SHA-512 hashes from the output + -rsha512, --remove-sha512 Remove SHA-512 hashes from the output By default, all available hashes will be written out to the DAT. This will remove all SHA-512 hashes from the output file(s). - -dan, --desc-name Use Software List name instead of description + -dan, --description-as-name Use Software List name instead of description By default, all DATs are converted exactly as they are input. Enabling this flag allows for the machine names in the DAT to be replaced by the machine description instead. In most cases, this @@ -1051,12 +1051,17 @@ Options: children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-nonmerged Create non-merged sets + -dnm, --dat-non-merged Create non-merged sets Preprocess the DAT to have child sets contain all items from the parent set based on the cloneof tag. This is incompatible with the other --dat-X flags. - -df, --dat-fullnonmerged Create fully non-merged sets + -dnd, --dat-device-non-merged Force creating device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X + flags. + + -df, --dat-full-non-merged Create fully non-merged sets Preprocess the DAT to have child sets contain all items from the parent sets based on the cloneof and romof tags as well as device references. This is incompatible with the other --dat-X flags. @@ -1069,7 +1074,7 @@ Options: In the case that the files will not be stored from the root directory, a new root can be set for path length calculations - -si, --single All game names replaced by '!' + -si, --single-set All game names replaced by '!' This is useful for keeping all roms in a DAT in the same archive or folder @@ -1089,7 +1094,7 @@ Options: specified flags. With this flag enabled, all of the input DATs are merged into a single output. This is best used with the dedupe flag. - -b, --bare Don't include date in file name + -b, --no-automatic-date Don't include date in file name Normally, the DAT will be created with the date in the file name in brackets. This flag removes that instead of the default. @@ -1124,12 +1129,12 @@ Options: Add a DAT or folder of DATs to the base set to be used in comparison against all inputs - -b, --bare Don't include date in file name + -b, --no-automatic-date Don't include date in file name Normally, the DAT will be created with the date in the file name in brackets. This flag removes that instead of the default. -c, --cascade Enable cascaded diffing - -rc, --rev-cascade Enable reverse cascaded diffing + -rc, --reverse-cascade Enable reverse cascaded diffing Each of the above flags allow for a special type of diffing in which the first (or last) DAT is considered a base, and for each additional input DAT, it only leaves the files that are not in @@ -1137,7 +1142,7 @@ Options: rollback sets or even just reduce the amount of duplicates across multiple sets - -sf, --skip Skip output of first DAT + -sf, --skip-first-output Skip output of first DAT In times where the first DAT does not need to be written out a second time, this will skip writing it. This can often speed up the output process. @@ -1162,7 +1167,7 @@ Options: -uh, --update-hashes Update hashes from base DATs This flag enables updating of hashes from base DATs. - -udd, --update-desc Update machine descriptions from base DATs + -udd, --update-description Update machine descriptions from base DATs This flag enables updating of machine descriptions from base DATs @@ -1170,7 +1175,7 @@ Options: This flag enables updating of machine years from base DATs - -um, --update-manu Update machine manufacturers from base DATs + -um, --update-manufacturer Update machine manufacturers from base DATs This flag enables updating of machine manufacturers from base DATs @@ -1194,7 +1199,7 @@ Options: match or can use full C#-style regex for pattern matching. Multiples of each of the above inputs are allowed. - -ofg, --of-as-game Allow cloneof and romof tags to match game name + -ofg, --match-of-tags Allow cloneof and romof tags to match game name If filter or exclude by game name is used, this flag will allow those filters to be checked against the romof and cloneof tags as well. This can allow for more advanced set-building, especially in @@ -1238,7 +1243,7 @@ Options: -run, --runnable Include only items that are marked runnable This allows users to include only verified runnable games - -nrun, --not-run Include only items that are not marked runnable + -nrun, --not-runnable Include only items that are not marked runnable This allows users to include only unrunnable games -out= Set the name of the output directory @@ -1295,7 +1300,7 @@ Options: that skipper exists, then it will be used instead of trying to find one that matches. - -ic, --ignore-chd Treat CHDs as regular files + -ic, --chds-as-files Treat CHDs as regular files Normally, CHDs would be processed using their internal hash to compare against the input DATs. This flag forces all CHDs to be treated like regular files. @@ -1310,12 +1315,17 @@ Options: children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-nonmerged Force checking non-merged sets + -dnm, --dat-non-merged Force checking non-merged sets Preprocess the DAT to have child sets contain all items from the parent set based on the cloneof tag. This is incompatible with the other --dat-X flags. + + -dnd, --dat-device-non-merged Force creating device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X + flags. - -df, --dat-fullnonmerged Force checking fully non-merged sets + -df, --dat-full-non-merged Force checking fully non-merged sets Preprocess the DAT to have child sets contain all items from the parent sets based on the cloneof and romof tags as well as device references. This is incompatible with the other --dat-X flags. @@ -1397,4 +1407,58 @@ licensed under the Microsoft Public License of October 2006. All other external code is marked as such within the source and correctly attributed to the site and/or person(s) that originally wrote the code. All code written by project members is licensed under GPL v3. See LICENSE for -more details. \ No newline at end of file +more details. + +** Section 20.0 - TEMPORARY REMAPPINGS + +This section contains remappings from old flag names to new ones for the purposes of testing + +-ab, --add-blank -> -ab, --add-blank-files +-bc, --baddump-col -> -bc, --baddump-column +-b, --bare -> -b, --no-automatic-date +-dnd, --dat-devnonmerged -> -dnd, --dat-device-non-merged +-df, --dat-fullnonmerged -> -df, --dat-full-non-merged +-dnm, --dat-nonmerged -> -dnm, --dat-non-merged +-dan, --desc-name -> -dan, --description-as-name +-es, --ext -> -es, --extension +-f, --files -> -f, --archives-as-files +-ic, --ignore-chd -> -ic, --chds-as-files +-nc, --nodump-col -> -nc, --nodump-column +-nm, --noMD5 -> -nm, --skip-md5 +-ns, --noSHA1 -> -ns, --skip-sha1 +-ns256, --noSHA256 -> -ns256, --skip-sha256 +-ns384, --noSHA384 -> -nm, --skip-sha384 +-ns512, --noSHA512 -> -nm, --skip-sha512 +-nrun, --not-run -> -nrun, --not-runnable +-ofg, --of-as-game -> -ofg, --match-of-tags +-oam, --output-am -> -oam, --output-attractmode +-od, --output-dc -> -od, --output-doscenter +-olr, --output-lr -> -olr, --output-listrom +-ool, --output-ol -> -ol, --output-offlinelist +-or, --output-rc -> -or, --output-romcenter +-os, --output-sd -> -os, --output-sabredat +-osl, --output-sl -> -osl, --output-softwarelist +-rme, --rem-ext -> -rme, --remove-extensions +-rmd5, --rem-md5 -> -rmd5, --remove-md5 +-rsha1, --rem-sha1 -> -rsha1, --remove-sha1 +-rsha256, --rem-sha256 -> -rsha256, --remove-sha256 +-rsha384, --rem-sha384 -> -rsha384, --remove-sha384 +-rsha512, --rem-sha512 -> -rsha512, --remove-sha512 +-ru, --rem-uni -> -ru, --remove-unicode +-rc, --rev-cascade -> -rc, --reverse-cascade +-si, --single -> -ind, --individual [For stat output case] +-si, --single -> -si, --single-set [For '!' case] +-sf, --skip -> -sf, --skip-first-output +-ska, --skiparc -> -ska, --skip-archives +-skf, --skipfile -> -skf, --skip-files +-t7z, --t7z -> -t7z, --torrent-7zip +-tgz, --tgz -> -tgz, --torrent-gzip +-tlrz, --tlrz -> -tlrz, --torrent-lrzip +-tlz4, --tlz4 -> -tlz4, --torrent-lz4 +-trar, --trar -> -trar, --torrent-rar +-txz, --txz -> -txz, --torrent-xz +-tzip, --tzip -> -tzip, --torrent-zip +-tzpaq, --tzpaq -> -tzpaq, --torrent-zpaq +-tzstd, --tzstd -> -tzstd, --torrent-zstd +-udd, --update-desc -> -udd, --update-description +-um, --update-manu -> -um, --update-manufacturer \ No newline at end of file diff --git a/SabreTools.Library/SabreTools.Library.csproj b/SabreTools.Library/SabreTools.Library.csproj index 9319ac23..f426a312 100644 --- a/SabreTools.Library/SabreTools.Library.csproj +++ b/SabreTools.Library/SabreTools.Library.csproj @@ -122,7 +122,7 @@ - + diff --git a/SabreTools.Library/Tools/Utilities.cs b/SabreTools.Library/Tools/Utilities.cs index b2ebb504..391a0552 100644 --- a/SabreTools.Library/Tools/Utilities.cs +++ b/SabreTools.Library/Tools/Utilities.cs @@ -593,8 +593,8 @@ namespace SabreTools.Library.Tools return new DatFiles.SeparatedValue(baseDat, ','); case DatFormat.DOSCenter: return new DosCenter(baseDat); - case DatFormat.Listroms: - return new Listroms(baseDat); + case DatFormat.Listrom: + return new Listrom(baseDat); case DatFormat.Logiqx: return new Logiqx(baseDat); case DatFormat.MissFile: @@ -1083,7 +1083,7 @@ namespace SabreTools.Library.Tools // If we have a listroms DAT else if (first.StartsWith("roms required for driver")) { - return DatFormat.Listroms; + return DatFormat.Listrom; } // If we have a CMP-based DAT diff --git a/SabreTools/SabreTools.Help.cs b/SabreTools/SabreTools.Help.cs index e528edd2..3e5de1c3 100644 --- a/SabreTools/SabreTools.Help.cs +++ b/SabreTools/SabreTools.Help.cs @@ -9,18 +9,18 @@ namespace SabreTools { #region Private Flag features - private static Feature addBlankFeature + private static Feature addBlankFilesFlag { get { return new Feature( - new List() { "-ab", "--add-blank" }, + new List() { "-ab", "--add-blank-files" }, "Output blank files for folders", FeatureType.Flag, null); } } - private static Feature addDateFeature + private static Feature addDateFlag { get { @@ -31,7 +31,7 @@ namespace SabreTools null); } } - private static Feature againstFeature + private static Feature againstFlag { get { @@ -42,7 +42,7 @@ namespace SabreTools null); } } - private static Feature allStatsFeature + private static Feature allStatsFlag { get { @@ -53,29 +53,29 @@ namespace SabreTools null); } } - private static Feature baddumpColFeature + private static Feature archivesAsFilesFlag { get { return new Feature( - new List() { "-bc", "--baddump-col" }, + new List() { "-f", "--archives-as-files" }, + "Treat archives as files", + FeatureType.Flag, + null); + } + } + private static Feature baddumpColumnFlag + { + get + { + return new Feature( + new List() { "-bc", "--baddump-column" }, "Add baddump stats to output", FeatureType.Flag, null); } } - private static Feature bareFeature - { - get - { - return new Feature( - new List() { "-b", "--bare" }, - "Don't include date in automatic name", - FeatureType.Flag, - null); - } - } - private static Feature baseFeature + private static Feature baseFlag { get { @@ -86,7 +86,7 @@ namespace SabreTools null); } } - private static Feature baseReplaceFeature + private static Feature baseReplaceFlag { get { @@ -97,7 +97,7 @@ namespace SabreTools null); } } - private static Feature cascadeFeature + private static Feature cascadeFlag { get { @@ -108,7 +108,18 @@ namespace SabreTools null); } } - private static Feature cleanFeature + private static Feature chdsAsFilesFlag + { + get + { + return new Feature( + new List() { "-ic", "--chds-as-files" }, + "Treat CHDs as regular files", + FeatureType.Flag, + null); + } + } + private static Feature cleanFlag { get { @@ -119,7 +130,7 @@ namespace SabreTools null); } } - private static Feature copyFilesFeature + private static Feature copyFilesFlag { get { @@ -130,7 +141,7 @@ namespace SabreTools null); } } - private static Feature csvFeature + private static Feature csvFlag { get { @@ -141,29 +152,29 @@ namespace SabreTools null); } } - private static Feature datDevnonmergedFeature + private static Feature datDeviceNonMergedFlag { get { return new Feature( - new List() { "-dnd", "--dat-devnonmerged" }, + new List() { "-dnd", "--dat-device-non-merged" }, "Create device non-merged sets", FeatureType.Flag, null); } } - private static Feature datFullnonmergedFeature + private static Feature datFullNonMergedFlag { get { return new Feature( - new List() { "-df", "--dat-fullnonmerged" }, + new List() { "-df", "--dat-full-non-merged" }, "Force creating fully non-merged sets", FeatureType.Flag, null); } } - private static Feature datMergedFeature + private static Feature datMergedFlag { get { @@ -174,18 +185,18 @@ namespace SabreTools null); } } - private static Feature datNonmergedFeature + private static Feature datNonMergedFlag { get { return new Feature( - new List() { "-dnm", "--dat-nonmerged" }, + new List() { "-dnm", "--dat-non-merged" }, "Force creating non-merged sets", FeatureType.Flag, null); } } - private static Feature datSplitFeature + private static Feature datSplitFlag { get { @@ -196,7 +207,7 @@ namespace SabreTools null); } } - private static Feature dedupFeature + private static Feature dedupFlag { get { @@ -207,7 +218,7 @@ namespace SabreTools null); } } - private static Feature deleteFeature + private static Feature deleteFlag { get { @@ -218,7 +229,7 @@ namespace SabreTools null); } } - private static Feature depotFeature + private static Feature depotFlag { get { @@ -229,18 +240,18 @@ namespace SabreTools null); } } - private static Feature descNameFeature + private static Feature descriptionAsNameFlag { get { return new Feature( - new List() { "-dan", "--desc-name" }, + new List() { "-dan", "--description-as-name" }, "Use description instead of machine name", FeatureType.Flag, null); } } - private static Feature diffFeature + private static Feature diffFlag { get { @@ -251,7 +262,7 @@ namespace SabreTools null); } } - private static Feature diffDuFeature + private static Feature diffDuFlag { get { @@ -262,7 +273,7 @@ namespace SabreTools null); } } - private static Feature diffInFeature + private static Feature diffInFlag { get { @@ -273,7 +284,7 @@ namespace SabreTools null); } } - private static Feature diffNdFeature + private static Feature diffNdFlag { get { @@ -284,7 +295,7 @@ namespace SabreTools null); } } - private static Feature excludeOfFeature + private static Feature excludeOfFlag { get { @@ -295,29 +306,18 @@ namespace SabreTools null); } } - private static Feature extFeature + private static Feature extensionFlag { get { return new Feature( - new List() { "-es", "--ext" }, + new List() { "-es", "--extension" }, "Split DAT(s) by two file extensions", FeatureType.Flag, null); } } - private static Feature filesFeature - { - get - { - return new Feature( - new List() { "-f", "--files" }, - "Treat archives as files", - FeatureType.Flag, - null); - } - } - private static Feature gameDedupFeature + private static Feature gameDedupFlag { get { @@ -328,7 +328,7 @@ namespace SabreTools null); } } - private static Feature gamePrefixFeature + private static Feature gamePrefixFlag { get { @@ -339,7 +339,7 @@ namespace SabreTools null); } } - private static Feature hashFeature + private static Feature hashFlag { get { @@ -350,7 +350,7 @@ namespace SabreTools null); } } - private static Feature hashOnlyFeature + private static Feature hashOnlyFlag { get { @@ -361,7 +361,7 @@ namespace SabreTools null); } } - private static Feature htmlFeature + private static Feature htmlFlag { get { @@ -372,18 +372,7 @@ namespace SabreTools null); } } - private static Feature ignoreChdFeature - { - get - { - return new Feature( - new List() { "-ic", "--ignore-chd" }, - "Treat CHDs as regular files", - FeatureType.Flag, - null); - } - } - private static Feature individualFeature + private static Feature individualFlag { get { @@ -394,7 +383,7 @@ namespace SabreTools null); } } - private static Feature inplaceFeature + private static Feature inplaceFlag { get { @@ -405,7 +394,7 @@ namespace SabreTools null); } } - private static Feature inverseFeature + private static Feature inverseFlag { get { @@ -416,7 +405,7 @@ namespace SabreTools null); } } - private static Feature levelFeature + private static Feature levelFlag { get { @@ -427,7 +416,7 @@ namespace SabreTools null); } } - private static Feature mergeFeature + private static Feature mergeFlag { get { @@ -438,73 +427,29 @@ namespace SabreTools null); } } - private static Feature nodumpColFeature + private static Feature noAutomaticDateFlag { get { return new Feature( - new List() { "-nc", "--nodump-col" }, + new List() { "-b", "--no-automatic-date" }, + "Don't include date in automatic name", + FeatureType.Flag, + null); + } + } + private static Feature nodumpColumnFlag + { + get + { + return new Feature( + new List() { "-nc", "--nodump-column" }, "Add nodump stats to output", FeatureType.Flag, null); } } - private static Feature noMD5Feature - { - get - { - return new Feature( - new List() { "-nm", "--noMD5" }, - "Don't include MD5 in output", - FeatureType.Flag, - null); - } - } - private static Feature noSHA1Feature - { - get - { - return new Feature( - new List() { "-ns", "--noSHA1" }, - "Don't include SHA1 in output", - FeatureType.Flag, - null); - } - } - private static Feature noSHA256Feature - { - get - { - return new Feature( - new List() { "-ns256", "--noSHA256" }, - "Include SHA-256 in output", // TODO: Invert this later - FeatureType.Flag, - null); - } - } - private static Feature noSHA384Feature - { - get - { - return new Feature( - new List() { "-ns384", "--noSHA384" }, - "Include SHA-384 in output", // TODO: Invert this later - FeatureType.Flag, - null); - } - } - private static Feature noSHA512Feature - { - get - { - return new Feature( - new List() { "-ns512", "--noSHA512" }, - "Include SHA-512 in output", // TODO: Invert this later - FeatureType.Flag, - null); - } - } - private static Feature noStoreHeaderFeature + private static Feature noStoreHeaderFlag { get { @@ -515,29 +460,29 @@ namespace SabreTools null); } } - private static Feature notRunFeature + private static Feature notRunnableFlag { get { return new Feature( - new List() { "-nrun", "--not-run" }, + new List() { "-nrun", "--not-runnable" }, "Include only items that are marked unrunnable", FeatureType.Flag, null); } } - private static Feature ofAsGameFeature + private static Feature matchOfTagsFlag { get { return new Feature( - new List() { "-ofg", "--of-as-game" }, + new List() { "-ofg", "--match-of-tags" }, "Allow cloneof and romof tags to match game name filters", FeatureType.Flag, null); } } - private static Feature outputAllFeature + private static Feature outputAllFlag { get { @@ -548,18 +493,18 @@ namespace SabreTools null); } } - private static Feature outputAmFeature + private static Feature outputAttractmodeFlag { get { return new Feature( - new List() { "-oam", "--output-am" }, + new List() { "-oam", "--output-attractmode" }, "Output in AttractMode format", FeatureType.Flag, null); } } - private static Feature outputCmpFeature + private static Feature outputCmpFlag { get { @@ -570,7 +515,7 @@ namespace SabreTools null); } } - private static Feature outputCsvFeature + private static Feature outputCsvFlag { get { @@ -581,29 +526,29 @@ namespace SabreTools null); } } - private static Feature outputDcFeature + private static Feature outputDoscenterFlag { get { return new Feature( - new List() { "-od", "--output-dc" }, + new List() { "-od", "--output-doscenter" }, "Output in DOSCenter format", FeatureType.Flag, null); } } - private static Feature outputLrFeature + private static Feature outputListromFlag { get { return new Feature( - new List() { "-olr", "--output-lr" }, + new List() { "-olr", "--output-listrom" }, "Output in MAME Listrom format", FeatureType.Flag, null); } } - private static Feature outputMd5Feature + private static Feature outputMd5Flag { get { @@ -614,7 +559,7 @@ namespace SabreTools null); } } - private static Feature outputMissFeature + private static Feature outputMissFlag { get { @@ -632,40 +577,40 @@ namespace SabreTools }); } } - private static Feature outputOlFeature + private static Feature outputOfflinelistFlag { get { return new Feature( - new List() { "-ool", "--output-ol" }, + new List() { "-ool", "--output-offlinelist" }, "Output in OfflineList format", FeatureType.Flag, null); } } - private static Feature outputRcFeature + private static Feature outputRomcenterFlag { get { return new Feature( - new List() { "-or", "--output-rc" }, + new List() { "-or", "--output-romcenter" }, "Output in RomCenter format", FeatureType.Flag, null); } } - private static Feature outputSdFeature + private static Feature outputSabredatFlag { get { return new Feature( - new List() { "-os", "--output-sd" }, + new List() { "-os", "--output-sabredat" }, "Output in SabreDat format", FeatureType.Flag, null); } } - private static Feature outputSfvFeature + private static Feature outputSfvFlag { get { @@ -676,7 +621,7 @@ namespace SabreTools null); } } - private static Feature outputSha1Feature + private static Feature outputSha1Flag { get { @@ -687,7 +632,7 @@ namespace SabreTools null); } } - private static Feature outputSha256Feature + private static Feature outputSha256Flag { get { @@ -698,7 +643,7 @@ namespace SabreTools null); } } - private static Feature outputSha384Feature + private static Feature outputSha384Flag { get { @@ -709,7 +654,7 @@ namespace SabreTools null); } } - private static Feature outputSha512Feature + private static Feature outputSha512Flag { get { @@ -720,18 +665,18 @@ namespace SabreTools null); } } - private static Feature outputSlFeature + private static Feature outputSoftwarelistFlag { get { return new Feature( - new List() { "-osl", "--output-sl" }, + new List() { "-osl", "--output-softwarelist" }, "Output in Softwarelist format", FeatureType.Flag, null); } } - private static Feature outputTsvFeature + private static Feature outputTsvFlag { get { @@ -742,7 +687,7 @@ namespace SabreTools null); } } - private static Feature outputXmlFeature + private static Feature outputXmlFlag { get { @@ -753,7 +698,7 @@ namespace SabreTools null); } } - private static Feature quickFeature + private static Feature quickFlag { get { @@ -764,7 +709,7 @@ namespace SabreTools null); } } - private static Feature quotesFeature + private static Feature quotesFlag { get { @@ -775,95 +720,84 @@ namespace SabreTools null); } } - private static Feature remExtFeature + private static Feature removeExtensionsFlag { get { return new Feature( - new List() { "-rme", "--rem-ext" }, + new List() { "-rme", "--remove-extensions" }, "Remove all extensions from each item", FeatureType.Flag, null); } } - private static Feature remMd5Feature + private static Feature removeMd5Flag { get { return new Feature( - new List() { "-rmd5", "--rem-md5" }, + new List() { "-rmd5", "--remove-md5" }, "Remove MD5 hashes from the output", FeatureType.Flag, null); } } - private static Feature remSha1Feature + private static Feature removeSha1Flag { get { return new Feature( - new List() { "-rsha1", "--rem-sha1" }, + new List() { "-rsha1", "--remove-sha1" }, "Remove SHA-1 hashes from the output", FeatureType.Flag, null); } } - private static Feature remSha256Feature + private static Feature removeSha256Flag { get { return new Feature( - new List() { "-rsha256", "--rem-sha256" }, + new List() { "-rsha256", "--remove-sha256" }, "Remove SHA-256 hashes from the output", FeatureType.Flag, null); } } - private static Feature remSha384Feature + private static Feature removeSha384Flag { get { return new Feature( - new List() { "-rsha384", "--rem-sha384" }, + new List() { "-rsha384", "--remove-sha384" }, "Remove SHA-384 hashes from the output", FeatureType.Flag, null); } } - private static Feature remSha512Feature + private static Feature removeSha512Flag { get { return new Feature( - new List() { "-rsha512", "--rem-sha512" }, + new List() { "-rsha512", "--remove-sha512" }, "Remove SHA-512 hashes from the output", FeatureType.Flag, null); } } - private static Feature remUniFeature + private static Feature removeUnicodeFlag { get { return new Feature( - new List() { "-ru", "--rem-uni" }, + new List() { "-ru", "--remove-unicode" }, "Remove unicode characters from names", FeatureType.Flag, null); } } - private static Feature revCascadeFeature - { - get - { - return new Feature( - new List() { "-rc", "--rev-cascade" }, - "Enable reverse cascaded diffing", - FeatureType.Flag, - null); - } - } - private static Feature reverseBaseReplaceFeature + private static Feature reverseBaseReplaceFlag { get { @@ -874,7 +808,18 @@ namespace SabreTools null); } } - private static Feature rombaFeature + private static Feature reverseCascadeFlag + { + get + { + return new Feature( + new List() { "-rc", "--reverse-cascade" }, + "Enable reverse cascaded diffing", + FeatureType.Flag, + null); + } + } + private static Feature rombaFlag { get { @@ -885,7 +830,7 @@ namespace SabreTools null); } } - private static Feature romsFeature + private static Feature romsFlag { get { @@ -896,7 +841,7 @@ namespace SabreTools null); } } - private static Feature runnableFeature + private static Feature runnableFlag { get { @@ -907,7 +852,7 @@ namespace SabreTools null); } } - private static Feature scanAllFeature + private static Feature scanAllFlag { get { @@ -918,7 +863,7 @@ namespace SabreTools null); } } - private static Feature sceneDateStripFeature + private static Feature sceneDateStripFlag { get { @@ -929,7 +874,7 @@ namespace SabreTools null); } } - private static Feature shortFeature + private static Feature shortFlag { get { @@ -940,51 +885,106 @@ namespace SabreTools null); } } - private static Feature singleFeature + private static Feature singleSetFlag { get { return new Feature( - new List() { "-si", "--single" }, + new List() { "-si", "--single-set" }, "All game names replaced by '!'", FeatureType.Flag, null); } } - private static Feature skipFeature + private static Feature skipFirstOutputFlag { get { return new Feature( - new List() { "-sf", "--skip" }, + new List() { "-sf", "--skip-first-output" }, "Skip output of first DAT", FeatureType.Flag, null); } } - private static Feature skiparcFeature + private static Feature skipArchivesFlag { get { return new Feature( - new List() { "-ska", "--skiparc" }, + new List() { "-ska", "--skip-archives" }, "Skip any files that are treated like archives", FeatureType.Flag, null); } } - private static Feature skipfileFeature + private static Feature skipFilesFlag { get { return new Feature( - new List() { "-skf", "--skipfile" }, + new List() { "-skf", "--skip-files" }, "Skip any files that are not treated like archives", FeatureType.Flag, null); } } - private static Feature superdatFeature + private static Feature skipMd5Flag + { + get + { + return new Feature( + new List() { "-nm", "--skip-md5" }, + "Don't include MD5 in output", + FeatureType.Flag, + null); + } + } + private static Feature skipSha1Flag + { + get + { + return new Feature( + new List() { "-ns", "--skip-sha1" }, + "Don't include SHA1 in output", + FeatureType.Flag, + null); + } + } + private static Feature skipSha256Flag + { + get + { + return new Feature( + new List() { "-ns256", "--skip-sha256" }, + "Include SHA-256 in output", // TODO: Invert this later + FeatureType.Flag, + null); + } + } + private static Feature skipSha384Flag + { + get + { + return new Feature( + new List() { "-ns384", "--skip-sha384" }, + "Include SHA-384 in output", // TODO: Invert this later + FeatureType.Flag, + null); + } + } + private static Feature skipSha512Flag + { + get + { + return new Feature( + new List() { "-ns512", "--skip-sha512" }, + "Include SHA-512 in output", // TODO: Invert this later + FeatureType.Flag, + null); + } + } + private static Feature superdatFlag { get { @@ -995,18 +995,7 @@ namespace SabreTools null); } } - private static Feature t7zFeature - { - get - { - return new Feature( - new List() { "-t7z", "--t7z" }, - "Enable Torrent7z output", - FeatureType.Flag, - null); - } - } - private static Feature tarFeature + private static Feature tarFlag { get { @@ -1017,7 +1006,7 @@ namespace SabreTools null); } } - private static Feature textFeature + private static Feature textFlag { get { @@ -1028,51 +1017,106 @@ namespace SabreTools null); } } - private static Feature tgzFeature + private static Feature torrent7zipFlag { get { return new Feature( - new List() { "-tgz", "--tgz" }, + new List() { "-t7z", "--torrent-7zip" }, + "Enable Torrent7z output", + FeatureType.Flag, + null); + } + } + private static Feature torrentGzipFlag + { + get + { + return new Feature( + new List() { "-tgz", "--torrent-gzip" }, "Enable TorrentGZ output", FeatureType.Flag, null); } } - private static Feature tlrzFeature + private static Feature torrentLrzipFlag { get { return new Feature( - new List() { "-tlrz", "--tlrz" }, + new List() { "-tlrz", "--torrent-lrzip" }, "Enable TorrentLRZ output", FeatureType.Flag, null); } } - private static Feature tlz4Feature + private static Feature torrentLz4Flag { get { return new Feature( - new List() { "-tlz4", "--tlz4" }, + new List() { "-tlz4", "--torrent-lz4" }, "Enable TorrentLZ4 output", FeatureType.Flag, null); } } - private static Feature trarFeature + private static Feature torrentRarFlag { get { return new Feature( - new List() { "-trar", "--trar" }, + new List() { "-trar", "--torrent-rar" }, "Enable TorrentRAR output", FeatureType.Flag, null); } } - private static Feature trimFeature + private static Feature torrentXzFlag + { + get + { + return new Feature( + new List() { "-txz", "--torrent-xz" }, + "Enable TorrentXZ output", + FeatureType.Flag, + null); + } + } + private static Feature torrentZipFlag + { + get + { + return new Feature( + new List() { "-tzip", "--torrent-zip" }, + "Enable TorrentZip output", + FeatureType.Flag, + null); + } + } + private static Feature torrentZpaqFlag + { + get + { + return new Feature( + new List() { "-tzpaq", "--torrent-zpaq" }, + "Enable TorrentZPAQ output", + FeatureType.Flag, + null); + } + } + private static Feature torrentZstdFlag + { + get + { + return new Feature( + new List() { "-tzstd", "--torrent-zstd" }, + "Enable TorrentZstd output", + FeatureType.Flag, + null); + } + } + private static Feature trimFlag { get { @@ -1083,7 +1127,7 @@ namespace SabreTools null); } } - private static Feature tsvFeature + private static Feature tsvFlag { get { @@ -1094,18 +1138,7 @@ namespace SabreTools null); } } - private static Feature txzFeature - { - get - { - return new Feature( - new List() { "-txz", "--txz" }, - "Enable TorrentXZ output", - FeatureType.Flag, - null); - } - } - private static Feature typeFeature + private static Feature typeFlag { get { @@ -1116,40 +1149,7 @@ namespace SabreTools null); } } - private static Feature tzipFeature - { - get - { - return new Feature( - new List() { "-tzip", "--tzip" }, - "Enable TorrentZip output", - FeatureType.Flag, - null); - } - } - private static Feature tzpaqFeature - { - get - { - return new Feature( - new List() { "-tzpaq", "--tzpaq" }, - "Enable TorrentZPAQ output", - FeatureType.Flag, - null); - } - } - private static Feature tzstdFeature - { - get - { - return new Feature( - new List() { "-tzstd", "--tzstd" }, - "Enable TorrentZstd output", - FeatureType.Flag, - null); - } - } - private static Feature updateDatFeature + private static Feature updateDatFlag { get { @@ -1160,18 +1160,18 @@ namespace SabreTools null); } } - private static Feature updateDescFeature + private static Feature updateDescriptionFlag { get { return new Feature( - new List() { "-udd", "--update-desc" }, + new List() { "-udd", "--update-description" }, "Update machine descriptions from base DATs", FeatureType.Flag, null); } } - private static Feature updateHashesFeature + private static Feature updateHashesFlag { get { @@ -1182,18 +1182,18 @@ namespace SabreTools null); } } - private static Feature updateManuFeature + private static Feature updateManufacturerFlag { get { return new Feature( - new List() { "-um", "--update-manu" }, + new List() { "-um", "--update-manufacturer" }, "Update machine manufacturers from base DATs", FeatureType.Flag, null); } } - private static Feature updateNamesFeature + private static Feature updateNamesFlag { get { @@ -1204,7 +1204,7 @@ namespace SabreTools null); } } - private static Feature updateYearFeature + private static Feature updateYearFlag { get { @@ -1934,36 +1934,36 @@ namespace SabreTools "Create DAT(s) from an input directory", FeatureType.Flag, null); - datFromDir.AddFeature("noMD5", noMD5Feature); - datFromDir.AddFeature("noSHA1", noSHA1Feature); - datFromDir.AddFeature("noSHA256", noSHA256Feature); - datFromDir.AddFeature("noSHA384", noSHA384Feature); - datFromDir.AddFeature("noSHA512", noSHA512Feature); - datFromDir.AddFeature("bare", bareFeature); + datFromDir.AddFeature("skip-md5", skipMd5Flag); + datFromDir.AddFeature("skip-sha1", skipSha1Flag); + datFromDir.AddFeature("skip-sha256", skipSha256Flag); + datFromDir.AddFeature("skip-sha384", skipSha384Flag); + datFromDir.AddFeature("skip-sha512", skipSha512Flag); + datFromDir.AddFeature("no-automatic-date", noAutomaticDateFlag); datFromDir.AddFeature("forcepack", forcepackFeature); - datFromDir.AddFeature("files", filesFeature); - datFromDir.AddFeature("output-all", outputAllFeature); - datFromDir.AddFeature("output-am", outputAmFeature); - datFromDir.AddFeature("output-cmp", outputCmpFeature); - datFromDir.AddFeature("output-csv", outputCsvFeature); - datFromDir.AddFeature("output-dc", outputDcFeature); - datFromDir.AddFeature("output-lr", outputLrFeature); - datFromDir.AddFeature("output-miss", outputMissFeature); - datFromDir.AddFeature("output-md5", outputMd5Feature); - datFromDir.AddFeature("output-ol", outputOlFeature); - datFromDir.AddFeature("output-rc", outputRcFeature); - datFromDir.AddFeature("output-sd", outputSdFeature); - datFromDir.AddFeature("output-sfv", outputSfvFeature); - datFromDir.AddFeature("output-sha1", outputSha1Feature); - datFromDir.AddFeature("output-sha256", outputSha256Feature); - datFromDir.AddFeature("output-sha384", outputSha384Feature); - datFromDir.AddFeature("output-sha512", outputSha512Feature); - datFromDir.AddFeature("output-sl", outputSlFeature); - datFromDir.AddFeature("output-tsv", outputTsvFeature); - datFromDir.AddFeature("output-xml", outputXmlFeature); - datFromDir.AddFeature("romba", rombaFeature); - datFromDir.AddFeature("skiparc", skiparcFeature); - datFromDir.AddFeature("skipfile", skipfileFeature); + datFromDir.AddFeature("archives-as-files", archivesAsFilesFlag); + datFromDir.AddFeature("output-all", outputAllFlag); + datFromDir.AddFeature("output-attractmode", outputAttractmodeFlag); + datFromDir.AddFeature("output-cmp", outputCmpFlag); + datFromDir.AddFeature("output-csv", outputCsvFlag); + datFromDir.AddFeature("output-doscenter", outputDoscenterFlag); + datFromDir.AddFeature("output-listrom", outputListromFlag); + datFromDir.AddFeature("output-miss", outputMissFlag); + datFromDir.AddFeature("output-md5", outputMd5Flag); + datFromDir.AddFeature("output-offlinelist", outputOfflinelistFlag); + datFromDir.AddFeature("output-romcenter", outputRomcenterFlag); + datFromDir.AddFeature("output-sabredat", outputSabredatFlag); + datFromDir.AddFeature("output-sfv", outputSfvFlag); + datFromDir.AddFeature("output-sha1", outputSha1Flag); + datFromDir.AddFeature("output-sha256", outputSha256Flag); + datFromDir.AddFeature("output-sha384", outputSha384Flag); + datFromDir.AddFeature("output-sha512", outputSha512Flag); + datFromDir.AddFeature("output-softwarelist", outputSoftwarelistFlag); + datFromDir.AddFeature("output-tsv", outputTsvFlag); + datFromDir.AddFeature("output-xml", outputXmlFlag); + datFromDir.AddFeature("romba", rombaFlag); + datFromDir.AddFeature("skip-archives", skipArchivesFlag); + datFromDir.AddFeature("skip-files", skipFilesFlag); datFromDir.AddFeature("filename", filenameFeature); datFromDir.AddFeature("name", nameFeature); datFromDir.AddFeature("desc", descriptionFeature); @@ -1974,14 +1974,14 @@ namespace SabreTools datFromDir.AddFeature("homepage", homepageFeature); datFromDir.AddFeature("url", urlFeature); datFromDir.AddFeature("comment", commentFeature); - datFromDir.AddFeature("superdat", superdatFeature); - datFromDir.AddFeature("exclude-of", excludeOfFeature); - datFromDir.AddFeature("scene-date-strip", sceneDateStripFeature); - datFromDir.AddFeature("add-blank", addBlankFeature); - datFromDir.AddFeature("add-date", addDateFeature); - datFromDir.AddFeature("copy-files", copyFilesFeature); + datFromDir.AddFeature("superdat", superdatFlag); + datFromDir.AddFeature("exclude-of", excludeOfFlag); + datFromDir.AddFeature("scene-date-strip", sceneDateStripFlag); + datFromDir.AddFeature("add-blank-files", addBlankFilesFlag); + datFromDir.AddFeature("add-date", addDateFlag); + datFromDir.AddFeature("copy-files", copyFilesFlag); datFromDir.AddFeature("header", headerFeature); - datFromDir.AddFeature("ignore-chd", ignoreChdFeature); + datFromDir.AddFeature("chds-as-files", chdsAsFilesFlag); datFromDir.AddFeature("temp", tempFeature); datFromDir.AddFeature("out", outFeature); datFromDir.AddFeature("mt", mtFeature); @@ -1996,7 +1996,7 @@ namespace SabreTools FeatureType.Flag, null); extract.AddFeature("out", outFeature); - extract.AddFeature("no-store-header", noStoreHeaderFeature); + extract.AddFeature("no-store-header", noStoreHeaderFlag); #endregion @@ -2027,34 +2027,35 @@ namespace SabreTools }); sort.AddFeature("dat", datFeature); sort.AddFeature("out", outFeature); - sort.AddFeature("depot", depotFeature); - sort.AddFeature("delete", deleteFeature); - sort.AddFeature("inverse", inverseFeature); - sort.AddFeature("quick", quickFeature); - sort.AddFeature("ignore-chd", ignoreChdFeature); - sort.AddFeature("add-date", addDateFeature); - sort.AddFeature("t7z", t7zFeature); - sort.AddFeature("tar", tarFeature); - sort.AddFeature("tgz", tgzFeature); - sort["tgz"].AddFeature("romba", rombaFeature); - //sort.AddFeature("tlrz", tlrzFeature); - //sort.AddFeature("tlz4", tlz4Feature); - //sort.AddFeature("trar", trarFeature); - //sort.AddFeature("txz", txzFeature); - sort.AddFeature("tzip", tzipFeature); - //sort.AddFeature("tzpaq", tzpaqFeature); - //sort.AddFeature("tzstd", tzstdFeature); + sort.AddFeature("depot", depotFlag); + sort.AddFeature("delete", deleteFlag); + sort.AddFeature("inverse", inverseFlag); + sort.AddFeature("quick", quickFlag); + sort.AddFeature("chds-as-files", chdsAsFilesFlag); + sort.AddFeature("add-date", addDateFlag); + sort.AddFeature("torrent-7zip", torrent7zipFlag); + sort.AddFeature("tar", tarFlag); + sort.AddFeature("torrent-gzip", torrentGzipFlag); + sort["tgz"].AddFeature("romba", rombaFlag); + //sort.AddFeature("torrent-lrzip", tlrzFeature); + //sort.AddFeature("torrent-lz4", tlz4Feature); + //sort.AddFeature("torrent-rar", trarFeature); + //sort.AddFeature("torrent-xz", txzFeature); + sort.AddFeature("torrent-zip", torrentZipFlag); + //sort.AddFeature("torrent-zpaq", tzpaqFeature); + //sort.AddFeature("torrent-zstd", tzstdFeature); sort.AddFeature("header", headerFeature); sort.AddFeature("7z", sevenZipFeature); sort.AddFeature("gz", gzFeature); sort.AddFeature("rar", rarFeature); sort.AddFeature("zip", zipFeature); - sort.AddFeature("scan-all", scanAllFeature); - sort.AddFeature("dat-merged", datMergedFeature); - sort.AddFeature("dat-split", datSplitFeature); - sort.AddFeature("dat-nonmerged", datNonmergedFeature); - sort.AddFeature("dat-fullnonmerged", datFullnonmergedFeature); - sort.AddFeature("update-dat", updateDatFeature); + sort.AddFeature("scan-all", scanAllFlag); + sort.AddFeature("dat-merged", datMergedFlag); + sort.AddFeature("dat-split", datSplitFlag); + sort.AddFeature("dat-non-merged", datNonMergedFlag); + sort.AddFeature("dat-device-non-merged", datDeviceNonMergedFlag); + sort.AddFeature("dat-full-non-merged", datFullNonMergedFlag); + sort.AddFeature("update-dat", updateDatFlag); sort.AddFeature("mt", mtFeature); #endregion @@ -2066,35 +2067,35 @@ namespace SabreTools "Split input DATs by a given criteria", FeatureType.Flag, null); - split.AddFeature("output-all", outputAllFeature); - split.AddFeature("output-am", outputAmFeature); - split.AddFeature("output-cmp", outputCmpFeature); - split.AddFeature("output-csv", outputCsvFeature); - split.AddFeature("output-dc", outputDcFeature); - split.AddFeature("output-lr", outputLrFeature); - split.AddFeature("output-miss", outputMissFeature); - split.AddFeature("output-md5", outputMd5Feature); - split.AddFeature("output-ol", outputOlFeature); - split.AddFeature("output-rc", outputRcFeature); - split.AddFeature("output-sd", outputSdFeature); - split.AddFeature("output-sfv", outputSfvFeature); - split.AddFeature("output-sha1", outputSha1Feature); - split.AddFeature("output-sha256", outputSha256Feature); - split.AddFeature("output-sha384", outputSha384Feature); - split.AddFeature("output-sha512", outputSha512Feature); - split.AddFeature("output-sl", outputSlFeature); - split.AddFeature("output-tsv", outputTsvFeature); - split.AddFeature("output-xml", outputXmlFeature); + split.AddFeature("output-all", outputAllFlag); + split.AddFeature("output-attractmode", outputAttractmodeFlag); + split.AddFeature("output-cmp", outputCmpFlag); + split.AddFeature("output-csv", outputCsvFlag); + split.AddFeature("output-doscenter", outputDoscenterFlag); + split.AddFeature("output-listrom", outputListromFlag); + split.AddFeature("output-miss", outputMissFlag); + split.AddFeature("output-md5", outputMd5Flag); + split.AddFeature("output-offlinelist", outputOfflinelistFlag); + split.AddFeature("output-romcenter", outputRomcenterFlag); + split.AddFeature("output-sabredat", outputSabredatFlag); + split.AddFeature("output-sfv", outputSfvFlag); + split.AddFeature("output-sha1", outputSha1Flag); + split.AddFeature("output-sha256", outputSha256Flag); + split.AddFeature("output-sha384", outputSha384Flag); + split.AddFeature("output-sha512", outputSha512Flag); + split.AddFeature("output-softwarelist", outputSoftwarelistFlag); + split.AddFeature("output-tsv", outputTsvFlag); + split.AddFeature("output-xml", outputXmlFlag); split.AddFeature("out", outFeature); - split.AddFeature("inplace", inplaceFeature); - split.AddFeature("ext", extFeature); + split.AddFeature("inplace", inplaceFlag); + split.AddFeature("extension", extensionFlag); split["ext"].AddFeature("exta", extaFeature); split["ext"].AddFeature("extb", extbFeature); - split.AddFeature("hash", hashFeature); - split.AddFeature("level", levelFeature); - split["level"].AddFeature("short", shortFeature); - split["level"].AddFeature("base", baseFeature); - split.AddFeature("type", typeFeature); + split.AddFeature("hash", hashFlag); + split.AddFeature("level", levelFlag); + split["level"].AddFeature("short", shortFlag); + split["level"].AddFeature("base", baseFlag); + split.AddFeature("type", typeFlag); #endregion @@ -2105,16 +2106,16 @@ namespace SabreTools "Get statistics on all input DATs", FeatureType.Flag, null); - stats.AddFeature("all-stats", allStatsFeature); - stats.AddFeature("baddump-col", baddumpColFeature); - stats.AddFeature("csv", csvFeature); + stats.AddFeature("all-stats", allStatsFlag); + stats.AddFeature("baddump-column", baddumpColumnFlag); + stats.AddFeature("csv", csvFlag); stats.AddFeature("filename", filenameFeature); stats.AddFeature("out", outFeature); - stats.AddFeature("html", htmlFeature); - stats.AddFeature("nodump-col", nodumpColFeature); - stats.AddFeature("individual", individualFeature); - stats.AddFeature("tsv", tsvFeature); - stats.AddFeature("text", textFeature); + stats.AddFeature("html", htmlFlag); + stats.AddFeature("nodump-col", nodumpColumnFlag); + stats.AddFeature("individual", individualFlag); + stats.AddFeature("tsv", tsvFlag); + stats.AddFeature("text", textFlag); #endregion @@ -2138,46 +2139,46 @@ namespace SabreTools "Most of the filter parameters allow for multiple inputs:", " e.g. --game-name=foo --game-name=bar", }); - update.AddFeature("output-all", outputAllFeature); - update.AddFeature("output-am", outputAmFeature); - update.AddFeature("output-cmp", outputCmpFeature); - update.AddFeature("output-csv", outputCsvFeature); + update.AddFeature("output-all", outputAllFlag); + update.AddFeature("output-attractmode", outputAttractmodeFlag); + update.AddFeature("output-cmp", outputCmpFlag); + update.AddFeature("output-csv", outputCsvFlag); update["output-csv"].AddFeature("prefix", prefixFeature); update["output-csv"].AddFeature("postfix", postfixFeature); - update["output-csv"].AddFeature("quotes", quotesFeature); - update.AddFeature("output-dc", outputDcFeature); - update.AddFeature("output-lr", outputLrFeature); - update.AddFeature("output-miss", outputMissFeature); - update["output-miss"].AddFeature("roms", romsFeature); - update["output-miss"].AddFeature("game-prefix", gamePrefixFeature); + update["output-csv"].AddFeature("quotes", quotesFlag); + update.AddFeature("output-doscenter", outputDoscenterFlag); + update.AddFeature("output-listrom", outputListromFlag); + update.AddFeature("output-miss", outputMissFlag); + update["output-miss"].AddFeature("roms", romsFlag); + update["output-miss"].AddFeature("game-prefix", gamePrefixFlag); update["output-miss"].AddFeature("prefix", prefixFeature); update["output-miss"].AddFeature("postfix", postfixFeature); - update["output-miss"].AddFeature("quotes", quotesFeature); + update["output-miss"].AddFeature("quotes", quotesFlag); update["output-miss"].AddFeature("add-ext", addExtFeature); update["output-miss"].AddFeature("rep-ext", repExtFeature); - update["output-miss"].AddFeature("rem-ext", remExtFeature); - update["output-miss"].AddFeature("romba", rombaFeature); - update.AddFeature("output-md5", outputMd5Feature); - update["output-md5"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-ol", outputOlFeature); - update.AddFeature("output-rc", outputRcFeature); - update.AddFeature("output-sd", outputSdFeature); - update.AddFeature("output-sfv", outputSfvFeature); - update["output-sfv"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-sha1", outputSha1Feature); - update["output-sha1"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-sha256", outputSha256Feature); - update["output-sha256"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-sha384", outputSha384Feature); - update["output-sha384"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-sha512", outputSha512Feature); - update["output-sha512"].AddFeature("game-prefix", gamePrefixFeature); - update.AddFeature("output-sl", outputSlFeature); - update.AddFeature("output-tsv", outputTsvFeature); + update["output-miss"].AddFeature("remove-extensions", removeExtensionsFlag); + update["output-miss"].AddFeature("romba", rombaFlag); + update.AddFeature("output-md5", outputMd5Flag); + update["output-md5"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-offlinelist", outputOfflinelistFlag); + update.AddFeature("output-romcenter", outputRomcenterFlag); + update.AddFeature("output-sabredat", outputSabredatFlag); + update.AddFeature("output-sfv", outputSfvFlag); + update["output-sfv"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-sha1", outputSha1Flag); + update["output-sha1"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-sha256", outputSha256Flag); + update["output-sha256"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-sha384", outputSha384Flag); + update["output-sha384"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-sha512", outputSha512Flag); + update["output-sha512"].AddFeature("game-prefix", gamePrefixFlag); + update.AddFeature("output-softwarelist", outputSoftwarelistFlag); + update.AddFeature("output-tsv", outputTsvFlag); update["output-tsv"].AddFeature("prefix", prefixFeature); update["output-tsv"].AddFeature("postfix", postfixFeature); - update["output-tsv"].AddFeature("quotes", quotesFeature); - update.AddFeature("output-xml", outputXmlFeature); + update["output-tsv"].AddFeature("quotes", quotesFlag); + update.AddFeature("output-xml", outputXmlFlag); update.AddFeature("filename", filenameFeature); update.AddFeature("name", nameFeature); update.AddFeature("desc", descriptionFeature); @@ -2191,63 +2192,63 @@ namespace SabreTools update.AddFeature("url", urlFeature); update.AddFeature("comment", commentFeature); update.AddFeature("header", headerFeature); - update.AddFeature("superdat", superdatFeature); + update.AddFeature("superdat", superdatFlag); update.AddFeature("forcemerge", forcemergeFeature); update.AddFeature("forcend", forcendFeature); update.AddFeature("forcepack", forcepackFeature); - update.AddFeature("exclude-of", excludeOfFeature); - update.AddFeature("scene-date-strip", sceneDateStripFeature); - update.AddFeature("clean", cleanFeature); - update.AddFeature("rem-uni", remUniFeature); - update.AddFeature("rem-md5", remMd5Feature); - update.AddFeature("rem-sha1", remSha1Feature); - update.AddFeature("rem-sha256", remSha256Feature); - update.AddFeature("rem-sha384", remSha384Feature); - update.AddFeature("rem-sha512", remSha512Feature); - update.AddFeature("desc-name", descNameFeature); - update.AddFeature("dat-merged", datMergedFeature); - update.AddFeature("dat-split", datSplitFeature); - update.AddFeature("dat-nonmerged", datNonmergedFeature); - update.AddFeature("dat-devnonmerged", datDevnonmergedFeature); - update.AddFeature("dat-fullnonmerged", datFullnonmergedFeature); - update.AddFeature("trim", trimFeature); + update.AddFeature("exclude-of", excludeOfFlag); + update.AddFeature("scene-date-strip", sceneDateStripFlag); + update.AddFeature("clean", cleanFlag); + update.AddFeature("remove-uni", removeUnicodeFlag); + update.AddFeature("remove-md5", removeMd5Flag); + update.AddFeature("remove-sha1", removeSha1Flag); + update.AddFeature("remove-sha256", removeSha256Flag); + update.AddFeature("remove-sha384", removeSha384Flag); + update.AddFeature("remove-sha512", removeSha512Flag); + update.AddFeature("description-as-name", descriptionAsNameFlag); + update.AddFeature("dat-merged", datMergedFlag); + update.AddFeature("dat-split", datSplitFlag); + update.AddFeature("dat-non-merged", datNonMergedFlag); + update.AddFeature("dat-device-non-merged", datDeviceNonMergedFlag); + update.AddFeature("dat-full-non-merged", datFullNonMergedFlag); + update.AddFeature("trim", trimFlag); update["trim"].AddFeature("root-dir", rootDirFeature); - update.AddFeature("single", singleFeature); - update.AddFeature("dedup", dedupFeature); - update.AddFeature("game-dedup", gameDedupFeature); - update.AddFeature("merge", mergeFeature); - update["merge"].AddFeature("bare", bareFeature); - update.AddFeature("diff", diffFeature); - update["diff"].AddFeature("against", againstFeature); + update.AddFeature("single-set", singleSetFlag); + update.AddFeature("dedup", dedupFlag); + update.AddFeature("game-dedup", gameDedupFlag); + update.AddFeature("merge", mergeFlag); + update["merge"].AddFeature("no-automatic-date", noAutomaticDateFlag); + update.AddFeature("diff", diffFlag); + update["diff"].AddFeature("against", againstFlag); update["diff"]["against"].AddFeature("base-dat", baseDatFeature); - update["diff"].AddFeature("bare", bareFeature); - update["diff"].AddFeature("cascade", cascadeFeature); - update["diff"]["cascade"].AddFeature("skip", skipFeature); - update["diff"].AddFeature("rev-cascade", revCascadeFeature); - update["diff"]["rev-cascade"].AddFeature("skip", skipFeature); - update.AddFeature("diff-du", diffDuFeature); - update["diff-du"].AddFeature("bare", bareFeature); - update.AddFeature("diff-in", diffInFeature); - update["diff-in"].AddFeature("bare", bareFeature); - update.AddFeature("diff-nd", diffNdFeature); - update["diff-nd"].AddFeature("bare", bareFeature); - update.AddFeature("base-replace", baseReplaceFeature); + update["diff"].AddFeature("no-automatic-date", noAutomaticDateFlag); + update["diff"].AddFeature("cascade", cascadeFlag); + update["diff"]["cascade"].AddFeature("skip-first-output", skipFirstOutputFlag); + update["diff"].AddFeature("reverse-cascade", reverseCascadeFlag); + update["diff"]["rev-cascade"].AddFeature("skip-first-output", skipFirstOutputFlag); + update.AddFeature("diff-du", diffDuFlag); + update["diff-du"].AddFeature("no-automatic-date", noAutomaticDateFlag); + update.AddFeature("diff-in", diffInFlag); + update["diff-in"].AddFeature("no-automatic-date", noAutomaticDateFlag); + update.AddFeature("diff-nd", diffNdFlag); + update["diff-nd"].AddFeature("no-automatic-date", noAutomaticDateFlag); + update.AddFeature("base-replace", baseReplaceFlag); update["base-replace"].AddFeature("base-dat", baseDatFeature); - update["base-replace"].AddFeature("update-names", updateNamesFeature); - update["base-replace"].AddFeature("update-hashes", updateHashesFeature); - update["base-replace"].AddFeature("update-desc", updateDescFeature); - update["base-replace"].AddFeature("update-year", updateYearFeature); - update["base-replace"].AddFeature("update-manu", updateManuFeature); - update.AddFeature("reverse-base-replace", reverseBaseReplaceFeature); + update["base-replace"].AddFeature("update-names", updateNamesFlag); + update["base-replace"].AddFeature("update-hashes", updateHashesFlag); + update["base-replace"].AddFeature("update-description", updateDescriptionFlag); + update["base-replace"].AddFeature("update-year", updateYearFlag); + update["base-replace"].AddFeature("update-manufacturer", updateManufacturerFlag); + update.AddFeature("reverse-base-replace", reverseBaseReplaceFlag); update["reverse-base-replace"].AddFeature("base-dat", baseDatFeature); - update["reverse-base-replace"].AddFeature("update-names", updateNamesFeature); - update["reverse-base-replace"].AddFeature("update-hashes", updateHashesFeature); - update["reverse-base-replace"].AddFeature("update-desc", updateDescFeature); - update["reverse-base-replace"].AddFeature("update-year", updateYearFeature); - update["reverse-base-replace"].AddFeature("update-manu", updateManuFeature); + update["reverse-base-replace"].AddFeature("update-names", updateNamesFlag); + update["reverse-base-replace"].AddFeature("update-hashes", updateHashesFlag); + update["reverse-base-replace"].AddFeature("update-description", updateDescriptionFlag); + update["reverse-base-replace"].AddFeature("update-year", updateYearFlag); + update["reverse-base-replace"].AddFeature("update-manufacturer", updateManufacturerFlag); update.AddFeature("game-name", gameNameFeature); update.AddFeature("not-game", notGameFeature); - update.AddFeature("of-as-game", ofAsGameFeature); + update.AddFeature("match-of-tags", matchOfTagsFlag); update.AddFeature("rom-name", romNameFeature); update.AddFeature("not-rom", notRomFeature); update.AddFeature("rom-type", romTypeFeature); @@ -2271,10 +2272,10 @@ namespace SabreTools update.AddFeature("not-status", notStatusFeature); update.AddFeature("game-type", gameTypeFeature); update.AddFeature("not-gtype", notGtypeFeature); - update.AddFeature("runnable", runnableFeature); - update.AddFeature("not-run", notRunFeature); + update.AddFeature("runnable", runnableFlag); + update.AddFeature("not-runnable", notRunnableFlag); update.AddFeature("out", outFeature); - update.AddFeature("inplace", inplaceFeature); + update.AddFeature("inplace", inplaceFlag); update.AddFeature("mt", mtFeature); #endregion @@ -2287,16 +2288,17 @@ namespace SabreTools FeatureType.Flag, null); verify.AddFeature("dat", datFeature); - verify.AddFeature("depot", depotFeature); + verify.AddFeature("depot", depotFlag); verify.AddFeature("temp", tempFeature); - verify.AddFeature("hash-only", hashOnlyFeature); - verify.AddFeature("quick", quickFeature); + verify.AddFeature("hash-only", hashOnlyFlag); + verify.AddFeature("quick", quickFlag); verify.AddFeature("header", headerFeature); - verify.AddFeature("ignore-chd", ignoreChdFeature); - verify.AddFeature("dat-merged", datMergedFeature); - verify.AddFeature("dat-split", datSplitFeature); - verify.AddFeature("dat-nonmerged", datNonmergedFeature); - verify.AddFeature("dat-fullnonmerged", datFullnonmergedFeature); + verify.AddFeature("chds-as-files", chdsAsFilesFlag); + verify.AddFeature("dat-merged", datMergedFlag); + verify.AddFeature("dat-split", datSplitFlag); + verify.AddFeature("dat-device-non-merged", datDeviceNonMergedFlag); + verify.AddFeature("dat-non-merged", datNonMergedFlag); + verify.AddFeature("dat-full-non-merged", datFullNonMergedFlag); #endregion diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs index c7766c00..d61c779f 100644 --- a/SabreTools/SabreTools.cs +++ b/SabreTools/SabreTools.cs @@ -72,7 +72,7 @@ namespace SabreTools } // User flags - bool addBlankFilesForEmptyFolder = false, + bool addBlankFiles = false, addFileDates = false, archivesAsFiles = false, basedat = false, @@ -86,14 +86,14 @@ namespace SabreTools individual = false, inplace = false, inverse = false, + noAutomaticDate = false, nostore = false, quickScan = false, - removeDateFromAutomaticName = false, removeUnicode = false, showBaddumpColumn = false, showNodumpColumn = false, shortname = false, - skip = false, + skipFirstOutput = false, updateDat = false; Hash omitFromScan = Hash.DeepHashes; // TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually OutputFormat outputFormat = OutputFormat.Folder; @@ -180,8 +180,8 @@ namespace SabreTools switch (feat.Key) { // User flags - case "add-blank": - addBlankFilesForEmptyFolder = true; + case "add-blank-files": + addBlankFiles = true; break; case "add-date": addFileDates = true; @@ -192,11 +192,11 @@ namespace SabreTools case "all-stats": statDatFormat = StatReportFormat.All; break; - case "baddump-col": - showBaddumpColumn = true; + case "archives-as-files": + archivesAsFiles = true; break; - case "bare": - removeDateFromAutomaticName = true; + case "baddump-column": + showBaddumpColumn = true; break; case "base": basedat = true; @@ -207,6 +207,9 @@ namespace SabreTools case "cascade": updateMode |= UpdateMode.DiffCascade; break; + case "chds-as-Files": + chdsAsFiles = true; + break; case "copy-files": copyFiles = true; break; @@ -216,16 +219,16 @@ namespace SabreTools case "csv": statDatFormat |= StatReportFormat.CSV; break; - case "dat-devnonmerged": + case "dat-device-non-merged": splitType = SplitType.DeviceNonMerged; break; - case "dat-fullnonmerged": + case "dat-full-non-merged": splitType = SplitType.FullNonMerged; break; case "dat-merged": splitType = SplitType.Merged; break; - case "dat-nonmerged": + case "dat-non-merged": splitType = SplitType.NonMerged; break; case "dat-split": @@ -240,7 +243,7 @@ namespace SabreTools case "depot": depot = true; break; - case "desc-name": + case "description-as-name": descAsName = true; break; case "diff": @@ -258,12 +261,9 @@ namespace SabreTools case "exclude-of": datHeader.ExcludeOf = true; break; - case "ext": + case "extension": splittingMode |= SplittingMode.Extension; break; - case "files": - archivesAsFiles = true; - break; case "game-dedup": datHeader.DedupeRoms = DedupeType.Game; break; @@ -279,9 +279,6 @@ namespace SabreTools case "html": statDatFormat |= StatReportFormat.HTML; break; - case "ignore-chd": - chdsAsFiles = true; - break; case "individual": individual = true; break; @@ -294,40 +291,28 @@ namespace SabreTools case "level": splittingMode |= SplittingMode.Level; break; + case "match-of-tags": + filter.IncludeOfInGame = true; + break; case "merge": updateMode |= UpdateMode.Merge; break; - case "nodump-col": + case "no-automatic-date": + noAutomaticDate = true; + break; + case "nodump-column": showNodumpColumn = true; break; - case "noMD5": - omitFromScan |= Hash.MD5; - break; - case "noSHA1": - omitFromScan |= Hash.SHA1; - break; - case "noSHA256": - omitFromScan &= ~Hash.SHA256; // This needs to be inverted later - break; - case "noSHA384": - omitFromScan &= ~Hash.SHA384; // This needs to be inverted later - break; - case "noSHA512": - omitFromScan &= ~Hash.SHA512; // This needs to be inverted later - break; - case "not-run": + case "not-runnable": filter.Runnable = false; break; case "no-store-header": nostore = true; break; - case "of-as-game": - filter.IncludeOfInGame = true; - break; case "output-all": datHeader.DatFormat |= DatFormat.ALL; break; - case "output-am": + case "output-attractmode": datHeader.DatFormat |= DatFormat.AttractMode; break; case "output-cmp": @@ -336,11 +321,11 @@ namespace SabreTools case "output-csv": datHeader.DatFormat |= DatFormat.CSV; break; - case "output-dc": + case "output-doscenter": datHeader.DatFormat |= DatFormat.DOSCenter; break; - case "output-lr": - datHeader.DatFormat |= DatFormat.Listroms; + case "output-listrom": + datHeader.DatFormat |= DatFormat.Listrom; break; case "output-miss": datHeader.DatFormat |= DatFormat.MissFile; @@ -348,13 +333,13 @@ namespace SabreTools case "output-md5": datHeader.DatFormat |= DatFormat.RedumpMD5; break; - case "output-ol": + case "output-offlinelist": datHeader.DatFormat |= DatFormat.OfflineList; break; - case "output-rc": + case "output-romcenter": datHeader.DatFormat |= DatFormat.RomCenter; break; - case "output-sd": + case "output-sabredat": datHeader.DatFormat |= DatFormat.SabreDat; break; case "output-sfv": @@ -372,7 +357,7 @@ namespace SabreTools case "output-sha512": datHeader.DatFormat |= DatFormat.RedumpSHA512; break; - case "output-sl": + case "output-softwarelist": datHeader.DatFormat |= DatFormat.SoftwareList; break; case "output-tsv": @@ -387,33 +372,33 @@ namespace SabreTools case "quotes": datHeader.Quotes = true; break; - case "rem-md5": + case "remove-extensions": + datHeader.RemoveExtension = true; + break; + case "remove-md5": datHeader.StripHash |= Hash.MD5; break; - case "rem-sha1": + case "remove-sha1": datHeader.StripHash |= Hash.SHA1; break; - case "rem-sha256": + case "remove-sha256": datHeader.StripHash |= Hash.SHA256; break; - case "rem-sha384": + case "remove-sha384": datHeader.StripHash |= Hash.SHA384; break; - case "rem-sha512": + case "remremovesha512": datHeader.StripHash |= Hash.SHA512; break; - case "rem-uni": + case "remove-unicode": removeUnicode = true; break; case "reverse-base-name": updateMode |= UpdateMode.ReverseBaseReplace; break; - case "rev-cascade": + case "reverse-cascade": updateMode |= UpdateMode.DiffReverseCascade; break; - case "rem-ext": - datHeader.RemoveExtension = true; - break; case "romba": datHeader.Romba = true; break; @@ -423,9 +408,6 @@ namespace SabreTools case "runnable": filter.Runnable = true; break; - case "short": - shortname = true; - break; case "scan-all": sevenzip = 0; gz = 0; @@ -435,42 +417,72 @@ namespace SabreTools case "scene-date-strip": datHeader.SceneDateStrip = true; break; - case "skip": - skip = true; + case "short": + shortname = true; break; - case "skiparc": + case "skip-archives": skipFileType = SkipFileType.Archive; break; - case "skipfile": + case "skip-files": skipFileType = SkipFileType.File; break; - case "single": + case "skip-first-output": + skipFirstOutput = true; + break; + case "skip-md5": + omitFromScan |= Hash.MD5; + break; + case "skip-sha1": + omitFromScan |= Hash.SHA1; + break; + case "skip-sha256": + omitFromScan &= ~Hash.SHA256; // This needs to be inverted later + break; + case "skip-sha384": + omitFromScan &= ~Hash.SHA384; // This needs to be inverted later + break; + case "skip-sha512": + omitFromScan &= ~Hash.SHA512; // This needs to be inverted later + break; + case "single-set": filter.Single = true; break; case "superdat": datHeader.Type = "SuperDAT"; break; - case "t7z": - outputFormat = OutputFormat.Torrent7Zip; - break; case "tar": outputFormat = OutputFormat.TapeArchive; break; case "text": statDatFormat |= StatReportFormat.Textfile; break; - case "tgz": + case "torrent-7zip": + outputFormat = OutputFormat.Torrent7Zip; + break; + case "torrent-gzip": outputFormat = OutputFormat.TorrentGzip; break; - case "tlrz": + case "torrent-lrzip": outputFormat = OutputFormat.TorrentLRZip; break; - case "tlz4": + case "torrent-lz4": outputFormat = OutputFormat.TorrentLZ4; break; - case "trar": + case "torrent-rar": outputFormat = OutputFormat.TorrentRar; break; + case "torrent-xz": + outputFormat = OutputFormat.TorrentXZ; + break; + case "torrent-zip": + outputFormat = OutputFormat.TorrentZip; + break; + case "torrent-zpaq": + outputFormat = OutputFormat.TorrentZPAQ; + break; + case "torrent-zstd": + outputFormat = OutputFormat.TorrentZstd; + break; case "trim": filter.Trim = true; break; @@ -480,28 +492,16 @@ namespace SabreTools case "type": splittingMode |= SplittingMode.Type; break; - case "txz": - outputFormat = OutputFormat.TorrentXZ; - break; - case "tzip": - outputFormat = OutputFormat.TorrentZip; - break; - case "tzpaq": - outputFormat = OutputFormat.TorrentZPAQ; - break; - case "tzstd": - outputFormat = OutputFormat.TorrentZstd; - break; case "update-dat": updateDat = true; break; - case "update-desc": + case "update-description": replaceMode |= ReplaceMode.Description; break; case "update-hashes": replaceMode |= ReplaceMode.Hash; break; - case "update-manu": + case "update-manufacturer": replaceMode |= ReplaceMode.Manufacturer; break; case "update-names": @@ -711,8 +711,8 @@ namespace SabreTools // Create a DAT from a directory or set of directories case "DATFromDir": VerifyInputs(inputs, feature); - InitDatFromDir(inputs, datHeader, omitFromScan, removeDateFromAutomaticName, archivesAsFiles, chdsAsFiles, - skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, outDir, copyFiles); + InitDatFromDir(inputs, datHeader, omitFromScan, noAutomaticDate, archivesAsFiles, chdsAsFiles, + skipFileType, addBlankFiles, addFileDates, tempDir, outDir, copyFiles); break; // If we're in header extract and remove mode case "Extract": @@ -745,7 +745,7 @@ namespace SabreTools // Convert, update, merge, diff, and filter a DAT or folder of DATs case "Update": VerifyInputs(inputs, feature); - InitUpdate(inputs, basePaths, datHeader, updateMode, inplace, skip, removeDateFromAutomaticName, filter, + InitUpdate(inputs, basePaths, datHeader, updateMode, inplace, skipFirstOutput, noAutomaticDate, filter, splitType, outDir, cleanGameNames, removeUnicode, descAsName, replaceMode); break; // If we're using the verifier