diff --git a/RombaSharp/RombaSharp.Help.cs b/RombaSharp/RombaSharp.Help.cs index e3c62d02..ad13fe96 100644 --- a/RombaSharp/RombaSharp.Help.cs +++ b/RombaSharp/RombaSharp.Help.cs @@ -22,6 +22,7 @@ namespace RombaSharp // Create the Help feature Feature helpFeature = new Feature( + "Help", new List() { "-?", "-h", "--help" }, "Show this help", FeatureType.Flag, @@ -29,11 +30,13 @@ namespace RombaSharp // Create the Archive feature Feature archive = new Feature( + "Archive", "archive", "Adds ROM files from the specified directories to depot", FeatureType.Flag, null); - archive.AddFeature("only-needed", new Feature( + archive.AddFeature(new Feature( + "only-needed", "-only-needed", "Only archive ROM files in database", FeatureType.Flag, @@ -41,11 +44,13 @@ namespace RombaSharp // Create the Build feature Feature build = new Feature( + "Build", "build", "For each specified DAT file it creates TZip files", FeatureType.Flag, null); - build.AddFeature("copy", new Feature( + build.AddFeature(new Feature( + "copy", "-copy", "Copy files instead of rebuilding", FeatureType.Flag, @@ -53,6 +58,7 @@ namespace RombaSharp // Create the Stats feature Feature stats = new Feature( + "Stats", "dbstats", "Prints db stats", FeatureType.Flag, @@ -60,6 +66,7 @@ namespace RombaSharp // Create the Rescan Depots feature Feature rescanDepots = new Feature( + "Rescan Depots", "depot-rescan", "Rescan a specific depot to get new information", FeatureType.Flag, @@ -67,11 +74,13 @@ namespace RombaSharp // Create the Diffdat feature Feature diffdat = new Feature( + "Diffdat", "diffdat", "Creates a DAT file for entries found in the new DAT", FeatureType.Flag, null); - diffdat.AddFeature("new", new Feature( + diffdat.AddFeature(new Feature( + "new", "-new", "DAT to compare to", FeatureType.String, @@ -79,11 +88,13 @@ namespace RombaSharp // Create the Dir2Dat feature Feature dir2dat = new Feature( + "Dir2Dat", "dir2dat", "Creates a DAT file for the specified input directory", FeatureType.Flag, null); - dir2dat.AddFeature("out", new Feature( + dir2dat.AddFeature(new Feature( + "out", "-out", "Filename to save out to", FeatureType.String, @@ -91,6 +102,7 @@ namespace RombaSharp // Create the Export feature Feature export = new Feature( + "Export", "export", "Exports db to export.csv", FeatureType.Flag, @@ -98,6 +110,7 @@ namespace RombaSharp // Create the Fixdat feature Feature fixdat = new Feature( + "Fixdat", "fixdat", "For each specified DAT file it creates a fix DAT", FeatureType.Flag, @@ -105,6 +118,7 @@ namespace RombaSharp // Create the Import feature Feature import = new Feature( + "Import", "import", "Import a database from a formatted CSV file", FeatureType.Flag, @@ -112,6 +126,7 @@ namespace RombaSharp // Create the Lookup feature Feature lookup = new Feature( + "Lookup", "lookup", "For each specified hash, look up available information", FeatureType.Flag, @@ -119,6 +134,7 @@ namespace RombaSharp // Create the Mmmstats feature Feature memstats = new Feature( + "Memstats", "memstats", "Prints memory stats", FeatureType.Flag, @@ -126,16 +142,19 @@ namespace RombaSharp // Create the Merge feature Feature merge = new Feature( + "Merge", "merge", "Merges a depot into the existing one", FeatureType.Flag, null); - merge.AddFeature("depot", new Feature( + merge.AddFeature(new Feature( + "depot", "-depot", "Depot path to merge into", FeatureType.String, null)); - merge.AddFeature("only-needed", new Feature( + merge.AddFeature(new Feature( + "only-needed", "-only-needed", "Only merge files in if needed", FeatureType.Flag, @@ -143,6 +162,7 @@ namespace RombaSharp // Create the Miss feature Feature miss = new Feature( + "Miss", "miss", "For each specified DAT file, create miss and have file", FeatureType.Flag, @@ -150,11 +170,13 @@ namespace RombaSharp // Create the Purge Backup feature Feature purgeBackup = new Feature( + "Purge Backup", "purge-backup", "Moves DAT index entries for orphaned DATs", FeatureType.Flag, null); - purgeBackup.AddFeature("log-only", new Feature( + purgeBackup.AddFeature(new Feature( + "log-only", "-log-only", "Only write out actions to log", FeatureType.Flag, @@ -162,11 +184,13 @@ namespace RombaSharp // Create the Purge Delete feature Feature purgeDelete = new Feature( + "Purge Delete", "purge-delete", "Deletes DAT index entries for orphaned DATs", FeatureType.Flag, null); - purgeDelete.AddFeature("log-only", new Feature( + purgeDelete.AddFeature(new Feature( + "log-only", "-log-only", "Only write out actions to log", FeatureType.Flag, @@ -174,6 +198,7 @@ namespace RombaSharp // Create the Refresh DATs feature Feature refreshDats = new Feature( + "Refresh DATs", "refresh-dats", "Refreshes the DAT index from the files in the DAT root", FeatureType.Flag, @@ -181,6 +206,7 @@ namespace RombaSharp // Create the Progress feature Feature progress = new Feature( + "Progress", "progress", "Shows progress of currently running command [OBSOLETE]", FeatureType.Flag, @@ -188,31 +214,32 @@ namespace RombaSharp // Create the Shutdown feature Feature shutdown = new Feature( + "Shutdown", "shutdown", "Gracefully shuts down server [OBSOLETE]", FeatureType.Flag, null); // Now, add all of the main features to the Help object - help.Add("Help", helpFeature); - help.Add("Archive", archive); - help.Add("Build", build); - help.Add("Stats", stats); - help.Add("Rescan Depots", rescanDepots); - help.Add("Diffdat", diffdat); - help.Add("Dir2Dat", dir2dat); - help.Add("Export", export); - help.Add("Fixdat", fixdat); - help.Add("Import", import); - help.Add("Lookup", lookup); - help.Add("Memstats", memstats); - help.Add("Merge", merge); - help.Add("Miss", miss); - help.Add("Purge Backup", purgeBackup); - help.Add("Purge Delete", purgeDelete); - help.Add("Refresh DATs", refreshDats); - help.Add("Progress", progress); - help.Add("Shutdown", shutdown); + help.Add(helpFeature); + help.Add(archive); + help.Add(build); + help.Add(stats); + help.Add(rescanDepots); + help.Add(diffdat); + help.Add(dir2dat); + help.Add(export); + help.Add(fixdat); + help.Add(import); + help.Add(lookup); + help.Add(memstats); + help.Add(merge); + help.Add(miss); + help.Add(purgeBackup); + help.Add(purgeDelete); + help.Add(refreshDats); + help.Add(progress); + help.Add(shutdown); return help; } diff --git a/SabreTools.Library/Help/Feature.cs b/SabreTools.Library/Help/Feature.cs index 1f8a2852..6b0294fe 100644 --- a/SabreTools.Library/Help/Feature.cs +++ b/SabreTools.Library/Help/Feature.cs @@ -10,8 +10,10 @@ namespace SabreTools.Library.Help { #region Private instance variables + private string _name; private List _flags; private string _description; + private string _longDescription; // TODO: Use this to generate README.1ST? private FeatureType _featureType; private Dictionary _features; private List _additionalNotes; @@ -28,10 +30,22 @@ namespace SabreTools.Library.Help #region Publicly facing variables + public string Name + { + get { return _name; } + } + public List Flags + { + get { return _flags; } + } public string Description { get { return _description; } } + public string LongDescription + { + get { return _longDescription; } + } public Dictionary Features { get { return _features; } @@ -43,28 +57,34 @@ namespace SabreTools.Library.Help public Feature() { + _name = null; _flags = new List(); _description = null; + _longDescription = null; _featureType = FeatureType.Flag; _features = new Dictionary(); _additionalNotes = new List(); } - public Feature(string flag, string description, FeatureType featureType, List additionalNotes) + public Feature(string name, string flag, string description, FeatureType featureType, string longDescription = null, List additionalNotes = null) { + _name = name; List flags = new List(); flags.Add(flag); _flags = flags; _description = description; + _longDescription = longDescription; _featureType = featureType; _features = new Dictionary(); _additionalNotes = additionalNotes; } - public Feature(List flags, string description, FeatureType featureType, List additionalNotes) + public Feature(string name, List flags, string description, FeatureType featureType, string longDescription = null, List additionalNotes = null) { + _name = name; _flags = flags; _description = description; + _longDescription = longDescription; _featureType = featureType; _features = new Dictionary(); _additionalNotes = additionalNotes; @@ -83,12 +103,20 @@ namespace SabreTools.Library.Help set { _features[name] = value; } } + /// + /// Directly address a given subfeature + /// + public Feature this[Feature subfeature] + { + get { return _features[subfeature.Name]; } + set { _features[subfeature.Name] = value; } + } + /// /// Add a new feature for this feature /// - /// Name of the feature to add /// - public void AddFeature(string name, Feature feature) + public void AddFeature(Feature feature) { if (_features == null) { @@ -97,13 +125,13 @@ namespace SabreTools.Library.Help lock(_features) { - if (!_features.ContainsKey(name)) + if (!_features.ContainsKey(feature.Name)) { - _features.Add(name, feature); + _features.Add(feature.Name, feature); } else { - _features[name] = feature; + _features[feature.Name] = feature; } } } diff --git a/SabreTools.Library/Help/Help.cs b/SabreTools.Library/Help/Help.cs index c2e01676..10fb2e05 100644 --- a/SabreTools.Library/Help/Help.cs +++ b/SabreTools.Library/Help/Help.cs @@ -65,12 +65,45 @@ namespace SabreTools.Library.Help } } + public Feature this[Feature subfeature] + { + get + { + if (_features == null) + { + _features = new Dictionary(); + } + + if (!_features.ContainsKey(subfeature.Name)) + { + return null; + } + + return _features[subfeature.Name]; + } + set + { + if (_features == null) + { + _features = new Dictionary(); + } + + if (_features.ContainsKey(subfeature.Name)) + { + _features[subfeature.Name] = value; + } + else + { + _features.Add(subfeature.Name, value); + } + } + } + /// /// Add a new feature to the help /// - /// Name of the feature to add /// Feature object to map to - public void Add(string name, Feature feature) + public void Add(Feature feature) { if (_features == null) { @@ -79,7 +112,7 @@ namespace SabreTools.Library.Help lock (_features) { - _features.Add(name, feature); + _features.Add(feature.Name, feature); } } diff --git a/SabreTools.Library/README.1ST b/SabreTools.Library/README.1ST index b6c8e361..4abadb4a 100644 --- a/SabreTools.Library/README.1ST +++ b/SabreTools.Library/README.1ST @@ -1,6 +1,6 @@ ************************************************ * SabreTools - DAT management software * -* https://github.com/mnadareski/wizzardDesktop * +* https://github.com/SabreTools/SabreTools * ************************************************ Table of Contents @@ -205,81 +205,44 @@ Options: archives as files themselves. This is good for uncompressed sets that include archives that should be read as-is. - -oa, --output-all Output in all available formats - Add outputting the created DAT in all available formats. See - specific formats for additional flags that may be used. - - -oam, --output-attractmode Output in AttractMode format - Add outputting the created DAT to AttractMode format - - -oc, --output-cmp Output in CMP format - Add outputting the created DAT to clrmamepro format - - -ocsv, --output-csv Output in Comma-Separated Value format - Add outputting the created DAT to standardized CSV format - - -od, --output-doscenter Output in DOSCenter format - Add outputting the created DAT to DOSCenter 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 - Add outputting the created DAT to GoodTools miss format - - -omd5, --output-md5 Output in MD5 format - Add outputting the created DAT to MD5 format - - -ool, --output-offlinelist Output in OfflineList format - Add outputting the created DAT to OfflineList XML format - - -or, --output-romcenter Output in RomCenter format - Add outputting the created DAT to RomCenter format - - -os, --output-sabredat Output in SabreDAT format - Add outputting the created DAT to SabreDAT XML format - - -osfv, --output-sfv Output in SFV format - Add outputting the created DAT to SFV format - - -osha1, --output-sha1 Output in SHA-1 format - Add outputting the created DAT to SHA1 format - - -osha256, --output-sha256 Output in SHA-256 format - Add outputting the created DAT to SHA-256 format - - -osha384, --output-sha384 Output in SHA-384 format - Add outputting the created DAT to SHA-384 format - - -osha512, --output-sha512 Output in SHA-512 format - Add outputting the created DAT to SHA-512 format - - -osl, --output-softwarelist Output in Software List format - Add outputting the created DAT to Software List XML format - - -ossv, --output-ssv Output in Semicolon-Separated Value format - Add outputting the created DAT to standardized SSV format - - -otsv, --output-tsv Output in Tab-Separated Value format - Add outputting the created DAT to standardized TSV format - - -ox, --output-xml Output in Logiqx XML format (default) - Add outputting the created DAT to Logiqx XML format + -ot=, --output-type= Output DATs to a given format + Add outputting the created DAT to one of the following formats: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML -dpc, --depreciated Output 'game' instead of 'machine' By default, XML DATs output with the more modern "machine" tag for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. + tag instead, for compatibility reasons. [Logiqx only] - -ro, --romba Read files from a Romba input + -ro, --romba Treat like a Romba depot (requires SHA-1) Allow for reading of GZipped files as if they were from a Romba depot. This implies that the files will be in the TorrentGZ format as well, including naming convention. - -ska, --skip-archives Skip archive files + -ska, --skip-archives Skip all archives Skip any files that are treated like archives - -skf, --skip-files Skip non-archive files + -skf, --skip-files Skip all non-archives Skip any files that are not treated like archives -f=, --filename= Set the external name of the DAT @@ -322,7 +285,7 @@ Options: -xof, --exclude-of Exclude romof, cloneof, sampleof tags If this flag is enabled, then the romof, cloneof, and sampleof tags - will be omitted from the outputted DAT or DATs. + will be omitted from the outputted DAT. -sds, --scene-date-strip Remove date from scene-named sets If this flag is enabled, sets with "scene" names will have the date @@ -424,82 +387,45 @@ Options: possible criteria. See the individual input information for details. More than one split type is allowed at a time. - -oa, --output-all Output in all available formats - Add outputting the created DAT in all available formats. See - specific formats for additional flags that may be used. - - -oam, --output-attractmode Output in AttractMode format - Add outputting the created DAT to AttractMode format - - -oc, --output-cmp Output in CMP format - Add outputting the created DAT to clrmamepro format - - -ocsv, --output-csv Output in Comma-Separated Value format - Add outputting the created DAT to standardized CSV format - - -od, --output-doscenter Output in DOSCenter format - Add outputting the created DAT to DOSCenter 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 - Add outputting the created DAT to GoodTools miss format - - -omd5, --output-md5 Output in MD5 format - Add outputting the created DAT to MD5 format - - -ool, --output-offlinelist Output in OfflineList format - Add outputting the created DAT to OfflineList XML format - - -or, --output-romcenter Output in RomCenter format - Add outputting the created DAT to RomCenter format - - -os, --output-sabredat Output in SabreDAT format - Add outputting the created DAT to SabreDAT XML format - - -osfv, --output-sfv Output in SFV format - Add outputting the created DAT to SFV format - - -osha1, --output-sha1 Output in SHA-1 format - Add outputting the created DAT to SHA1 format - - -osha256, --output-sha256 Output in SHA-256 format - Add outputting the created DAT to SHA-256 format - - -osha384, --output-sha384 Output in SHA-384 format - Add outputting the created DAT to SHA-384 format - - -osha512, --output-sha512 Output in SHA-512 format - Add outputting the created DAT to SHA-512 format - - -osl, --output-softwarelist Output in Software List format - Add outputting the created DAT to Software List XML format - - -ossv, --output-ssv Output in Semicolon-Separated Value format - Add outputting the created DAT to standardized SSV format - - -otsv, --output-tsv Output in Tab-Separated Value format - Add outputting the created DAT to standardized TSV format - - -ox, --output-xml Output in Logiqx XML format - Add outputting the created DAT to Logiqx XML format + -ot=, --output-type= Output DATs to a given format + Add outputting the created DAT to one of the following formats: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML -dpc, --depreciated Output 'game' instead of 'machine' - By default, XML DATs output with the more modern "machine" tag + By default, XML DATs output with the more modern "machine" tag for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. + tag instead, for compatibility reasons. [Logiqx only] -out=, --output-dir= Set the name of the output directory This sets an output folder to be used when the files are created. If a path is not defined, the application directory is used instead. - -ip, --inplace Write to the input directories - This will write out the split files to the source folder instead of - writing them out to the runtime folder by default (or the output - folder if overridden). + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. - -es, --extension Split a DAT by two file extensions + -es, --extension Split DAT(s) 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 @@ -516,17 +442,11 @@ Options: more than one extension is defined, they must be placed in separate flags - -hs, --hash Split a DAT or folder by best-available hashes + -hs, --hash Split DAT(s) or folder by best-available hashes For a DAT, or set of DATs, allow for splitting based on the best available hash for each file within. The order of preference for the - outputted DATs is as follows: - - Nodump - - SHA-512 available - - SHA-386 available - - SHA-256 available - - SHA-1 available - - MD5 available - - CRC or worse available + outputted DATs is as follows: Nodump, SHA512, SHA384, SHA256, SHA1, + MD5, CRC (or worse). -ls, --level Split a SuperDAT or folder by lowest available level For a DAT, or set of DATs, allow for splitting based on the lowest @@ -534,7 +454,7 @@ Options: last, then it will create an output DAT for the parent directory "mid" in a folder called "top" with a game called "last". - -s, --short Use short names for outputted DATs + -s, --short Use short output names Instead of using ClrMamePro-style long names for DATs, use just the name of the folder as the name of the DAT. This can be used in conjunction with --base to output in the format of "Original @@ -550,8 +470,8 @@ Options: -szs, --size Split DAT(s) or folder by file sizes For a DAT, or set of DATs, allow for splitting based on the sizes - of the files, specificially if the type is a rom (disks don't have - sizes) + of the files, specifically if the type is a Rom (most item types don't + have sizes). -rad, --radix Set the midpoint to split at Set the size at which all roms less than the size are put in the @@ -584,7 +504,7 @@ Options: be deleted. This can be useful when the original file structure is no longer needed or if there is limited space on the source drive. - -in, --inverse Match files not in the DAT + -in, --inverse Rebuild only files not in DAT Instead of the normal behavior of rebuilding using a DAT, this flag allows the user to use the DAT as a filter instead. All files that are found in the DAT will be skipped and everything else will be @@ -608,21 +528,21 @@ Options: This will technically invalidate the output files as proper TorrentZip files because the date will not match the standard. - -t7z, --torrent-7zip Enable Torrent 7zip output - Instead of ouputting the files to folder, files will be rebuilt to + -t7z, --torrent-7zip Enable Torrent 7Zip output + Instead of outputting 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 + format 7Zip, but with custom header information. This is currently unused by any major application. Currently does not produce proper Torrent-compatible outputs. -tar Enable Tape ARchive output - Instead of outputting the fiels to folder, files will be rebuilt to + Instead of outputting the files to folder, files will be rebuilt to Tape ARchive (TAR) files. This format is a standardized storage archive without any compression, usually used with other compression formats around it. It is widely used in backup applications and source code archives. - -tgz, --torrent-gzip Enable Torrent GZ output + -tgz, --torrent-gzip Enable Torrent GZip 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 @@ -630,7 +550,7 @@ Options: tool Romba (https://github.com/uwedeportivo/romba), but may be used more widely in the future. - -r, --romba Enable Romba depot directory output + -r, --romba Treat like a Romba depot (requires SHA-1) As an extension of the parent flag, this outputs the TGZ files into directories based on the structure used by Romba. This uses nested folders using the first 4 bytes of the SHA-1, 1 byte for @@ -639,14 +559,14 @@ Options: compressed size of the folder inside for use with Romba. -tlrz, --torrent-lrzip Enable Torrent Long-Range Zip output [UNIMPLEMENTED] - Instead of ouputting the files to folder, files will be rebuilt to + Instead of outputting 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, --torrent-lz4 Enable Torrent LZ4 output [UNIMPLEMENTED] - Instead of ouputting the files to folder, files will be rebuilt to + Instead of outputting 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 @@ -666,21 +586,21 @@ Options: Torrent-compatible outputs. -tzip, --torrent-zip Enable Torrent Zip output - Instead of ouputting files to folder, files will be rebuilt to + Instead of outputting 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, --torrent-zpaq Enable Torrent ZPAQ output [UNIMPLEMENTED] - Instead of ouputting the files to folder, files will be rebuilt to + Instead of outputting 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, --torrent-zstd Enable Torrent Zstd output [UNIMPLEMENTED] - Instead of ouputting the files to folder, files will be rebuilt to + Instead of outputting 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 custom header information. This is currently unused by any major @@ -710,27 +630,27 @@ Options: content of the rebuild folder is not entirely known or is known to be mixed. - -dm, --dat-merged Force creating merged sets + -dm, --dat-merged Create merged sets Preprocess the DAT to have parent sets contain all items from the children based on the cloneof tag. This is incompatible with the other --dat-X flags. - -ds, --dat-split Force creating split sets + -ds, --dat-split Create split sets Preprocess the DAT to remove redundant files between parents and children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-non-merged Force creating 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. - -dnd, --dat-device-non-merged Force creating device non-merged sets + -dnd, --dat-device-non-merged Create 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 Force creating fully non-merged sets + -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. @@ -741,7 +661,7 @@ Options: created. If the user specifies that only 1 thread is to be used, it defaults to the original, serial implementation of the DFD code. - -upd, --update-dat Output updated DAT + -upd, --update-dat Output updated DAT to output directory Once the files that were able to rebuilt are taken care of, a DAT of the files that could not be matched will be output to the output directory. @@ -759,14 +679,20 @@ Options: - Roms with Nodump status -as, --all-stats Write all statistics to all available formats - Output all rom information to all available formats + Output all statistical information to all available formats - -bc, --baddump-column Add statistics for baddumps to output - Add a new column or field for counting the number of baddumps in the - DAT + -csv, --csv Output in Comma-Separated Value format + Output all statistical information in standardized CSV format - -csv, --csv Write all statistics to CSV - Output all rom information in standardized CSV format + -html, --html Output in HTML format + Output all statistical information in standardized HTML format + + -tsv, --tsv Output in Tab-Separated Value format + Output all statistical information in standardized TSV format + + -txt, --text Output in generic text format + Output all statistical information in generic text format. If no + other format flags are enabled, this is the default output. -f=, --filename= Set the filename for the output Set the filename (without extension) for the outputted report @@ -775,9 +701,9 @@ Options: This sets an output folder to be used when the files are created. If a path is not defined, the application directory is used instead. - -html, --html Write all statistics to HTML - This will output by default the combined statistics for all input - DAT files. + -bc, --baddump-column Add statistics for baddumps to output + Add a new column or field for counting the number of baddumps in the + DAT -nc, --nodump-column Add statistics for nodumps to output Add a new column or field for counting the number of nodumps in the @@ -785,40 +711,50 @@ Options: -ind, --individual Show individual statistics Optionally, the statistics for each of the individual input DATs can - be output as well. This can be useful to show where the size or - amount of files found in the combined totals can be broken down from - - -tsv, --tsv Output in Tab-Separated Value format - Output all rom information in standardized TSV format - - -txt, --text Output in generic text format - Output all rom information in generic text format. If no other format - flags are enabled, this is the default output. + be output as well. -ud, --update Update and manipulate DAT(s) This is the multitool part of the program, allowing for almost every manipulation to a DAT, or set of DATs. This is also a combination of many different programs that performed DAT manipulation that work better together. - - -oa, --output-all Output in all available formats - Add outputting the created DAT in all available formats. See - specific formats for additional flags that may be used. - - -oam, --output-attractmode Output in AttractMode format - Add outputting the created DAT to AttractMode format - -oc, --output-cmp Output in CMP format - Add outputting the created DAT to clrmamepro format - - -ocsv, --output-csv Output in Comma-Separated Value format - Add outputting the created DAT to standardized CSV format + -ot=, --output-type= Output DATs to a given format + Add outputting the created DAT to one of the following formats: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + -dpc, --depreciated Output 'game' instead of 'machine' + By default, XML DATs output with the more modern "machine" tag + for each set. This flag allows users to output the older "game" + tag instead, for compatibility reasons. [Logiqx only] + -pre=, --prefix= Set prefix for all lines Set a generic prefix to be prepended to all outputted lines + [*SV, Missfile only] -post=, --postfix= Set postfix for all lines Set a generic postfix to be appended to all outputted lines + [*SV, Missfile only] Both prefix and postfix can use one of the following strings: - %game% - Replaced with the Game/Machine name @@ -831,31 +767,27 @@ Options: - %sha512% - Replaced with the SHA-512 - %size% - Replaced with the size - -q, --quotes Put double-quotes around each item - This quotes only the item and not the prefix and postfix - - -od, --output-doscenter Output in DOSCenter format - Add outputting the created DAT to DOSCenter 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 - Add outputting the created DAT to GoodTools miss format + -q, --quotes Double-quote each item + This flag surrounds the item by double-quotes, not including the + prefix or postfix. [*SV, Missfile only] -r, --roms Output roms to miss instead of sets By default, the outputted file will include the name of the game - so this flag allows for the name of the rom to be output instead. + so this flag allows for the name of the rom to be output instead + [Missfile only] - -gp, --game-prefix Add game name as a prefix + -gp, --game-prefix Add game name as a prefix Mainly used with the previous flag, this allows for the name of - the game to be used as a prefix to each file. + the game to be used as a prefix to each file. [Missfile, MD5, + SFV, SHA* only] -pre=, --prefix= Set prefix for all lines Set a generic prefix to be prepended to all outputted lines + [*SV, Missfile only] -post=, --postfix= Set postfix for all lines Set a generic postfix to be appended to all outputted lines + [*SV, Missfile only] Both prefix and postfix can use one of the following strings: - %game% - Replaced with the Game/Machine name @@ -870,128 +802,22 @@ Options: -q, --quotes Put double-quotes around each item This quotes only the item and not the prefix and postfix + [*SV, Missfile only] -ae=, --add-extension= Add an extension to each item - To each item, a postfixed extension is added + To each item, a postfixed extension is added [Missfile only] -re=, --replace-extension= Replace all extensions with specified When an extension exists, replace it with the provided instead + [Missfile only] -rme, --remove-extensions Remove all extensions from all items - For each item, the extension is removed + For each item, remove the extension. [Missfile only] - -ro, --romba Output in Romba format (requires SHA-1) + -ro, --romba Treat like a Romba depot (requires SHA-1) Instead of outputting the game or rom name, output the SHA-1 of the files instead. This requires the source DAT to have SHA-1 - hashes. - - -omd5, --output-md5 Output in MD5 format - Add outputting the created DAT to MD5 format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -ool, --output-offlinelist Output in OfflineList format - Add outputting the created DAT to OfflineList XML format - - -or, --output-romcenter Output in RomCenter format - Add outputting the created DAT to RomCenter format - - -os, --output-sabredat Output in SabreDAT format - Add outputting the created DAT to SabreDAT XML format - - -osfv, --output-sfv Output in SFV format - Add outputting the created DAT to SFV format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -osha1, --output-sha1 Output in SHA-1 format - Add outputting the created DAT to SHA1 format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -osha256, --output-sha256 Output in SHA-256 format - Add outputting the created DAT to SHA-256 format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -osha384, --output-sha384 Output in SHA-384 format - Add outputting the created DAT to SHA-384 format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -osha512, --output-sha512 Output in SHA-512 format - Add outputting the created DAT to SHA-512 format - - -gp, --game-prefix Add game name as a prefix - This allows for the name of the game to be used as a prefix to - each file - - -osl, --output-softwarelist Output in Software List format - Add outputting the created DAT to Software List XML format - - -ossv, --output-ssv Output in Semicolon-Separated Value format - Add outputting the created DAT to standardized SSV format - - -pre=, --prefix= Set prefix for all lines - Set a generic prefix to be prepended to all outputted lines - - -post=, --postfix= Set postfix for all lines - Set a generic postfix to be appended to all outputted lines - - Both prefix and postfix can use one of the following strings: - - %game% - Replaced with the Game/Machine name - - %name% - Replaced with the Rom name - - %crc% - Replaced with the CRC - - %md5% - Replaced with the MD5 - - %sha1% - Replaced with the SHA-1 - - %sha256% - Replaced with the SHA-256 - - %sha384% - Replaced with the SHA-384 - - %sha512% - Replaced with the SHA-512 - - %size% - Replaced with the size - - -q, --quotes Put double-quotes around each item - This quotes only the item and not the prefix and postfix - - -otsv, --output-tsv Output in Tab-Separated Value format - Add outputting the created DAT to standardized TSV format - - -pre=, --prefix= Set prefix for all lines - Set a generic prefix to be prepended to all outputted lines - - -post=, --postfix= Set postfix for all lines - Set a generic postfix to be appended to all outputted lines - - Both prefix and postfix can use one of the following strings: - - %game% - Replaced with the Game/Machine name - - %name% - Replaced with the Rom name - - %crc% - Replaced with the CRC - - %md5% - Replaced with the MD5 - - %sha1% - Replaced with the SHA-1 - - %sha256% - Replaced with the SHA-256 - - %sha384% - Replaced with the SHA-384 - - %sha512% - Replaced with the SHA-512 - - %size% - Replaced with the size - - -q, --quotes Put double-quotes around each item - This quotes only the item and not the prefix and postfix - - -ox, --output-xml Output in Logiqx XML format - Add outputting the created DAT to Logiqx XML format - - -dpc, --depreciated Output 'game' instead of 'machine' - By default, XML DATs output with the more modern "machine" tag - for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. + hashes. [Missfile only] -f=, --filename= Set the external name of the DAT Set the base filename for the output DAT(s) @@ -1049,7 +875,7 @@ Options: -xof, --exclude-of Exclude romof, cloneof, sampleof tags If this flag is enabled, then the romof, cloneof, and sampleof tags - will be omitted from the outputted DAT or DATs. + will be omitted from the outputted DAT. -sds, --scene-date-strip Remove date from scene-named sets If this flag is enabled, sets with "scene" names will have the date @@ -1057,8 +883,8 @@ Options: would become "Game_Name-Group". -clean Clean game names according to WoD standards - Game names will be santitized to remove what the original WoD - standards deemed as unneeded information, such as parenthized or + Game names will be sanitized to remove what the original WoD + standards deemed as unneeded information, such as parenthesized or bracketed strings -ru, --remove-unicode Remove unicode characters from names @@ -1086,7 +912,7 @@ Options: 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, --description-as-name Use Software List name instead of description + -dan, --description-as-name Use description instead of machine name 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 @@ -1109,7 +935,7 @@ Options: 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 + -dnd, --dat-device-non-merged Create 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. @@ -1145,7 +971,7 @@ Options: -m, --merge Merge the input DATs By default, all DATs are processed individually with the user- 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. + merged into a single output. This is best used with the dedup flag. -b, --no-automatic-date Don't include date in file name Normally, the DAT will be created with the date in the file name @@ -1206,7 +1032,7 @@ Options: occurring. This flag enables users to define a DAT or set of base DATs to use as "replacements" for all input DATs. Note that the first found instance of an item in the base DAT(s) will be - used and all others will be disgarded. For reverse, the first + used and all others will be discarded. For reverse, the first instance found in the last DAT inputted will be used. If no additional flag is given, it will default to updating names. @@ -1222,7 +1048,7 @@ Options: -udd, --update-description Update machine descriptions from base DATs This flag enables updating of machine descriptions from base - DATs + DATs. -ons, --only-same Only update description if machine name matches description @@ -1231,12 +1057,11 @@ Options: only be overwritten if they are the same as the machine names. -uy, --update-year Update machine years from base DATs - This flag enables updating of machine years from base - DATs + This flag enables updating of machine years from base DATs. -um, --update-manufacturer Update machine manufacturers from base DATs This flag enables updating of machine manufacturers from base - DATs + DATs. -gn=, --game-name= Filter by game name -ngn=, --not-game-name= Exclude by game name @@ -1311,12 +1136,10 @@ Options: This sets an output folder to be used when the files are created. If a path is not defined, the application directory is used instead. - -ip, --inplace Enable overwriting of source files - This will overwrite the source files instead of writing them out to - the runtime folder by default (or the output folder if overridden). - Note that this only works for regular updates and cascaded diffs due - to how file are expected to be written. This flag is only valid for - Update and Cascade operations. + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. -mt=, --threads= Amount of threads to use Optionally, set the number of threads to use for the multithreaded @@ -1349,9 +1172,9 @@ Options: -qs, --quick Enable quick scanning of archives For all archives, if this flag is enabled, it will only use the header information to get the archive entries' file information. The - upside to this is that it is much quicker than extracting all files - to the temp folder. On the downside, it can only get the CRC and - size from most archive formats, leading to possible issues. + upside to this is that it is the fastest option. On the downside, it + can only get the CRC and size from most archive formats, leading to + possible issues. -h=, --header= Remove headers from hash calculations If this is set, then all files that have copier headers that are @@ -1366,27 +1189,27 @@ Options: compare against the input DATs. This flag forces all CHDs to be treated like regular files. - -dm, --dat-merged Force checking merged sets + -dm, --dat-merged Create merged sets Preprocess the DAT to have parent sets contain all items from the children based on the cloneof tag. This is incompatible with the other --dat-X flags. - -ds, --dat-split Force checking split sets + -ds, --dat-split Create split sets Preprocess the DAT to remove redundant files between parents and children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags. - -dnm, --dat-non-merged Force checking 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. - -dnd, --dat-device-non-merged Force creating device non-merged sets + -dnd, --dat-device-non-merged Create 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 Force checking fully non-merged sets + -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. @@ -1504,14 +1327,35 @@ This section contains remappings from old flag names to new ones for the purpose -ns256, --noSHA256 -> -ns256, --skip-sha256 -ns384, --noSHA384 -> -nm, --skip-sha384 -ns512, --noSHA512 -> -nm, --skip-sha512 --oam, --output-am -> -oam, --output-attractmode --od, --output-dc -> -od, --output-doscenter +-a, --output-all -> -ot=all, --output-type=all +-oam, --output-am -> -ot=am, --output-type=attractmode +-oam, --output-attractmode -> -ot=am, --output-type=attractmode +-oc, --output-cmp -> -ot=cmp, --output-type=clrmamepro +-ocsv, --output-csv -> -ot=csv, --output-type=csv +-od, --output-dc -> -ot=dc, --output-type=dosccenter +-od, --output-doscenter -> -ot=dc, --output-type=dosccenter -ofg, --of-as-game -> -ofg, --match-of-tags --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 +-olr, --output-lr -> -ot=lr, --output-type=listrom +-olr, --output-listrom -> -ot=lr, --output-type=listrom +-olx, --output-listxml -> -ot=lx, --output-type=listxml +-om, --output-miss -> -ot=miss, --output-type=missfile +-omd5, --output-md5 -> -ot=md5, --output-type=md5 +-ool, --output-ol -> -ot=ol, --output-type=offlinelist +-ool, --output-offlinelist -> -ot=ol, --output-type=offlinelist +-or, --output-rc -> -ot=rc, --output-type=romcenter +-or, --output-romcenter -> -ot=rc, --output-type=romcenter +-os, --output-sd -> -ot=sd, --output-type=sabredat +-os, --output-sabredat -> -ot=sd, --output-type=sabredat +-osfv, --output-sfv -> -ot=sfv, --output-type=sfv +-osha1, --output-sha1 -> -ot=sha1, --output-type=sha1 +-osha256, --output-sha256 -> -ot=sha256, --output-type=sha256 +-osha384, --output-sha384 -> -ot=sha384, --output-type=sha384 +-osha512, --output-sha512 -> -ot=sha512, --output-type=sha512 +-osl, --output-sl -> -ot=sl, --output-type=softwarelist +-osl, --output-softwarelist -> -ot=sl, --output-type=softwarelist +-ossv, --output-ssv -> -ot=ssv, --output-type=ssv +-otsv, --output-tsv -> -ot=tsv, --output-type=tsv +-ox, --output-xml -> -ot=xml, --output-type=logiqx -out, --out -> -out, --output-dir -rc, --rev-cascade -> -rc, --reverse-cascade -rep, --rep-ext -> -rep, --replace-extension diff --git a/SabreTools.Library/Tools/Utilities.cs b/SabreTools.Library/Tools/Utilities.cs index 351abc53..d8e70ecb 100644 --- a/SabreTools.Library/Tools/Utilities.cs +++ b/SabreTools.Library/Tools/Utilities.cs @@ -736,6 +736,10 @@ namespace SabreTools.Library.Tools case "sl": case "softwarelist": return DatFormat.SoftwareList; + case "ssv": + return DatFormat.SSV; + case "tsv": + return DatFormat.TSV; case "xml": case "logiqx": return DatFormat.Logiqx; diff --git a/SabreTools/SabreTools.Help.cs b/SabreTools/SabreTools.Help.cs index 403f6dd0..897028fc 100644 --- a/SabreTools/SabreTools.Help.cs +++ b/SabreTools/SabreTools.Help.cs @@ -14,10 +14,11 @@ namespace SabreTools get { return new Feature( + "add-blank-files", new List() { "-ab", "--add-blank-files" }, "Output blank files for folders", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature addDateFlag @@ -25,10 +26,11 @@ namespace SabreTools get { return new Feature( + "add-date", new List() { "-ad", "--add-date" }, "Add dates to items, where posible", FeatureType.Flag, - null); + longDescription: "If this flag is set, then the Date will be appended to each file information in the output DAT. The output format is standardized as \"yyyy/MM/dd HH:mm:ss\"."); } } private static Feature againstFlag @@ -36,10 +38,11 @@ namespace SabreTools get { return new Feature( + "against", new List() { "-ag", "--against" }, "Diff all inputs against a set of base DATs", FeatureType.Flag, - null); + "This flag will enable a special type of diffing in which a set of base DATs are used as a comparison point for each of the input DATs. This allows users to get a slightly different output to cascaded diffing, which may be more useful in some cases. This is heavily influenced by the diffing model used by Romba."); } } private static Feature allStatsFlag @@ -47,10 +50,11 @@ namespace SabreTools get { return new Feature( + "all-stats", new List() { "-as", "--all-stats" }, "Write all statistics to all available formats", FeatureType.Flag, - null); + longDescription: "Output all rom information to all available formats."); } } private static Feature archivesAsFilesFlag @@ -58,10 +62,11 @@ namespace SabreTools get { return new Feature( + "archives-as-files", new List() { "-f", "--archives-as-files" }, "Treat archives as files", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature baddumpColumnFlag @@ -69,10 +74,11 @@ namespace SabreTools get { return new Feature( + "baddump-column", new List() { "-bc", "--baddump-column" }, "Add baddump stats to output", FeatureType.Flag, - null); + longDescription: "Add a new column or field for counting the number of baddumps in the DAT."); } } private static Feature baseFlag @@ -80,10 +86,11 @@ namespace SabreTools get { return new Feature( + "base", new List() { "-ba", "--base" }, "Use source DAT as base name for outputs", FeatureType.Flag, - null); + longDescription: "If splitting an entire folder of DATs, some output files may be normally overwritten since the names would be the same. With this flag, the original DAT name is used in the output name, in the format of \"Original Name(Dir - Name)\". This can be used in conjunction with --short to output in the format of \"Original Name (Name)\" instead."); } } private static Feature baseReplaceFlag @@ -91,10 +98,11 @@ namespace SabreTools get { return new Feature( + "base-replace", new List() { "-br", "--base-replace" }, "Replace from base DATs in order", FeatureType.Flag, - null); + longDescription: "By default, no item names are changed except when there is a merge occurring. This flag enables users to define a DAT or set of base DATs to use as \"replacements\" for all input DATs. Note that the first found instance of an item in the base DAT(s) will be used and all others will be discarded. If no additional flag is given, it will default to updating names."); } } private static Feature cascadeFlag @@ -102,10 +110,11 @@ namespace SabreTools get { return new Feature( + "cascade", new List() { "-c", "--cascade" }, "Enable cascaded diffing", FeatureType.Flag, - null); + longDescription: "This flag allows for a special type of diffing in which the first DAT is considered a base, and for each additional input DAT, it only leaves the files that are not in one of the previous DATs. This can allow for the creation of rollback sets or even just reduce the amount of duplicates across multiple sets."); } } private static Feature chdsAsFilesFlag @@ -113,10 +122,11 @@ namespace SabreTools get { return new Feature( + "chds-as-files", new List() { "-ic", "--chds-as-files" }, "Treat CHDs as regular files", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature cleanFlag @@ -124,10 +134,11 @@ namespace SabreTools get { return new Feature( + "clean", new List() { "-clean", "--clean" }, "Clean game names according to WoD standards", FeatureType.Flag, - null); + longDescription: "Game names will be sanitized to remove what the original WoD standards deemed as unneeded information, such as parenthesized or bracketed strings."); } } private static Feature copyFilesFlag @@ -135,10 +146,11 @@ namespace SabreTools get { return new Feature( + "copy-files", new List() { "-cf", "--copy-files" }, "Copy files to the temp directory before parsing", FeatureType.Flag, - null); + longDescription: "If this flag is set, then all files that are going to be parsed are moved to the temporary directory before being hashed. This can be helpful in cases where the temp folder is located on an SSD and the user wants to take advantage of this."); } } private static Feature csvFlag @@ -146,10 +158,11 @@ namespace SabreTools get { return new Feature( + "csv", new List() { "-csv", "--csv" }, "Output in Comma-Separated Value format", FeatureType.Flag, - null); + longDescription: "Output all statistical information in standardized CSV format."); } } private static Feature datDeviceNonMergedFlag @@ -157,10 +170,11 @@ namespace SabreTools get { return new Feature( + "dat-device-non-merged", new List() { "-dnd", "--dat-device-non-merged" }, "Create device non-merged sets", FeatureType.Flag, - null); + longDescription: "Preprocess the DAT to have child sets contain all items from the device references. This is incompatible with the other --dat-X flags."); } } private static Feature datFullNonMergedFlag @@ -168,10 +182,11 @@ namespace SabreTools get { return new Feature( + "dat-full-non-merged", new List() { "-df", "--dat-full-non-merged" }, - "Force creating fully non-merged sets", + "Create fully non-merged sets", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature datMergedFlag @@ -179,10 +194,11 @@ namespace SabreTools get { return new Feature( + "dat-merged", new List() { "-dm", "--dat-merged" }, "Force creating merged sets", FeatureType.Flag, - null); + longDescription: "Preprocess the DAT to have parent sets contain all items from the children based on the cloneof tag. This is incompatible with the other --dat-X flags."); } } private static Feature datNonMergedFlag @@ -190,10 +206,11 @@ namespace SabreTools get { return new Feature( + "dat-non-merged", new List() { "-dnm", "--dat-non-merged" }, "Force creating non-merged sets", FeatureType.Flag, - null); + longDescription: "Preprocess the DAT to have child sets contain all items from the parent set based on the romof and cloneof tags. This is incompatible with the other --dat-X flags."); } } private static Feature datSplitFlag @@ -201,10 +218,11 @@ namespace SabreTools get { return new Feature( + "dat-split", new List() { "-ds", "--dat-split" }, "Force creating split sets", FeatureType.Flag, - null); + longDescription: "Preprocess the DAT to remove redundant files between parents and children based on the romof and cloneof tags. This is incompatible with the other --dat-X flags."); } } private static Feature dedupFlag @@ -212,10 +230,11 @@ namespace SabreTools get { return new Feature( + "dedup", new List() { "-dd", "--dedup" }, "Enable deduping in the created DAT", FeatureType.Flag, - null); + longDescription: "For all outputted DATs, allow for hash deduping. This makes sure that there are effectively no duplicates in the output files. Cannot be used with game dedup."); } } private static Feature deleteFlag @@ -223,10 +242,11 @@ namespace SabreTools get { return new Feature( + "delete", new List() { "-del", "--delete" }, "Delete fully rebuilt input files", FeatureType.Flag, - null); + longDescription: "Optionally, the input files, once processed and fully matched, can be deleted. This can be useful when the original file structure is no longer needed or if there is limited space on the source drive."); } } private static Feature depotFlag @@ -234,10 +254,11 @@ namespace SabreTools get { return new Feature( + "depot", new List() { "-dep", "--depot" }, "Assume directories are romba depots", FeatureType.Flag, - null); + longDescription: "Normally, input directories will be treated with no special format. If this flag is used, all input directories will be assumed to be romba-style depots."); } } private static Feature depreciatedFlag @@ -245,10 +266,11 @@ namespace SabreTools get { return new Feature( + "depreciated", new List() { "-dpc", "--depreciated" }, "Output 'game' instead of 'machine'", FeatureType.Flag, - null); + longDescription: "By default, Logiqx XML DATs output with the more modern \"machine\" tag for each set. This flag allows users to output the older \"game\" tag instead, for compatibility reasons. [Logiqx only]"); } } private static Feature descriptionAsNameFlag @@ -256,10 +278,11 @@ namespace SabreTools get { return new Feature( + "description-as-name", new List() { "-dan", "--description-as-name" }, "Use description instead of machine name", FeatureType.Flag, - null); + longDescription: "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 will result in no change in the output DAT, but a notable example would be a software list DAT where the machine names are generally DOS-friendly while the description is more complete."); } } private static Feature diffFlag @@ -267,10 +290,11 @@ namespace SabreTools get { return new Feature( + "diff", new List() { "-di", "--diff" }, "Create diffdats from inputs (all outputs)", FeatureType.Flag, - null); + longDescription: "By default, all DATs are processed individually with the user-specified flags. With this flag enabled, input DATs are diffed against each other in all ways specified by the --diff-X flags."); } } private static Feature diffDuFlag @@ -278,10 +302,11 @@ namespace SabreTools get { return new Feature( + "diff-du", new List() { "-did", "--diff-du" }, "Create diffdat containing just duplicates", FeatureType.Flag, - null); + longDescription: "All files that have duplicates outside of the original DAT are included."); } } private static Feature diffInFlag @@ -289,10 +314,11 @@ namespace SabreTools get { return new Feature( + "diff-in", new List() { "-dii", "--diff-in" }, "Create diffdats for individual DATs", FeatureType.Flag, - null); + longDescription: "All files that have no duplicates outside of the original DATs are put into DATs that are named after the source DAT."); } } private static Feature diffNdFlag @@ -300,10 +326,11 @@ namespace SabreTools get { return new Feature( + "diff-nd", new List() { "-din", "--diff-nd" }, "Create diffdat containing no duplicates", FeatureType.Flag, - null); + longDescription: "All files that have no duplicates outside of the original DATs are included."); } } private static Feature excludeOfFlag @@ -311,10 +338,11 @@ namespace SabreTools get { return new Feature( + "exclude-of", new List() { "-xof", "--exclude-of" }, "Exclude romof, cloneof, sampleof tags", FeatureType.Flag, - null); + longDescription: "If this flag is enabled, then the romof, cloneof, and sampleof tags will be omitted from the outputted DAT."); } } private static Feature extensionFlag @@ -322,10 +350,11 @@ namespace SabreTools get { return new Feature( + "extension", new List() { "-es", "--extension" }, "Split DAT(s) by two file extensions", FeatureType.Flag, - null); + longDescription: "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 extensions not listed in the input lists will be included in both outputted DAT files."); } } private static Feature gameDedupFlag @@ -333,10 +362,11 @@ namespace SabreTools get { return new Feature( + "game-dedup", new List() { "-gdd", "--game-dedup" }, - "Enable in-game deduping in the created DAT", + "Enable deduping within games in the created DAT", FeatureType.Flag, - null); + longDescription: "For all outputted DATs, allow for hash deduping but only within the games, and not across the entire DAT. This makes sure that there are effectively no duplicates within each of the output sets. Cannot be used with standard dedup."); } } private static Feature gamePrefixFlag @@ -344,10 +374,11 @@ namespace SabreTools get { return new Feature( + "game-prefix", new List() { "-gp", "--game-prefix" }, "Add game name as a prefix", FeatureType.Flag, - null); + longDescription: "This flag allows for the name of the game to be used as a prefix to each file. [Missfile, MD5, SFV, SHA* only]"); } } private static Feature hashFlag @@ -355,10 +386,11 @@ namespace SabreTools get { return new Feature( + "hash", new List() { "-hs", "--hash" }, "Split DAT(s) or folder by best-available hashes", FeatureType.Flag, - null); + longDescription: "For a DAT, or set of DATs, allow for splitting based on the best available hash for each file within. The order of preference for the outputted DATs is as follows: Nodump, SHA-512, SHA-384, SHA-256, SHA-1, MD5, CRC (or worse)."); } } private static Feature hashOnlyFlag @@ -366,10 +398,11 @@ namespace SabreTools get { return new Feature( + "hash-only", new List() { "-ho", "--hash-only" }, "Check files by hash only", FeatureType.Flag, - null); + longDescription: "This sets a mode where files are not checked based on name but rather hash alone. This allows verification of (possibly) incorrectly named folders and sets to be verified without worrying about the proper set structure to be there."); } } private static Feature htmlFlag @@ -377,10 +410,11 @@ namespace SabreTools get { return new Feature( + "html", new List() { "-html", "--html" }, "Output in HTML format", FeatureType.Flag, - null); + longDescription: "Output all statistical information in standardized HTML format."); } } private static Feature individualFlag @@ -388,10 +422,11 @@ namespace SabreTools get { return new Feature( + "individual", new List() { "-ind", "--individual" }, "Show individual statistics", FeatureType.Flag, - null); + longDescription: "Optionally, the statistics for each of the individual input DATs can be output as well."); } } private static Feature inplaceFlag @@ -399,10 +434,11 @@ namespace SabreTools get { return new Feature( + "inplace", new List() { "-ip", "--inplace" }, "Write to the input directories, where possible", FeatureType.Flag, - null); + longDescription: "By default, files are written to the runtime directory (or the output directory, if set). This flag enables users to write out to the directory that the DATs originated from."); } } private static Feature inverseFlag @@ -410,10 +446,11 @@ namespace SabreTools get { return new Feature( + "inverse", new List() { "-in", "--inverse" }, "Rebuild only files not in DAT", FeatureType.Flag, - null); + longDescription: "Instead of the normal behavior of rebuilding using a DAT, this flag allows the user to use the DAT as a filter instead. All files that are found in the DAT will be skipped and everything else will be output in the selected format."); } } private static Feature levelFlag @@ -421,10 +458,11 @@ namespace SabreTools get { return new Feature( + "level", new List() { "-ls", "--level" }, - "Split a SuperDAT or folder by internal path", + "Split a SuperDAT or folder by lowest available level", FeatureType.Flag, - null); + longDescription: "For a DAT, or set of DATs, allow for splitting based on the lowest available level of game name. That is, if a game name is top/mid/last, then it will create an output DAT for the parent directory \"mid\" in a folder called \"top\" with a game called \"last\"."); } } private static Feature mergeFlag @@ -432,10 +470,11 @@ namespace SabreTools get { return new Feature( + "merge", new List() { "-m", "--merge" }, "Merge the input DATs", FeatureType.Flag, - null); + longDescription: "By default, all DATs are processed individually with the user-specified flags. With this flag enabled, all of the input DATs are merged into a single output. This is best used with the dedup flag."); } } private static Feature noAutomaticDateFlag @@ -443,10 +482,11 @@ namespace SabreTools get { return new Feature( + "no-automatic-date", new List() { "-b", "--no-automatic-date" }, - "Don't include date in automatic name", + "Don't include date in file name", FeatureType.Flag, - null); + longDescription: "Normally, the DAT will be created with the date in the file name in brackets. This flag removes that instead of the default."); } } private static Feature nodumpColumnFlag @@ -454,10 +494,11 @@ namespace SabreTools get { return new Feature( + "nodump-column", new List() { "-nc", "--nodump-column" }, - "Add nodump stats to output", + "Add statistics for nodumps to output", FeatureType.Flag, - null); + longDescription: "Add a new column or field for counting the number of nodumps in the DAT."); } } private static Feature noStoreHeaderFlag @@ -465,10 +506,11 @@ namespace SabreTools get { return new Feature( + "no-store-header", new List() { "-nsh", "--no-store-header" }, "Don't store the extracted header", FeatureType.Flag, - null); + longDescription: "By default, all headers that are removed from files are backed up in the database. This flag allows users to skip that step entirely, avoiding caching the headers at all."); } } private static Feature notRunnableFlag @@ -476,10 +518,11 @@ namespace SabreTools get { return new Feature( + "not-runnable", new List() { "-nrun", "--not-runnable" }, - "Include only items that are marked unrunnable", + "Include only items that are not marked runnable", FeatureType.Flag, - null); + longDescription: "This allows users to include only unrunnable games."); } } private static Feature matchOfTagsFlag @@ -487,10 +530,11 @@ namespace SabreTools get { return new Feature( + "match-of-tags", new List() { "-ofg", "--match-of-tags" }, "Allow cloneof and romof tags to match game name filters", FeatureType.Flag, - null); + longDescription: "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 arcade-based sets."); } } private static Feature onlySameFlag @@ -498,10 +542,11 @@ namespace SabreTools get { return new Feature( + "only-same", new List() { "-ons", "--only-same" }, "Only update description if machine name matches description", FeatureType.Flag, - null); + longDescription: "Normally, updating the description will always overwrite if the machine names are the same. With this flag, descriptions will only be overwritten if they are the same as the machine names."); } } private static Feature outputAllFlag @@ -509,248 +554,263 @@ namespace SabreTools get { return new Feature( + "output-all", new List() { "-oa", "--output-all" }, - "Output in all formats", + "Output in all formats [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputAttractmodeFlag { get { return new Feature( + "output-attractmode", new List() { "-oam", "--output-attractmode" }, - "Output in AttractMode format", + "Output in AttractMode format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputCmpFlag { get { return new Feature( + "output-cmp", new List() { "-oc", "--output-cmp" }, - "Output in CMP format", + "Output in CMP format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputCsvFlag { get { return new Feature( + "output-csv", new List() { "-ocsv", "--output-csv" }, - "Output in CSV format", + "Output in CSV format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputDoscenterFlag { get { return new Feature( + "output-doscenter", new List() { "-od", "--output-doscenter" }, - "Output in DOSCenter format", + "Output in DOSCenter format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputListromFlag { get { return new Feature( + "output-listrom", new List() { "-olr", "--output-listrom" }, - "Output in MAME Listrom format", + "Output in MAME Listrom format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputListxmlFlag { get { return new Feature( + "output-listxml", new List() { "-olx", "--output-listxml" }, - "Output in MAME Listxml format", + "Output in MAME Listxml format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputMd5Flag { get { return new Feature( + "output-md5", new List() { "-omd5", "--output-md5" }, - "Output in MD5 format", + "Output in MD5 format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputMissFlag { get { return new Feature( + "output-miss", new List() { "-om", "--output-miss" }, - "Output in Missfile format", + "Output in Missfile format [DEPRECIATED]", FeatureType.Flag, - new List() - { - "", - "Prefix and postfix can include certain fields from the", - "items by including %blah% in the input.", - "A list of features that can be used are:", - " game, name, crc, md5, sha1, sha256, sha384, sha512, size", - }); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputOfflinelistFlag { get { return new Feature( + "output-offlinelist", new List() { "-ool", "--output-offlinelist" }, - "Output in OfflineList format", + "Output in OfflineList format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputRomcenterFlag { get { return new Feature( + "output-romcenter", new List() { "-or", "--output-romcenter" }, - "Output in RomCenter format", + "Output in RomCenter format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSabredatFlag { get { return new Feature( + "output-sabredat", new List() { "-os", "--output-sabredat" }, - "Output in SabreDat format", + "Output in SabreDat format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSfvFlag { get { return new Feature( + "output-sfv", new List() { "-osfv", "--output-sfv" }, - "Output in SFV format", + "Output in SFV format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSha1Flag { get { return new Feature( + "output-sha1", new List() { "-osha1", "--output-sha1" }, - "Output in SHA-1 format", + "Output in SHA-1 format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSha256Flag { get { return new Feature( + "output-sha256", new List() { "-osha256", "--output-sha256" }, - "Output in SHA-256 format", + "Output in SHA-256 format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSha384Flag { get { return new Feature( + "output-sha384", new List() { "-osha384", "--output-sha384" }, - "Output in SHA-256 format", + "Output in SHA-256 format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSha512Flag { get { return new Feature( + "output-sha512", new List() { "-osha512", "--output-sha512" }, - "Output in SHA-256 format", + "Output in SHA-256 format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSoftwarelistFlag { get { return new Feature( + "output-softwarelist", new List() { "-osl", "--output-softwarelist" }, - "Output in Softwarelist format", + "Output in Softwarelist format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputSsvFlag { get { return new Feature( + "output-ssv", new List() { "-ossv", "--output-ssv" }, - "Output in SSV format", + "Output in SSV format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputTsvFlag { get { return new Feature( + "output-tsv", new List() { "-otsv", "--output-tsv" }, - "Output in TSV format", + "Output in TSV format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature outputXmlFlag { get { return new Feature( + "output-xml", new List() { "-ox", "--output-xml" }, - "Output in Logiqx XML format [default]", + "Output in Logiqx XML format [DEPRECIATED]", FeatureType.Flag, - null); + longDescription: ""); } - } + } // TODO: Remove private static Feature quickFlag { get { return new Feature( + "quick", new List() { "-qs", "--quick" }, "Enable quick scanning of archives", FeatureType.Flag, - null); + longDescription: "For all archives, if this flag is enabled, it will only use the header information to get the archive entries' file information. The upside to this is that it is the fastest option. On the downside, it can only get the CRC and size from most archive formats, leading to possible issues."); } } private static Feature quotesFlag @@ -758,10 +818,11 @@ namespace SabreTools get { return new Feature( + "quotes", new List() { "-q", "--quotes" }, - "Put double-quotes around each item", + "Double-quote each item", FeatureType.Flag, - null); + longDescription: "This flag surrounds the item by double-quotes, not including the prefix or postfix. [*SV, Missfile only]"); } } private static Feature removeExtensionsFlag @@ -769,10 +830,11 @@ namespace SabreTools get { return new Feature( + "remove-extensions", new List() { "-rme", "--remove-extensions" }, - "Remove all extensions from each item", + "Remove all extensions from all items", FeatureType.Flag, - null); + longDescription: "For each item, remove the extension. [Missfile only]"); } } private static Feature removeMd5Flag @@ -780,10 +842,11 @@ namespace SabreTools get { return new Feature( + "remove-md5", new List() { "-rmd5", "--remove-md5" }, "Remove MD5 hashes from the output", FeatureType.Flag, - null); + longDescription: "By default, all available hashes will be written out to the DAT. This will remove all MD5 hashes from the output file(s)."); } } private static Feature removeSha1Flag @@ -791,10 +854,11 @@ namespace SabreTools get { return new Feature( + "remove-sha1", new List() { "-rsha1", "--remove-sha1" }, "Remove SHA-1 hashes from the output", FeatureType.Flag, - null); + longDescription: "By default, all available hashes will be written out to the DAT. This will remove all SHA-1 hashes from the output file(s)."); } } private static Feature removeSha256Flag @@ -802,10 +866,11 @@ namespace SabreTools get { return new Feature( + "remove-sha256", new List() { "-rsha256", "--remove-sha256" }, "Remove SHA-256 hashes from the output", FeatureType.Flag, - null); + longDescription: "By default, all available hashes will be written out to the DAT. This will remove all SHA-256 hashes from the output file(s)."); } } private static Feature removeSha384Flag @@ -813,10 +878,11 @@ namespace SabreTools get { return new Feature( + "remove-sha384", new List() { "-rsha384", "--remove-sha384" }, "Remove SHA-384 hashes from the output", FeatureType.Flag, - null); + longDescription: "By default, all available hashes will be written out to the DAT. This will remove all SHA-384 hashes from the output file(s)."); } } private static Feature removeSha512Flag @@ -824,10 +890,11 @@ namespace SabreTools get { return new Feature( + "remove-sha512", new List() { "-rsha512", "--remove-sha512" }, "Remove SHA-512 hashes from the output", FeatureType.Flag, - null); + longDescription: "By default, all available hashes will be written out to the DAT. This will remove all SHA-512 hashes from the output file(s)."); } } private static Feature removeUnicodeFlag @@ -835,10 +902,11 @@ namespace SabreTools get { return new Feature( + "remove-unicode", new List() { "-ru", "--remove-unicode" }, "Remove unicode characters from names", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature reverseBaseReplaceFlag @@ -846,10 +914,11 @@ namespace SabreTools get { return new Feature( + "reverse-base-replace", new List() { "-rbr", "--reverse-base-replace" }, "Replace item names from base DATs in reverse", FeatureType.Flag, - null); + longDescription: "By default, no item names are changed except when there is a merge occurring. This flag enables users to define a DAT or set of base DATs to use as \"replacements\" for all input DATs. Note that the first found instance of an item in the last base DAT(s) will be used and all others will be discarded. If no additional flag is given, it will default to updating names."); } } private static Feature reverseCascadeFlag @@ -857,10 +926,11 @@ namespace SabreTools get { return new Feature( + "reverse-cascade", new List() { "-rc", "--reverse-cascade" }, "Enable reverse cascaded diffing", FeatureType.Flag, - null); + longDescription: "This flag allows for a special type of diffing in which the last DAT is considered a base, and for each additional input DAT, it only leaves the files that are not in one of the previous DATs. This can allow for the creation of rollback sets or even just reduce the amount of duplicates across multiple sets."); } } private static Feature rombaFlag @@ -868,10 +938,11 @@ namespace SabreTools get { return new Feature( + "romba", new List() { "-ro", "--romba" }, "Treat like a Romba depot (requires SHA-1)", FeatureType.Flag, - null); + longDescription: "This flag allows reading and writing of DATs and output files to and from a Romba-style depot. This also implies TorrentGZ input and output for physical files. Where appropriate, Romba depot files will be created as well."); } } private static Feature romsFlag @@ -879,10 +950,11 @@ namespace SabreTools get { return new Feature( + "roms", new List() { "-r", "--roms" }, "Output roms to miss instead of sets", FeatureType.Flag, - null); + longDescription: "By default, the outputted file will include the name of the game so this flag allows for the name of the rom to be output instead. [Missfile only]"); } } private static Feature runnableFlag @@ -890,10 +962,11 @@ namespace SabreTools get { return new Feature( + "runnable", new List() { "-run", "--runnable" }, "Include only items that are marked runnable", FeatureType.Flag, - null); + longDescription: "This allows users to include only verified runnable games."); } } private static Feature scanAllFlag @@ -901,10 +974,11 @@ namespace SabreTools get { return new Feature( + "scan-all", new List() { "-sa", "--scan-all" }, "Set scanning levels for all archives to 0", FeatureType.Flag, - null); + longDescription: "This flag is the short equivalent to -7z=0 -gz=0 -rar=0 -zip=0 wrapped up. Generally this will be helpful in all cases where the content of the rebuild folder is not entirely known or is known to be mixed."); } } private static Feature sceneDateStripFlag @@ -912,10 +986,11 @@ namespace SabreTools get { return new Feature( + "scene-date-strip", new List() { "-sds", "--scene-date-strip" }, "Remove date from scene-named sets", FeatureType.Flag, - null); + longDescription: "If this flag is enabled, sets with \"scene\" names will have the date removed from the beginning. For example \"01.01.01-Game_Name-GROUP\" would become \"Game_Name-Group\"."); } } private static Feature shortFlag @@ -923,10 +998,11 @@ namespace SabreTools get { return new Feature( + "short", new List() { "-s", "--short" }, "Use short output names", FeatureType.Flag, - null); + longDescription: "Instead of using ClrMamePro-style long names for DATs, use just the name of the folder as the name of the DAT. This can be used in conjunction with --base to output in the format of \"Original Name (Name)\" instead."); } } private static Feature singleSetFlag @@ -934,10 +1010,11 @@ namespace SabreTools get { return new Feature( + "single-set", new List() { "-si", "--single-set" }, "All game names replaced by '!'", FeatureType.Flag, - null); + longDescription: "This is useful for keeping all roms in a DAT in the same archive or folder."); } } private static Feature sizeFlag @@ -945,10 +1022,11 @@ namespace SabreTools get { return new Feature( + "size", new List() { "-szs", "--size" }, "Split DAT(s) or folder by file sizes", FeatureType.Flag, - null); + longDescription: "For a DAT, or set of DATs, allow for splitting based on the sizes of the files, specifically if the type is a Rom (most item types don't have sizes)."); } } private static Feature skipFirstOutputFlag @@ -956,10 +1034,11 @@ namespace SabreTools get { return new Feature( + "skip-first-output", new List() { "-sf", "--skip-first-output" }, "Skip output of first DAT", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature skipArchivesFlag @@ -967,10 +1046,11 @@ namespace SabreTools get { return new Feature( + "skip-archives", new List() { "-ska", "--skip-archives" }, - "Skip any files that are treated like archives", + "Skip all archives", FeatureType.Flag, - null); + longDescription: "Skip any files that are treated like archives"); } } private static Feature skipFilesFlag @@ -978,10 +1058,11 @@ namespace SabreTools get { return new Feature( + "skip-files", new List() { "-skf", "--skip-files" }, - "Skip any files that are not treated like archives", + "Skip all non-archives", FeatureType.Flag, - null); + longDescription: "Skip any files that are not treated like archives"); } } private static Feature skipMd5Flag @@ -989,10 +1070,11 @@ namespace SabreTools get { return new Feature( + "skip-md5", new List() { "-nm", "--skip-md5" }, "Don't include MD5 in output", FeatureType.Flag, - null); + longDescription: "This allows the user to skip calculating the MD5 for each of the files which will speed up the creation of the DAT."); } } private static Feature skipSha1Flag @@ -1000,10 +1082,11 @@ namespace SabreTools get { return new Feature( + "skip-sha1", new List() { "-ns", "--skip-sha1" }, - "Don't include SHA1 in output", + "Don't include SHA-1 in output", FeatureType.Flag, - null); + longDescription: "This allows the user to skip calculating the SHA-1 for each of the files which will speed up the creation of the DAT."); } } private static Feature skipSha256Flag @@ -1011,10 +1094,11 @@ namespace SabreTools get { return new Feature( + "skip-sha256", new List() { "-ns256", "--skip-sha256" }, "Include SHA-256 in output", // TODO: Invert this later FeatureType.Flag, - null); + longDescription: "This allows the user to skip calculating the SHA-256 for each of the files which will speed up the creation of the DAT."); } } private static Feature skipSha384Flag @@ -1022,10 +1106,11 @@ namespace SabreTools get { return new Feature( + "skip-sha384", new List() { "-ns384", "--skip-sha384" }, "Include SHA-384 in output", // TODO: Invert this later FeatureType.Flag, - null); + longDescription: "This allows the user to skip calculating the SHA-384 for each of the files which will speed up the creation of the DAT."); } } private static Feature skipSha512Flag @@ -1033,10 +1118,11 @@ namespace SabreTools get { return new Feature( + "skip-sha512", new List() { "-ns512", "--skip-sha512" }, "Include SHA-512 in output", // TODO: Invert this later FeatureType.Flag, - null); + longDescription: "This allows the user to skip calculating the SHA-512 for each of the files which will speed up the creation of the DAT."); } } private static Feature superdatFlag @@ -1044,10 +1130,11 @@ namespace SabreTools get { return new Feature( + "superdat", new List() { "-sd", "--superdat" }, "Enable SuperDAT creation", FeatureType.Flag, - null); + longDescription: "Set the type flag to \"SuperDAT\" for the output DAT as well as preserving the directory structure of the inputted folder, if applicable."); } } private static Feature tarFlag @@ -1055,10 +1142,11 @@ namespace SabreTools get { return new Feature( + "tar", new List() { "-tar", "--tar" }, - "Enable TAR output", + "Enable Tape ARchive output", FeatureType.Flag, - null); + longDescription: "Instead of outputting the files to folder, files will be rebuilt to Tape ARchive (TAR) files. This format is a standardized storage archive without any compression, usually used with other compression formats around it. It is widely used in backup applications and source code archives."); } } private static Feature textFlag @@ -1066,10 +1154,11 @@ namespace SabreTools get { return new Feature( + "text", new List() { "-txt", "--text" }, "Output in generic text format", FeatureType.Flag, - null); + longDescription: "Output all statistical information in generic text format. If no other format flags are enabled, this is the default output."); } } private static Feature torrent7zipFlag @@ -1077,10 +1166,11 @@ namespace SabreTools get { return new Feature( + "torrent-7zip", new List() { "-t7z", "--torrent-7zip" }, - "Enable Torrent7z output", + "Enable Torrent7Zip output", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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 unused by any major application. Currently does not produce proper Torrent-compatible outputs."); } } private static Feature torrentGzipFlag @@ -1088,10 +1178,11 @@ namespace SabreTools get { return new Feature( + "torrent-gzip", new List() { "-tgz", "--torrent-gzip" }, - "Enable TorrentGZ output", + "Enable Torrent GZip output", FeatureType.Flag, - null); + longDescription: "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 by the SHA-1 of the file inside. This is primarily used by external tool Romba (https://github.com/uwedeportivo/romba), but may be used more widely in the future."); } } private static Feature torrentLrzipFlag @@ -1099,10 +1190,11 @@ namespace SabreTools get { return new Feature( + "torrent-lrzip", new List() { "-tlrz", "--torrent-lrzip" }, - "Enable TorrentLRZ output", + "Enable Torrent Long-Range Zip output [UNIMPLEMENTED]", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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."); } } private static Feature torrentLz4Flag @@ -1110,10 +1202,11 @@ namespace SabreTools get { return new Feature( + "torrent-lz4", new List() { "-tlz4", "--torrent-lz4" }, - "Enable TorrentLZ4 output", + "Enable Torrent LZ4 output [UNIMPLEMENTED]", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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."); } } private static Feature torrentRarFlag @@ -1121,10 +1214,11 @@ namespace SabreTools get { return new Feature( + "torrent-rar", new List() { "-trar", "--torrent-rar" }, - "Enable TorrentRAR output", + "Enable Torrent RAR output [UNIMPLEMENTED]", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature torrentXzFlag @@ -1132,10 +1226,11 @@ namespace SabreTools get { return new Feature( + "torrent-xz", new List() { "-txz", "--torrent-xz" }, - "Enable TorrentXZ output", + "Enable Torrent XZ output [UNSUPPORTED]", FeatureType.Flag, - null); + longDescription: "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."); } } private static Feature torrentZipFlag @@ -1143,10 +1238,11 @@ namespace SabreTools get { return new Feature( + "torrent-zip", new List() { "-tzip", "--torrent-zip" }, - "Enable TorrentZip output", + "Enable Torrent Zip output", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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."); } } private static Feature torrentZpaqFlag @@ -1154,10 +1250,11 @@ namespace SabreTools get { return new Feature( + "torrent-zpaq", new List() { "-tzpaq", "--torrent-zpaq" }, - "Enable TorrentZPAQ output", + "Enable Torrent ZPAQ output [UNIMPLEMENTED]", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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."); } } private static Feature torrentZstdFlag @@ -1165,10 +1262,11 @@ namespace SabreTools get { return new Feature( + "torrent-zstd", new List() { "-tzstd", "--torrent-zstd" }, - "Enable TorrentZstd output", + "Enable Torrent Zstd output [UNIMPLEMENTED]", FeatureType.Flag, - null); + longDescription: "Instead of outputting 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 custom header information. This is currently unused by any major application."); } } private static Feature trimFlag @@ -1176,10 +1274,11 @@ namespace SabreTools get { return new Feature( + "trim", new List() { "-trim", "--trim" }, "Trim file names to fit NTFS length", FeatureType.Flag, - null); + longDescription: "In the cases where files will have too long a name, this allows for trimming the name of the files to the NTFS maximum length at most."); } } private static Feature tsvFlag @@ -1187,10 +1286,11 @@ namespace SabreTools get { return new Feature( + "tsv", new List() { "-tsv", "--tsv" }, "Output in Tab-Separated Value format", FeatureType.Flag, - null); + longDescription: "Output all statistical information in standardized TSV format."); } } private static Feature typeFlag @@ -1198,10 +1298,11 @@ namespace SabreTools get { return new Feature( + "type", new List() { "-ts", "--type" }, "Split DAT(s) or folder by file types (rom/disk)", FeatureType.Flag, - null); + longDescription: "For a DAT, or set of DATs, allow for splitting based on the types of the files, specifically if the type is a rom or a disk."); } } private static Feature updateDatFlag @@ -1209,10 +1310,11 @@ namespace SabreTools get { return new Feature( + "update-dat", new List() { "-ud", "--update-dat" }, "Output updated DAT to output directory", FeatureType.Flag, - null); + longDescription: "Once the files that were able to rebuilt are taken care of, a DAT of the files that could not be matched will be output to the output directory."); } } private static Feature updateDescriptionFlag @@ -1220,10 +1322,11 @@ namespace SabreTools get { return new Feature( + "update-description", new List() { "-udd", "--update-description" }, "Update machine descriptions from base DATs", FeatureType.Flag, - null); + longDescription: "This flag enables updating of machine descriptions from base DATs."); } } private static Feature updateHashesFlag @@ -1231,10 +1334,11 @@ namespace SabreTools get { return new Feature( + "update-hashes", new List() { "-uh", "--update-hashes" }, "Update hashes from base DATs", FeatureType.Flag, - null); + longDescription: "This flag enables updating of hashes from base DATs."); } } private static Feature updateManufacturerFlag @@ -1242,10 +1346,11 @@ namespace SabreTools get { return new Feature( + "update-manufacturer", new List() { "-um", "--update-manufacturer" }, "Update machine manufacturers from base DATs", FeatureType.Flag, - null); + longDescription: "This flag enables updating of machine manufacturers from base DATs."); } } private static Feature updateNamesFlag @@ -1253,10 +1358,11 @@ namespace SabreTools get { return new Feature( + "update-names", new List() { "-un", "--update-names" }, "Update item names from base DATs", FeatureType.Flag, - null); + longDescription: "This flag enables updating of item names from base DATs."); } } private static Feature updateYearFlag @@ -1264,10 +1370,11 @@ namespace SabreTools get { return new Feature( + "update-year", new List() { "-uy", "--update-year" }, "Update machine years from base DATs", FeatureType.Flag, - null); + longDescription: "This flag enables updating of machine years from base DATs."); } } @@ -1280,10 +1387,11 @@ namespace SabreTools get { return new Feature( + "gz", new List() { "-gz", "--gz" }, "Set scanning level for GZip archives (default 1)", FeatureType.Int32, - null); + longDescription: ""); } } private static Feature rarInt32Input @@ -1291,10 +1399,11 @@ namespace SabreTools get { return new Feature( + "rar", new List() { "-rar", "--rar" }, "Set scanning level for RAR archives (default 1)", FeatureType.Int32, - null); + longDescription: ""); } } private static Feature sevenZipInt32Input @@ -1302,10 +1411,11 @@ namespace SabreTools get { return new Feature( + "7z", new List() { "-7z", "--7z" }, "Set scanning level for 7z archives (default 1)", FeatureType.Int32, - null); + longDescription: ""); } } private static Feature threadsInt32Input @@ -1313,10 +1423,11 @@ namespace SabreTools get { return new Feature( + "threads", new List() { "-mt", "--threads" }, "Amount of threads to use (default = # cores, -1 unlimted)", FeatureType.Int32, - null); + longDescription: ""); } } private static Feature zipInt32Input @@ -1324,10 +1435,11 @@ namespace SabreTools get { return new Feature( + "zip", new List() { "-zip", "--zip" }, "Set scanning level for ZIP archives (default 1)", FeatureType.Int32, - null); + longDescription: ""); } } @@ -1340,10 +1452,11 @@ namespace SabreTools get { return new Feature( + "radix", new List() { "-rad", "--radix" }, "Set the midpoint to split at", FeatureType.Int64, - null); + longDescription: ""); } } @@ -1356,10 +1469,11 @@ namespace SabreTools get { return new Feature( + "base-dat", new List() { "-bd", "--base-dat" }, "Add a base DAT for processing", FeatureType.List, - null); + longDescription: ""); } } private static Feature crcListInput @@ -1367,10 +1481,11 @@ namespace SabreTools get { return new Feature( + "crc", new List() { "-crc", "--crc" }, "Filter by CRC hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature datListInput @@ -1378,10 +1493,11 @@ namespace SabreTools get { return new Feature( + "dat", new List() { "-dat", "--dat" }, "Input DAT", FeatureType.List, - null); + longDescription: ""); } } private static Feature extaListInput @@ -1389,10 +1505,11 @@ namespace SabreTools get { return new Feature( + "exta", new List() { "-exta", "--exta" }, "First extension (multiple allowed)", FeatureType.List, - null); + longDescription: ""); } } private static Feature extbListInput @@ -1400,10 +1517,11 @@ namespace SabreTools get { return new Feature( + "extb", new List() { "-extb", "--extb" }, "Second extension (multiple allowed)", FeatureType.List, - null); + longDescription: ""); } } private static Feature gameDescriptionListInput @@ -1411,10 +1529,11 @@ namespace SabreTools get { return new Feature( + "game-description", new List() { "-gd", "--game-description" }, "Filter by game description", FeatureType.List, - null); + longDescription: ""); } } private static Feature gameNameListInput @@ -1422,10 +1541,11 @@ namespace SabreTools get { return new Feature( + "game-name", new List() { "-gn", "--game-name" }, "Filter by game name", FeatureType.List, - null); + longDescription: ""); } } private static Feature gameTypeListInput @@ -1433,14 +1553,10 @@ namespace SabreTools get { return new Feature( + "game-type", new List() { "-gt", "--game-type" }, - "Include only games with a given type", - FeatureType.List, - new List() - { - " Supported values are:", - " None, Bios, Device, Mechanical", - }); + "Include only games with a given type [None, Bios, Device, Mechanical]", + FeatureType.List); } } private static Feature itemNameListInput @@ -1448,10 +1564,11 @@ namespace SabreTools get { return new Feature( + "item-name", new List() { "-rn", "--item-name" }, "Filter by item name", FeatureType.List, - null); + longDescription: ""); } } private static Feature itemTypeListInput @@ -1459,10 +1576,11 @@ namespace SabreTools get { return new Feature( + "item-type", new List() { "-rt", "--item-type" }, "Filter by item type", FeatureType.List, - null); + longDescription: ""); } } private static Feature md5ListInput @@ -1470,10 +1588,11 @@ namespace SabreTools get { return new Feature( + "md5", new List() { "-md5", "--md5" }, "Filter by MD5 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notCrcListInput @@ -1481,10 +1600,11 @@ namespace SabreTools get { return new Feature( + "not-crc", new List() { "-ncrc", "--not-crc" }, "Filter by not CRC hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notGameDescriptionListInput @@ -1492,10 +1612,11 @@ namespace SabreTools get { return new Feature( + "not-game-description", new List() { "-ngd", "--not-game-description" }, "Filter by not game description", FeatureType.List, - null); + longDescription: ""); } } private static Feature notGameNameListInput @@ -1503,10 +1624,11 @@ namespace SabreTools get { return new Feature( + "not-game-name", new List() { "-ngn", "--not-game-name" }, "Filter by not game name", FeatureType.List, - null); + longDescription: ""); } } private static Feature notGameTypeListInput @@ -1514,10 +1636,11 @@ namespace SabreTools get { return new Feature( + "not-game-type", new List() { "-ngt", "--not-game-type" }, "Exclude only games with a given type", FeatureType.List, - new List() + additionalNotes: new List() { " Supported values are:", " None, Bios, Device, Mechanical", @@ -1529,10 +1652,11 @@ namespace SabreTools get { return new Feature( + "not-item-name", new List() { "-nrn", "--not-item-name" }, "Filter by not rom name", FeatureType.List, - null); + longDescription: ""); } } private static Feature notItemTypeListInput @@ -1540,10 +1664,11 @@ namespace SabreTools get { return new Feature( + "not-item-type", new List() { "-nrt", "--not-item-type" }, "Filter by not item type", FeatureType.List, - null); + longDescription: ""); } } private static Feature notMd5ListInput @@ -1551,10 +1676,11 @@ namespace SabreTools get { return new Feature( + "not-md5", new List() { "-nmd5", "--not-md5" }, "Filter by not MD5 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notSha1ListInput @@ -1562,10 +1688,11 @@ namespace SabreTools get { return new Feature( + "not-sha1", new List() { "-nsha1", "--not-sha1" }, "Filter by not SHA-1 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notSha256ListInput @@ -1573,10 +1700,11 @@ namespace SabreTools get { return new Feature( + "not-sha256", new List() { "-nsha256", "--not-sha256" }, "Filter by not SHA-256 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notSha384ListInput @@ -1584,10 +1712,11 @@ namespace SabreTools get { return new Feature( + "not-sha384", new List() { "-nsha384", "--not-sha384" }, "Filter by not SHA-384 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notSha512ListInput @@ -1595,10 +1724,11 @@ namespace SabreTools get { return new Feature( + "not-sha512", new List() { "-nsha512", "--not-sha512" }, "Filter by not SHA-512 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature notStatusListInput @@ -1606,34 +1736,27 @@ namespace SabreTools get { return new Feature( + "not-status", new List() { "-nis", "--not-status" }, "Exclude only items with a given status", FeatureType.List, - new List() + additionalNotes: new List() { " Supported values are:", " None, Good, BadDump, Nodump, Verified", }); } } - private static Feature outputTypeListInput // TODO: Add to README + private static Feature outputTypeListInput { get { return new Feature( + "output-type", new List() { "-ot", "--output-type" }, - "Output DATs to a given type or types", + "Output DATs to a given format [all, am/attractmode, cmp/clrmamepro, csv, dc/doscenter, lr/listrom, lx/listxml, miss/missfile, md5, ol/offlinelist, rc/romcenter, sd/sabredat, sfv, sha1, sha256, sha384, sha512, sl/softwarelist, ssv, tsv, xml/logiqx", FeatureType.List, - new List() - { - " Supported values are:", - " all, am/attractmode, cmp/clrmamepro, csv,", - " dc/doscenter, lr/listrom, lx/listxml,", - " miss/missfile, md5, ol/offlinelist,", - " rc/romcenter, sd/sabredat, sfv, sha1,", - " sha256, sha384, sha512, sl/softwarelist", - " xml/logiqx", - }); + longDescription: ""); } } private static Feature sha1ListInput @@ -1641,10 +1764,11 @@ namespace SabreTools get { return new Feature( + "sha1", new List() { "-sha1", "--sha1" }, "Filter by SHA-1 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature sha256ListInput @@ -1652,10 +1776,11 @@ namespace SabreTools get { return new Feature( + "sha256", new List() { "-sha256", "--sha256" }, "Filter by SHA-256 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature sha384ListInput @@ -1663,10 +1788,11 @@ namespace SabreTools get { return new Feature( + "sha384", new List() { "-sha384", "--sha384" }, "Filter by SHA-384 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature sha512ListInput @@ -1674,10 +1800,11 @@ namespace SabreTools get { return new Feature( + "sha512", new List() { "-sha512", "--sha512" }, "Filter by SHA-512 hash", FeatureType.List, - null); + longDescription: ""); } } private static Feature statusListInput @@ -1685,10 +1812,11 @@ namespace SabreTools get { return new Feature( + "status", new List() { "-is", "--status" }, "Include only items with a given status", FeatureType.List, - new List() + additionalNotes: new List() { " Supported values are:", " None, Good, BadDump, Nodump, Verified", @@ -1705,10 +1833,11 @@ namespace SabreTools get { return new Feature( + "add-extension", new List() { "-ae", "--add-extension" }, - "Add an extension to each item", + "Add an extension to each item [Missfile]", FeatureType.String, - null); + longDescription: ""); } } private static Feature authorStringInput @@ -1716,10 +1845,11 @@ namespace SabreTools get { return new Feature( + "author", new List() { "-au", "--author" }, "Set the author of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature categoryStringInput @@ -1727,10 +1857,11 @@ namespace SabreTools get { return new Feature( + "category", new List() { "-c", "--category" }, "Set the category of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature commentStringInput @@ -1738,10 +1869,11 @@ namespace SabreTools get { return new Feature( + "comment", new List() { "-co", "--comment" }, "Set a new comment of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature dateStringInput @@ -1749,10 +1881,11 @@ namespace SabreTools get { return new Feature( + "date", new List() { "-da", "--date" }, "Set a new date", FeatureType.String, - null); + longDescription: ""); } } private static Feature descriptionStringInput @@ -1760,10 +1893,11 @@ namespace SabreTools get { return new Feature( + "description", new List() { "-de", "--description" }, "Set the description of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature emailStringInput @@ -1771,10 +1905,11 @@ namespace SabreTools get { return new Feature( + "email", new List() { "-em", "--email" }, "Set a new email of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature equalStringInput @@ -1782,10 +1917,11 @@ namespace SabreTools get { return new Feature( + "equal", new List() { "-seq", "--equal" }, "Filter by size ==", FeatureType.String, - null); + longDescription: ""); } } private static Feature filenameStringInput @@ -1793,10 +1929,11 @@ namespace SabreTools get { return new Feature( + "filename", new List() { "-f", "--filename" }, "Set the external name of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature forcemergingStringInput @@ -1804,10 +1941,11 @@ namespace SabreTools get { return new Feature( + "forcemerging", new List() { "-fm", "--forcemerging" }, "Set force merging", FeatureType.String, - new List() + additionalNotes: new List() { " Supported values are:", " None, Split, Merged, Nonmerged, Full", @@ -1819,10 +1957,11 @@ namespace SabreTools get { return new Feature( + "forcenodump", new List() { "-fn", "--forcenodump" }, "Set force nodump", FeatureType.String, - new List() + additionalNotes: new List() { " Supported values are:", " None, Obsolete, Required, Ignore", @@ -1834,14 +1973,11 @@ namespace SabreTools get { return new Feature( + "forcepacking", new List() { "-fp", "--forcepacking" }, - "Set force packing", + "Set force packing [None, Zip, Unzip]", FeatureType.String, - new List() - { - "Supported values are:", - " None, Zip, Unzip", - }); + longDescription: ""); } } private static Feature greaterStringInput @@ -1849,10 +1985,11 @@ namespace SabreTools get { return new Feature( + "greater", new List() { "-sgt", "--greater" }, "Filter by size >=", FeatureType.String, - null); + longDescription: ""); } } private static Feature headerStringInput @@ -1860,10 +1997,11 @@ namespace SabreTools get { return new Feature( + "header", new List() { "-h", "--header" }, "Set a header skipper to use, blank means all", FeatureType.String, - null); + longDescription: ""); } } @@ -1872,10 +2010,11 @@ namespace SabreTools get { return new Feature( + "homepage", new List() { "-hp", "--homepage" }, "Set a new homepage of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature lessStringInput @@ -1883,10 +2022,11 @@ namespace SabreTools get { return new Feature( + "less", new List() { "-slt", "--less" }, "Filter by size =<", FeatureType.String, - null); + longDescription: ""); } } private static Feature nameStringInput @@ -1894,10 +2034,11 @@ namespace SabreTools get { return new Feature( + "name", new List() { "-n", "--name" }, "Set the internal name of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature outputDirStringInput @@ -1905,10 +2046,11 @@ namespace SabreTools get { return new Feature( + "output-dir", new List() { "-out", "--output-dir" }, "Output directory", FeatureType.String, - null); + longDescription: ""); } } private static Feature postfixStringInput @@ -1916,10 +2058,11 @@ namespace SabreTools get { return new Feature( + "postfix", new List() { "-post", "--postfix" }, - "Set postfix for all lines", + "Set postfix for all lines [*SV, Missfile]", FeatureType.String, - null); + longDescription: ""); } } private static Feature prefixStringInput @@ -1927,10 +2070,11 @@ namespace SabreTools get { return new Feature( + "prefix", new List() { "-pre", "--prefix" }, - "Set prefix for all lines", + "Set prefix for all lines [*SV, Missfile]", FeatureType.String, - null); + longDescription: ""); } } private static Feature replaceExtensionStringInput @@ -1938,10 +2082,11 @@ namespace SabreTools get { return new Feature( + "replace-extension", new List() { "-rep", "--replace-extension" }, - "Replace all extensions with specified", + "Replace all extensions with specified [Missfile]", FeatureType.String, - null); + longDescription: ""); } } private static Feature rootStringInput @@ -1949,10 +2094,11 @@ namespace SabreTools get { return new Feature( + "root", new List() { "-r", "--root" }, "Set a new rootdir", FeatureType.String, - null); + longDescription: ""); } } private static Feature rootDirFeature @@ -1960,10 +2106,11 @@ namespace SabreTools get { return new Feature( + "root-dir", new List() { "-rd", "--root-dir" }, "Set the root directory for calc", FeatureType.String, - null); + longDescription: ""); } } private static Feature tempFeature @@ -1971,10 +2118,11 @@ namespace SabreTools get { return new Feature( + "temp", new List() { "-t", "--temp" }, "Set the temporary directory to use", FeatureType.String, - null); + longDescription: ""); } } private static Feature urlFeature @@ -1982,10 +2130,11 @@ namespace SabreTools get { return new Feature( + "url", new List() { "-u", "--url" }, "Set a new URL of the DAT", FeatureType.String, - null); + longDescription: ""); } } private static Feature versionFeature @@ -1993,10 +2142,11 @@ namespace SabreTools get { return new Feature( + "version", new List() { "-v", "--version" }, "Set the version of the DAT", FeatureType.String, - null); + longDescription: ""); } } @@ -2018,119 +2168,127 @@ namespace SabreTools #region Help Feature helpFeature = new Feature( + "Help", new List() { "-?", "-h", "--help" }, "Show this help", FeatureType.Flag, - null); + longDescription: ""); #endregion #region Script Feature script = new Feature( + "Script", "--script", "Enable script mode (no clear screen)", FeatureType.Flag, - null); + longDescription: ""); #endregion #region DATFromDir Feature datFromDir = new Feature( + "DATFromDir", new List() { "-d", "--d2d", "--dfd" }, "Create DAT(s) from an input directory", FeatureType.Flag, - null); - 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("forcepacking", forcepackingStringInput); - datFromDir.AddFeature("archives-as-files", archivesAsFilesFlag); - //datFromDir.AddFeature("output-type", outputTypeListInput); - // datFromDir["output-type"].AddFeature("depreciated", depreciatedFlag); // TODO: Add note about XML - 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-listxml", outputListxmlFlag); - 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-ssv", outputSsvFlag); - datFromDir.AddFeature("output-tsv", outputTsvFlag); - datFromDir.AddFeature("output-xml", outputXmlFlag); - datFromDir["output-xml"].AddFeature("depreciated", depreciatedFlag); - datFromDir.AddFeature("romba", rombaFlag); - datFromDir.AddFeature("skip-archives", skipArchivesFlag); - datFromDir.AddFeature("skip-files", skipFilesFlag); - datFromDir.AddFeature("filename", filenameStringInput); - datFromDir.AddFeature("name", nameStringInput); - datFromDir.AddFeature("description", descriptionStringInput); - datFromDir.AddFeature("category", categoryStringInput); - datFromDir.AddFeature("version", versionFeature); - datFromDir.AddFeature("author", authorStringInput); - datFromDir.AddFeature("email", emailStringInput); - datFromDir.AddFeature("homepage", homepageStringInput); - datFromDir.AddFeature("url", urlFeature); - datFromDir.AddFeature("comment", commentStringInput); - 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", headerStringInput); - datFromDir.AddFeature("chds-as-files", chdsAsFilesFlag); - datFromDir.AddFeature("temp", tempFeature); - datFromDir.AddFeature("output-dir", outputDirStringInput); - datFromDir.AddFeature("threads", threadsInt32Input); + longDescription: ""); + datFromDir.AddFeature(skipMd5Flag); + datFromDir.AddFeature(skipSha1Flag); + datFromDir.AddFeature(skipSha256Flag); + datFromDir.AddFeature(skipSha384Flag); + datFromDir.AddFeature(skipSha512Flag); + datFromDir.AddFeature(noAutomaticDateFlag); + datFromDir.AddFeature(forcepackingStringInput); + datFromDir.AddFeature(archivesAsFilesFlag); + // NEW + datFromDir.AddFeature(outputTypeListInput); + datFromDir[outputTypeListInput.Name].AddFeature(depreciatedFlag); + // OLD + datFromDir.AddFeature(outputAllFlag); + datFromDir.AddFeature(outputAttractmodeFlag); + datFromDir.AddFeature(outputCmpFlag); + datFromDir.AddFeature(outputCsvFlag); + datFromDir.AddFeature(outputDoscenterFlag); + datFromDir.AddFeature(outputListromFlag); + datFromDir.AddFeature(outputListxmlFlag); + datFromDir.AddFeature(outputMissFlag); + datFromDir.AddFeature(outputMd5Flag); + datFromDir.AddFeature(outputOfflinelistFlag); + datFromDir.AddFeature(outputRomcenterFlag); + datFromDir.AddFeature(outputSabredatFlag); + datFromDir.AddFeature(outputSfvFlag); + datFromDir.AddFeature(outputSha1Flag); + datFromDir.AddFeature(outputSha256Flag); + datFromDir.AddFeature(outputSha384Flag); + datFromDir.AddFeature(outputSha512Flag); + datFromDir.AddFeature(outputSoftwarelistFlag); + datFromDir.AddFeature(outputSsvFlag); + datFromDir.AddFeature(outputTsvFlag); + datFromDir.AddFeature(outputXmlFlag); + datFromDir[outputXmlFlag].AddFeature(depreciatedFlag); + datFromDir.AddFeature(rombaFlag); + datFromDir.AddFeature(skipArchivesFlag); + datFromDir.AddFeature(skipFilesFlag); + datFromDir.AddFeature(filenameStringInput); + datFromDir.AddFeature(nameStringInput); + datFromDir.AddFeature(descriptionStringInput); + datFromDir.AddFeature(categoryStringInput); + datFromDir.AddFeature(versionFeature); + datFromDir.AddFeature(authorStringInput); + datFromDir.AddFeature(emailStringInput); + datFromDir.AddFeature(homepageStringInput); + datFromDir.AddFeature(urlFeature); + datFromDir.AddFeature(commentStringInput); + datFromDir.AddFeature(superdatFlag); + datFromDir.AddFeature(excludeOfFlag); + datFromDir.AddFeature(sceneDateStripFlag); + datFromDir.AddFeature(addBlankFilesFlag); + datFromDir.AddFeature(addDateFlag); + datFromDir.AddFeature(copyFilesFlag); + datFromDir.AddFeature(headerStringInput); + datFromDir.AddFeature(chdsAsFilesFlag); + datFromDir.AddFeature(tempFeature); + datFromDir.AddFeature(outputDirStringInput); + datFromDir.AddFeature(threadsInt32Input); #endregion #region Extract Feature extract = new Feature( + "Extract", new List() { "-ex", "--extract" }, "Extract and remove copier headers", FeatureType.Flag, - null); - extract.AddFeature("output-dir", outputDirStringInput); - extract.AddFeature("no-store-header", noStoreHeaderFlag); + longDescription: ""); + extract.AddFeature(outputDirStringInput); + extract.AddFeature(noStoreHeaderFlag); #endregion #region Restore Feature restore = new Feature( + "Restore", new List() { "-re", "--restore" }, "Restore header to file based on SHA-1", FeatureType.Flag, - null); - restore.AddFeature("output-dir", outputDirStringInput); + longDescription: ""); + restore.AddFeature(outputDirStringInput); #endregion #region Sort Feature sort = new Feature( + "Sort", new List() { "-ss", "--sort" }, "Sort inputs by a set of DATs", FeatureType.Flag, - new List() + additionalNotes: new List() { "", "Archive scanning levels:", @@ -2138,114 +2296,119 @@ namespace SabreTools " 1 Only hash contents", " 2 Only hash archive", }); - sort.AddFeature("dat", datListInput); - sort.AddFeature("output-dir", outputDirStringInput); - 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["torrent-gzip"].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", headerStringInput); - sort.AddFeature("7z", sevenZipInt32Input); - sort.AddFeature("gz", gzInt32Input); - sort.AddFeature("rar", rarInt32Input); - sort.AddFeature("zip", zipInt32Input); - 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("threads", threadsInt32Input); + sort.AddFeature(datListInput); + sort.AddFeature(outputDirStringInput); + sort.AddFeature(depotFlag); + sort.AddFeature(deleteFlag); + sort.AddFeature(inverseFlag); + sort.AddFeature(quickFlag); + sort.AddFeature(chdsAsFilesFlag); + sort.AddFeature(addDateFlag); + sort.AddFeature(torrent7zipFlag); + sort.AddFeature(tarFlag); + sort.AddFeature(torrentGzipFlag); + sort[torrentGzipFlag].AddFeature(rombaFlag); + //sort.AddFeature(tlrzFeature); + //sort.AddFeature(tlz4Feature); + //sort.AddFeature(trarFeature); + //sort.AddFeature(txzFeature); + sort.AddFeature(torrentZipFlag); + //sort.AddFeature(tzpaqFeature); + //sort.AddFeature(tzstdFeature); + sort.AddFeature(headerStringInput); + sort.AddFeature(sevenZipInt32Input); + sort.AddFeature(gzInt32Input); + sort.AddFeature(rarInt32Input); + sort.AddFeature(zipInt32Input); + sort.AddFeature(scanAllFlag); + sort.AddFeature(datMergedFlag); + sort.AddFeature(datSplitFlag); + sort.AddFeature(datNonMergedFlag); + sort.AddFeature(datDeviceNonMergedFlag); + sort.AddFeature(datFullNonMergedFlag); + sort.AddFeature(updateDatFlag); + sort.AddFeature(threadsInt32Input); #endregion #region Split Feature split = new Feature( + "Split", new List() { "-sp", "--split" }, "Split input DATs by a given criteria", FeatureType.Flag, - null); - //split.AddFeature("output-type", outputTypeListInput); - // split["output-type"].AddFeature("depreciated", depreciatedFlag); // TODO: Add note about XML - 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-listxml", outputListxmlFlag); - 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-ssv", outputSsvFlag); - split.AddFeature("output-tsv", outputTsvFlag); - split.AddFeature("output-xml", outputXmlFlag); - split["output-xml"].AddFeature("depreciated", depreciatedFlag); - split.AddFeature("output-dir", outputDirStringInput); - split.AddFeature("inplace", inplaceFlag); - split.AddFeature("extension", extensionFlag); - split["extension"].AddFeature("exta", extaListInput); - split["extension"].AddFeature("extb", extbListInput); - split.AddFeature("hash", hashFlag); - split.AddFeature("level", levelFlag); - split["level"].AddFeature("short", shortFlag); - split["level"].AddFeature("base", baseFlag); - split.AddFeature("size", sizeFlag); - split["size"].AddFeature("radix", radixInt64Input); - split.AddFeature("type", typeFlag); + longDescription: ""); + // NEW + split.AddFeature(outputTypeListInput); + split[outputTypeListInput.Name].AddFeature(depreciatedFlag); + // OLD + split.AddFeature(outputAllFlag); + split.AddFeature(outputAttractmodeFlag); + split.AddFeature(outputCmpFlag); + split.AddFeature(outputCsvFlag); + split.AddFeature(outputDoscenterFlag); + split.AddFeature(outputListromFlag); + split.AddFeature(outputListxmlFlag); + split.AddFeature(outputMissFlag); + split.AddFeature(outputMd5Flag); + split.AddFeature(outputOfflinelistFlag); + split.AddFeature(outputRomcenterFlag); + split.AddFeature(outputSabredatFlag); + split.AddFeature(outputSfvFlag); + split.AddFeature(outputSha1Flag); + split.AddFeature(outputSha256Flag); + split.AddFeature(outputSha384Flag); + split.AddFeature(outputSha512Flag); + split.AddFeature(outputSoftwarelistFlag); + split.AddFeature(outputSsvFlag); + split.AddFeature(outputTsvFlag); + split.AddFeature(outputXmlFlag); + split[outputXmlFlag].AddFeature(depreciatedFlag); + split.AddFeature(outputDirStringInput); + split.AddFeature(inplaceFlag); + split.AddFeature(extensionFlag); + split[extensionFlag].AddFeature(extaListInput); + split[extensionFlag].AddFeature(extbListInput); + split.AddFeature(hashFlag); + split.AddFeature(levelFlag); + split[levelFlag].AddFeature(shortFlag); + split[levelFlag].AddFeature(baseFlag); + split.AddFeature(sizeFlag); + split[sizeFlag].AddFeature(radixInt64Input); + split.AddFeature(typeFlag); #endregion #region Stats Feature stats = new Feature( + "Stats", new List() { "-st", "--stats" }, "Get statistics on all input DATs", FeatureType.Flag, - null); - stats.AddFeature("all-stats", allStatsFlag); - stats.AddFeature("baddump-column", baddumpColumnFlag); - stats.AddFeature("csv", csvFlag); - stats.AddFeature("filename", filenameStringInput); - stats.AddFeature("output-dir", outputDirStringInput); - stats.AddFeature("html", htmlFlag); - stats.AddFeature("nodump-column", nodumpColumnFlag); - stats.AddFeature("individual", individualFlag); - stats.AddFeature("tsv", tsvFlag); - stats.AddFeature("text", textFlag); + longDescription: ""); + stats.AddFeature(allStatsFlag); + stats.AddFeature(baddumpColumnFlag); + stats.AddFeature(csvFlag); + stats.AddFeature(filenameStringInput); + stats.AddFeature(outputDirStringInput); + stats.AddFeature(htmlFlag); + stats.AddFeature(nodumpColumnFlag); + stats.AddFeature(individualFlag); + stats.AddFeature(tsvFlag); + stats.AddFeature(textFlag); #endregion #region Update Feature update = new Feature( + "Update", new List() { "-ud", "--update" }, "Update and manipulate DAT file(s)", FeatureType.Flag, - new List() + additionalNotes: new List() { "", "Filter parameters game name, rom name, all hashes can", @@ -2259,201 +2422,204 @@ namespace SabreTools "Most of the filter parameters allow for multiple inputs:", " e.g. --game-name=foo --game-name=bar", }); - //update.AddFeature("output-type", outputTypeListInput); - // update["output-type"].AddFeature("prefix", prefixStringInput); // TODO: Add note about CSV, Missfile, SSV, TSV - // update["output-type"].AddFeature("postfix", postfixStringInput); // TODO: Add note about CSV, Missfile, SSV, TSV - // update["output-type"].AddFeature("quotes", quotesFlag); // TODO: Add note about CSV, Missfile, SSV, TSV - // update["output-type"].AddFeature("roms", romsFlag); // TODO: Add note about Missfile - // update["output-type"].AddFeature("game-prefix", gamePrefixFlag); // TODO: Add note about Missfile, MD5, SFV, SHA1, SHA256, SHA384, SHA512 - // update["output-type"].AddFeature("add-extension", addExtensionStringInput); // TODO: Add note about Missfile - // update["output-type"].AddFeature("replace-extension", replaceExtensionStringInput); // TODO: Add note about Missfile - // update["output-type"].AddFeature("remove-extensions", removeExtensionsFlag); // TODO: Add note about Missfile - // update["output-type"].AddFeature("romba", rombaFlag); // TODO: Add note about Missfile - // update["output-type"].AddFeature("depreciated", depreciatedFlag); // TODO: Add note about XML - 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", prefixStringInput); - update["output-csv"].AddFeature("postfix", postfixStringInput); - update["output-csv"].AddFeature("quotes", quotesFlag); - update.AddFeature("output-doscenter", outputDoscenterFlag); - update.AddFeature("output-listrom", outputListromFlag); - update.AddFeature("output-listxml", outputListxmlFlag); - update.AddFeature("output-miss", outputMissFlag); - update["output-miss"].AddFeature("roms", romsFlag); - update["output-miss"].AddFeature("game-prefix", gamePrefixFlag); - update["output-miss"].AddFeature("prefix", prefixStringInput); - update["output-miss"].AddFeature("postfix", postfixStringInput); - update["output-miss"].AddFeature("quotes", quotesFlag); - update["output-miss"].AddFeature("add-extension", addExtensionStringInput); - update["output-miss"].AddFeature("replace-extension", replaceExtensionStringInput); - 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-ssv", outputSsvFlag); - update["output-ssv"].AddFeature("prefix", prefixStringInput); - update["output-ssv"].AddFeature("postfix", postfixStringInput); - update["output-ssv"].AddFeature("quotes", quotesFlag); - update.AddFeature("output-tsv", outputTsvFlag); - update["output-tsv"].AddFeature("prefix", prefixStringInput); - update["output-tsv"].AddFeature("postfix", postfixStringInput); - update["output-tsv"].AddFeature("quotes", quotesFlag); - update.AddFeature("output-xml", outputXmlFlag); - update["output-xml"].AddFeature("depreciated", depreciatedFlag); - update.AddFeature("filename", filenameStringInput); - update.AddFeature("name", nameStringInput); - update.AddFeature("description", descriptionStringInput); - update.AddFeature("rootdir", rootStringInput); - update.AddFeature("category", categoryStringInput); - update.AddFeature("version", versionFeature); - update.AddFeature("date", dateStringInput); - update.AddFeature("author", authorStringInput); - update.AddFeature("email", emailStringInput); - update.AddFeature("homepage", homepageStringInput); - update.AddFeature("url", urlFeature); - update.AddFeature("comment", commentStringInput); - update.AddFeature("header", headerStringInput); - update.AddFeature("superdat", superdatFlag); - update.AddFeature("forcemerging", forcemergingStringInput); - update.AddFeature("forcenodump", forcenodumpStringInput); - update.AddFeature("forcepacking", forcepackingStringInput); - 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-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", baseDatListInput); - 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"]["reverse-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", baseDatListInput); - update["base-replace"].AddFeature("update-names", updateNamesFlag); - update["base-replace"].AddFeature("update-hashes", updateHashesFlag); - update["base-replace"].AddFeature("update-description", updateDescriptionFlag); - update["base-replace"]["update-description"].AddFeature("only-same", onlySameFlag); - 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", baseDatListInput); - 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"]["update-description"].AddFeature("only-same", onlySameFlag); - update["reverse-base-replace"].AddFeature("update-year", updateYearFlag); - update["reverse-base-replace"].AddFeature("update-manufacturer", updateManufacturerFlag); - update.AddFeature("game-name", gameNameListInput); - update.AddFeature("not-game-name", notGameNameListInput); - update.AddFeature("game-description", gameDescriptionListInput); - update.AddFeature("not-game-description", notGameDescriptionListInput); - update.AddFeature("match-of-tags", matchOfTagsFlag); - update.AddFeature("item-name", itemNameListInput); - update.AddFeature("not-item-name", notItemNameListInput); - update.AddFeature("item-type", itemTypeListInput); - update.AddFeature("not-item-type", notItemTypeListInput); - update.AddFeature("greater", greaterStringInput); - update.AddFeature("less", lessStringInput); - update.AddFeature("equal", equalStringInput); - update.AddFeature("crc", crcListInput); - update.AddFeature("not-crc", notCrcListInput); - update.AddFeature("md5", md5ListInput); - update.AddFeature("not-md5", notMd5ListInput); - update.AddFeature("sha1", sha1ListInput); - update.AddFeature("not-sha1", notSha1ListInput); - update.AddFeature("sha256", sha256ListInput); - update.AddFeature("not-sha256", notSha256ListInput); - update.AddFeature("sha384", sha384ListInput); - update.AddFeature("not-sha384", notSha384ListInput); - update.AddFeature("sha512", sha512ListInput); - update.AddFeature("not-sha512", notSha512ListInput); - update.AddFeature("status", statusListInput); - update.AddFeature("not-status", notStatusListInput); - update.AddFeature("game-type", gameTypeListInput); - update.AddFeature("not-game-type", notGameTypeListInput); - update.AddFeature("runnable", runnableFlag); - update.AddFeature("not-runnable", notRunnableFlag); - update.AddFeature("output-dir", outputDirStringInput); - update.AddFeature("inplace", inplaceFlag); - update.AddFeature("threads", threadsInt32Input); + // NEW + update.AddFeature(outputTypeListInput); + update[outputTypeListInput].AddFeature(prefixStringInput); + update[outputTypeListInput].AddFeature(postfixStringInput); + update[outputTypeListInput].AddFeature(quotesFlag); + update[outputTypeListInput].AddFeature(romsFlag); + update[outputTypeListInput].AddFeature(gamePrefixFlag); + update[outputTypeListInput].AddFeature(addExtensionStringInput); + update[outputTypeListInput].AddFeature(replaceExtensionStringInput); + update[outputTypeListInput].AddFeature(removeExtensionsFlag); + update[outputTypeListInput].AddFeature(rombaFlag); + update[outputTypeListInput].AddFeature(depreciatedFlag); + // OLD + update.AddFeature(outputAllFlag); + update.AddFeature(outputAttractmodeFlag); + update.AddFeature(outputCmpFlag); + update.AddFeature(outputCsvFlag); + update[outputCsvFlag].AddFeature(prefixStringInput); + update[outputCsvFlag].AddFeature(postfixStringInput); + update[outputCsvFlag].AddFeature(quotesFlag); + update.AddFeature(outputDoscenterFlag); + update.AddFeature(outputListromFlag); + update.AddFeature(outputListxmlFlag); + update.AddFeature(outputMissFlag); + update[outputMissFlag].AddFeature(romsFlag); + update[outputMissFlag].AddFeature(gamePrefixFlag); + update[outputMissFlag].AddFeature(prefixStringInput); + update[outputMissFlag].AddFeature(postfixStringInput); + update[outputMissFlag].AddFeature(quotesFlag); + update[outputMissFlag].AddFeature(addExtensionStringInput); + update[outputMissFlag].AddFeature(replaceExtensionStringInput); + update[outputMissFlag].AddFeature(removeExtensionsFlag); + update[outputMissFlag].AddFeature(rombaFlag); + update.AddFeature(outputMd5Flag); + update[outputMd5Flag].AddFeature(gamePrefixFlag); + update.AddFeature(outputOfflinelistFlag); + update.AddFeature(outputRomcenterFlag); + update.AddFeature(outputSabredatFlag); + update.AddFeature(outputSfvFlag); + update[outputSfvFlag].AddFeature(gamePrefixFlag); + update.AddFeature(outputSha1Flag); + update[outputSha1Flag].AddFeature(gamePrefixFlag); + update.AddFeature(outputSha256Flag); + update[outputSha256Flag].AddFeature(gamePrefixFlag); + update.AddFeature(outputSha384Flag); + update[outputSha384Flag].AddFeature(gamePrefixFlag); + update.AddFeature(outputSha512Flag); + update[outputSha512Flag].AddFeature(gamePrefixFlag); + update.AddFeature(outputSoftwarelistFlag); + update.AddFeature(outputSsvFlag); + update[outputSsvFlag].AddFeature(prefixStringInput); + update[outputSsvFlag].AddFeature(postfixStringInput); + update[outputSsvFlag].AddFeature(quotesFlag); + update.AddFeature(outputTsvFlag); + update[outputTsvFlag].AddFeature(prefixStringInput); + update[outputTsvFlag].AddFeature(postfixStringInput); + update[outputTsvFlag].AddFeature(quotesFlag); + update.AddFeature(outputXmlFlag); + update[outputXmlFlag].AddFeature(depreciatedFlag); + update.AddFeature(filenameStringInput); + update.AddFeature(nameStringInput); + update.AddFeature(descriptionStringInput); + update.AddFeature(rootStringInput); + update.AddFeature(categoryStringInput); + update.AddFeature(versionFeature); + update.AddFeature(dateStringInput); + update.AddFeature(authorStringInput); + update.AddFeature(emailStringInput); + update.AddFeature(homepageStringInput); + update.AddFeature(urlFeature); + update.AddFeature(commentStringInput); + update.AddFeature(headerStringInput); + update.AddFeature(superdatFlag); + update.AddFeature(forcemergingStringInput); + update.AddFeature(forcenodumpStringInput); + update.AddFeature(forcepackingStringInput); + update.AddFeature(excludeOfFlag); + update.AddFeature(sceneDateStripFlag); + update.AddFeature(cleanFlag); + update.AddFeature(removeUnicodeFlag); + update.AddFeature(removeMd5Flag); + update.AddFeature(removeSha1Flag); + update.AddFeature(removeSha256Flag); + update.AddFeature(removeSha384Flag); + update.AddFeature(removeSha512Flag); + update.AddFeature(descriptionAsNameFlag); + update.AddFeature(datMergedFlag); + update.AddFeature(datSplitFlag); + update.AddFeature(datNonMergedFlag); + update.AddFeature(datDeviceNonMergedFlag); + update.AddFeature(datFullNonMergedFlag); + update.AddFeature(trimFlag); + update[trimFlag].AddFeature(rootDirFeature); + update.AddFeature(singleSetFlag); + update.AddFeature(dedupFlag); + update.AddFeature(gameDedupFlag); + update.AddFeature(mergeFlag); + update[mergeFlag].AddFeature(noAutomaticDateFlag); + update.AddFeature(diffFlag); + update[diffFlag].AddFeature(againstFlag); + update[diffFlag][againstFlag].AddFeature(baseDatListInput); + update[diffFlag].AddFeature(noAutomaticDateFlag); + update[diffFlag].AddFeature(cascadeFlag); + update[diffFlag][cascadeFlag].AddFeature(skipFirstOutputFlag); + update[diffFlag].AddFeature(reverseCascadeFlag); + update[diffFlag][reverseCascadeFlag].AddFeature(skipFirstOutputFlag); + update.AddFeature(diffDuFlag); + update[diffDuFlag].AddFeature(noAutomaticDateFlag); + update.AddFeature(diffInFlag); + update[diffInFlag].AddFeature(noAutomaticDateFlag); + update.AddFeature(diffNdFlag); + update[diffNdFlag].AddFeature(noAutomaticDateFlag); + update.AddFeature(baseReplaceFlag); + update[baseReplaceFlag].AddFeature(baseDatListInput); + update[baseReplaceFlag].AddFeature(updateNamesFlag); + update[baseReplaceFlag].AddFeature(updateHashesFlag); + update[baseReplaceFlag].AddFeature(updateDescriptionFlag); + update[baseReplaceFlag][updateDescriptionFlag].AddFeature(onlySameFlag); + update[baseReplaceFlag].AddFeature(updateYearFlag); + update[baseReplaceFlag].AddFeature(updateManufacturerFlag); + update.AddFeature(reverseBaseReplaceFlag); + update[reverseBaseReplaceFlag].AddFeature(baseDatListInput); + update[reverseBaseReplaceFlag].AddFeature(updateNamesFlag); + update[reverseBaseReplaceFlag].AddFeature(updateHashesFlag); + update[reverseBaseReplaceFlag].AddFeature(updateDescriptionFlag); + update[reverseBaseReplaceFlag][updateDescriptionFlag].AddFeature(onlySameFlag); + update[reverseBaseReplaceFlag].AddFeature(updateYearFlag); + update[reverseBaseReplaceFlag].AddFeature(updateManufacturerFlag); + update.AddFeature(gameNameListInput); + update.AddFeature(notGameNameListInput); + update.AddFeature(gameDescriptionListInput); + update.AddFeature(notGameDescriptionListInput); + update.AddFeature(matchOfTagsFlag); + update.AddFeature(itemNameListInput); + update.AddFeature(notItemNameListInput); + update.AddFeature(itemTypeListInput); + update.AddFeature(notItemTypeListInput); + update.AddFeature(greaterStringInput); + update.AddFeature(lessStringInput); + update.AddFeature(equalStringInput); + update.AddFeature(crcListInput); + update.AddFeature(notCrcListInput); + update.AddFeature(md5ListInput); + update.AddFeature(notMd5ListInput); + update.AddFeature(sha1ListInput); + update.AddFeature(notSha1ListInput); + update.AddFeature(sha256ListInput); + update.AddFeature(notSha256ListInput); + update.AddFeature(sha384ListInput); + update.AddFeature(notSha384ListInput); + update.AddFeature(sha512ListInput); + update.AddFeature(notSha512ListInput); + update.AddFeature(statusListInput); + update.AddFeature(notStatusListInput); + update.AddFeature(gameTypeListInput); + update.AddFeature(notGameTypeListInput); + update.AddFeature(runnableFlag); + update.AddFeature(notRunnableFlag); + update.AddFeature(outputDirStringInput); + update.AddFeature(inplaceFlag); + update.AddFeature(threadsInt32Input); #endregion #region Verify Feature verify = new Feature( + "Verify", new List() { "-ve", "--verify" }, "Verify a folder against DATs", FeatureType.Flag, - null); - verify.AddFeature("dat", datListInput); - verify.AddFeature("depot", depotFlag); - verify.AddFeature("temp", tempFeature); - verify.AddFeature("hash-only", hashOnlyFlag); - verify.AddFeature("quick", quickFlag); - verify.AddFeature("header", headerStringInput); - 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); + longDescription: ""); + verify.AddFeature(datListInput); + verify.AddFeature(depotFlag); + verify.AddFeature(tempFeature); + verify.AddFeature(hashOnlyFlag); + verify.AddFeature(quickFlag); + verify.AddFeature(headerStringInput); + verify.AddFeature(chdsAsFilesFlag); + verify.AddFeature(datMergedFlag); + verify.AddFeature(datSplitFlag); + verify.AddFeature(datDeviceNonMergedFlag); + verify.AddFeature(datNonMergedFlag); + verify.AddFeature(datFullNonMergedFlag); #endregion // Now, add all of the main features to the Help object - help.Add("Help", helpFeature); - help.Add("Script", script); - help.Add("DATFromDir", datFromDir); - help.Add("Extract", extract); - help.Add("Restore", restore); - help.Add("Sort", sort); - help.Add("Split", split); - help.Add("Stats", stats); - help.Add("Update", update); - help.Add("Verify", verify); + help.Add(helpFeature); + help.Add(script); + help.Add(datFromDir); + help.Add(extract); + help.Add(restore); + help.Add(sort); + help.Add(split); + help.Add(stats); + help.Add(update); + help.Add(verify); return help; } diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs index d733f8ae..d6fafb30 100644 --- a/SabreTools/SabreTools.cs +++ b/SabreTools/SabreTools.cs @@ -323,67 +323,89 @@ namespace SabreTools case "only-same": onlySame = true; break; + // TODO: Remove all "output-*" variant flags case "output-all": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.ALL; break; case "output-attractmode": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.AttractMode; break; case "output-cmp": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.ClrMamePro; break; case "output-csv": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.CSV; break; case "output-doscenter": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.DOSCenter; break; case "output-listrom": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.Listrom; break; case "output-listxml": // TODO: Not added to readme yet + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); datHeader.DatFormat |= DatFormat.Listxml; break; case "output-miss": datHeader.DatFormat |= DatFormat.MissFile; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-md5": datHeader.DatFormat |= DatFormat.RedumpMD5; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-offlinelist": datHeader.DatFormat |= DatFormat.OfflineList; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-romcenter": datHeader.DatFormat |= DatFormat.RomCenter; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sabredat": datHeader.DatFormat |= DatFormat.SabreDat; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sfv": datHeader.DatFormat |= DatFormat.RedumpSFV; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sha1": datHeader.DatFormat |= DatFormat.RedumpSHA1; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sha256": datHeader.DatFormat |= DatFormat.RedumpSHA256; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sha384": datHeader.DatFormat |= DatFormat.RedumpSHA384; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-sha512": datHeader.DatFormat |= DatFormat.RedumpSHA512; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-softwarelist": datHeader.DatFormat |= DatFormat.SoftwareList; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-ssv": datHeader.DatFormat |= DatFormat.SSV; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-tsv": datHeader.DatFormat |= DatFormat.TSV; + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); break; case "output-xml": + Globals.Logger.User("This flag '{0}' is depreciated, pleause use {1} instead", feat.Key, String.Join(", ", outputTypeListInput.Flags)); // Only set this flag if the depreciated flag is not already if ((datHeader.DatFormat & DatFormat.LogiqxDepreciated) == 0) {