diff --git a/.gitignore b/.gitignore index 7e6382fc..45366d74 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,9 @@ /SabreTools/Properties/launchSettings.json /SabreTools/SabreTools.csproj.user /SabreTools.Data/bin/ -/SabreTools.Data/obj/ +/SabreTools.Data/obj +/SabreTools.Help/bin/ +/SabreTools.Help/obj/ /SabreTools.Library/bin/ /SabreTools.Library/obj/ /SabreTools.Skippers/bin/ diff --git a/RombaSharp/Features/Archive.cs b/RombaSharp/Features/Archive.cs index e57625a0..ee6e8c6a 100644 --- a/RombaSharp/Features/Archive.cs +++ b/RombaSharp/Features/Archive.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.FileTypes; @@ -18,14 +19,14 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "archive" }; Description = "Adds ROM files from the specified directories to the ROM archive."; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Adds ROM files from the specified directories to the ROM archive. Traverses the specified directory trees looking for zip files and normal files. Unpacked files will be stored as individual entries. Prior to unpacking a zip file, the external SHA1 is checked against the DAT index. If -only-needed is set, only those files are put in the ROM archive that have a current entry in the DAT index."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(OnlyNeededFlag); AddFeature(ResumeStringInput); @@ -38,7 +39,7 @@ have a current entry in the DAT index."; AddFeature(NoDbFlag); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/RombaSharp/Features/BaseFeature.cs b/RombaSharp/Features/BaseFeature.cs index 106c4064..0f59d270 100644 --- a/RombaSharp/Features/BaseFeature.cs +++ b/RombaSharp/Features/BaseFeature.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Xml; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; -using SabreTools.Library.Help; using SabreTools.Library.IO; using SabreTools.Library.Logging; using SabreTools.Library.Tools; @@ -20,93 +20,93 @@ namespace RombaSharp.Features #region Private Flag features internal const string CopyValue = "copy"; - internal static SabreTools.Library.Help.Feature CopyFlag + internal static SabreTools.Help.Feature CopyFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( CopyValue, "-copy", "Copy files to output instead of rebuilding", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } // Unique to RombaSharp internal const string FixdatOnlyValue = "fixdat-only"; - internal static SabreTools.Library.Help.Feature FixdatOnlyFlag + internal static SabreTools.Help.Feature FixdatOnlyFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( FixdatOnlyValue, "-fixdatOnly", "only fix dats and don't generate torrentzips", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } internal const string LogOnlyValue = "log-only"; - internal static SabreTools.Library.Help.Feature LogOnlyFlag + internal static SabreTools.Help.Feature LogOnlyFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( LogOnlyValue, "-log-only", "Only write out actions to log", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } internal const string NoDbValue = "no-db"; - internal static SabreTools.Library.Help.Feature NoDbFlag + internal static SabreTools.Help.Feature NoDbFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( NoDbValue, "-no-db", "archive into depot but do not touch DB index and ignore only-needed flag", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } internal const string OnlyNeededValue = "only-needed"; - internal static SabreTools.Library.Help.Feature OnlyNeededFlag + internal static SabreTools.Help.Feature OnlyNeededFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( OnlyNeededValue, "-only-needed", "only archive ROM files actually referenced by DAT files from the DAT index", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } internal const string SkipInitialScanValue = "skip-initial-scan"; - internal static SabreTools.Library.Help.Feature SkipInitialScanFlag + internal static SabreTools.Help.Feature SkipInitialScanFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( SkipInitialScanValue, "-skip-initial-scan", "skip the initial scan of the files to determine amount of work", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } internal const string UseGolangZipValue = "use-golang-zip"; - internal static SabreTools.Library.Help.Feature UseGolangZipFlag + internal static SabreTools.Help.Feature UseGolangZipFlag { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( UseGolangZipValue, "-use-golang-zip", "use go zip implementation instead of zlib", - SabreTools.Library.Help.FeatureType.Flag); + ParameterType.Flag); } } @@ -115,67 +115,67 @@ namespace RombaSharp.Features #region Private Int32 features internal const string Include7ZipsInt32Value = "include-7zips"; - internal static SabreTools.Library.Help.Feature Include7ZipsInt32Input + internal static SabreTools.Help.Feature Include7ZipsInt32Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( Include7ZipsInt32Value, "-include-7zips", "flag value == 0 means: add 7zip files themselves into the depot in addition to their contents, flag value == 2 means add 7zip files themselves but don't add content", - SabreTools.Library.Help.FeatureType.Int32); + ParameterType.Int32); } } internal const string IncludeGZipsInt32Value = "include-gzips"; - internal static SabreTools.Library.Help.Feature IncludeGZipsInt32Input + internal static SabreTools.Help.Feature IncludeGZipsInt32Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( IncludeGZipsInt32Value, "-include-gzips", "flag value == 0 means: add gzip files themselves into the depot in addition to their contents, flag value == 2 means add gzip files themselves but don't add content", - SabreTools.Library.Help.FeatureType.Int32); + ParameterType.Int32); } } internal const string IncludeZipsInt32Value = "include-zips"; - internal static SabreTools.Library.Help.Feature IncludeZipsInt32Input + internal static SabreTools.Help.Feature IncludeZipsInt32Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( IncludeZipsInt32Value, "-include-zips", "flag value == 0 means: add zip files themselves into the depot in addition to their contents, flag value == 2 means add zip files themselves but don't add content", - SabreTools.Library.Help.FeatureType.Int32); + ParameterType.Int32); } } internal const string SubworkersInt32Value = "subworkers"; - internal static SabreTools.Library.Help.Feature SubworkersInt32Input + internal static SabreTools.Help.Feature SubworkersInt32Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( SubworkersInt32Value, "-subworkers", "how many subworkers to launch for each worker", - SabreTools.Library.Help.FeatureType.Int32); + ParameterType.Int32); } } // Defaults to Workers count in config internal const string WorkersInt32Value = "workers"; - internal static SabreTools.Library.Help.Feature WorkersInt32Input + internal static SabreTools.Help.Feature WorkersInt32Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( WorkersInt32Value, "-workers", "how many workers to launch for the job", - SabreTools.Library.Help.FeatureType.Int32); + ParameterType.Int32); } } // Defaults to Workers count in config @@ -184,15 +184,15 @@ namespace RombaSharp.Features #region Private Int64 features internal const string SizeInt64Value = "size"; - internal static SabreTools.Library.Help.Feature SizeInt64Input + internal static SabreTools.Help.Feature SizeInt64Input { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( SizeInt64Value, "-size", "size of the rom to lookup", - SabreTools.Library.Help.FeatureType.Int64); + ParameterType.Int64); } } @@ -201,28 +201,28 @@ namespace RombaSharp.Features #region Private List features internal const string DatsListStringValue = "dats"; - internal static SabreTools.Library.Help.Feature DatsListStringInput + internal static SabreTools.Help.Feature DatsListStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( DatsListStringValue, "-dats", "purge only roms declared in these dats", - SabreTools.Library.Help.FeatureType.List); + ParameterType.List); } } internal const string DepotListStringValue = "depot"; - internal static SabreTools.Library.Help.Feature DepotListStringInput + internal static SabreTools.Help.Feature DepotListStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( DepotListStringValue, "-depot", "work only on specified depot path", - SabreTools.Library.Help.FeatureType.List); + ParameterType.List); } } @@ -231,119 +231,119 @@ namespace RombaSharp.Features #region Private String features internal const string BackupStringValue = "backup"; - internal static SabreTools.Library.Help.Feature BackupStringInput + internal static SabreTools.Help.Feature BackupStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( BackupStringValue, "-backup", "backup directory where backup files are moved to", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string DescriptionStringValue = "description"; - internal static SabreTools.Library.Help.Feature DescriptionStringInput + internal static SabreTools.Help.Feature DescriptionStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( DescriptionStringValue, "-description", "description value in DAT header", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string MissingSha1sStringValue = "missing-sha1s"; - internal static SabreTools.Library.Help.Feature MissingSha1sStringInput + internal static SabreTools.Help.Feature MissingSha1sStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( MissingSha1sStringValue, "-missingSha1s", "write paths of dats with missing sha1s into this file", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string NameStringValue = "name"; - internal static SabreTools.Library.Help.Feature NameStringInput + internal static SabreTools.Help.Feature NameStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( NameStringValue, "-name", "name value in DAT header", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string NewStringValue = "new"; - internal static SabreTools.Library.Help.Feature NewStringInput + internal static SabreTools.Help.Feature NewStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( NewStringValue, "-new", "new DAT file", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string OldStringValue = "old"; - internal static SabreTools.Library.Help.Feature OldStringInput + internal static SabreTools.Help.Feature OldStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( OldStringValue, "-old", "old DAT file", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string OutStringValue = "out"; - internal static SabreTools.Library.Help.Feature OutStringInput + internal static SabreTools.Help.Feature OutStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( OutStringValue, "-out", "output file", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string ResumeStringValue = "resume"; - internal static SabreTools.Library.Help.Feature ResumeStringInput + internal static SabreTools.Help.Feature ResumeStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( ResumeStringValue, "-resume", "resume a previously interrupted operation from the specified path", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } internal const string SourceStringValue = "source"; - internal static SabreTools.Library.Help.Feature SourceStringInput + internal static SabreTools.Help.Feature SourceStringInput { get { - return new SabreTools.Library.Help.Feature( + return new SabreTools.Help.Feature( SourceStringValue, "-source", "source directory", - SabreTools.Library.Help.FeatureType.String); + ParameterType.String); } } @@ -375,7 +375,7 @@ namespace RombaSharp.Features /// protected Logger logger = new Logger(); - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { InitializeConfiguration(); EnsureDatabase(_db, _connectionString); diff --git a/RombaSharp/Features/Build.cs b/RombaSharp/Features/Build.cs index 5dd26670..c1d95b14 100644 --- a/RombaSharp/Features/Build.cs +++ b/RombaSharp/Features/Build.cs @@ -2,9 +2,9 @@ using System.IO; using System.Linq; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.FileTypes; -using SabreTools.Library.Help; using SabreTools.Library.IO; namespace RombaSharp.Features @@ -18,7 +18,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "build" }; Description = "For each specified DAT file it creates the torrentzip files."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"For each specified DAT file it creates the torrentzip files in the specified output dir. The files will be placed in the specified location using a folder structure according to the original DAT master directory tree structure."; diff --git a/RombaSharp/Features/Cancel.cs b/RombaSharp/Features/Cancel.cs index c6772003..3273436c 100644 --- a/RombaSharp/Features/Cancel.cs +++ b/RombaSharp/Features/Cancel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "cancel" }; Description = "Cancels current long-running job"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Cancels current long-running job."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/DatStats.cs b/RombaSharp/Features/DatStats.cs index 641dd24a..45dc8080 100644 --- a/RombaSharp/Features/DatStats.cs +++ b/RombaSharp/Features/DatStats.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; using SabreTools.Library.Reports; namespace RombaSharp.Features @@ -16,7 +16,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "datstats" }; Description = "Prints dat stats."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Print dat stats."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/DbStats.cs b/RombaSharp/Features/DbStats.cs index 1d122b9b..8738ffb0 100644 --- a/RombaSharp/Features/DbStats.cs +++ b/RombaSharp/Features/DbStats.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; using Microsoft.Data.Sqlite; namespace RombaSharp.Features @@ -14,7 +14,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "dbstats" }; Description = "Prints db stats."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Print db stats."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Diffdat.cs b/RombaSharp/Features/Diffdat.cs index d42818e0..6242ccbe 100644 --- a/RombaSharp/Features/Diffdat.cs +++ b/RombaSharp/Features/Diffdat.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; using SabreTools.Library.IO; namespace RombaSharp.Features @@ -16,7 +16,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "diffdat" }; Description = "Creates a DAT file with those entries that are in -new DAT."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Creates a DAT file with those entries that are in -new DAT file and not in -old DAT file. Ignores those entries in -old that are not in -new."; this.Features = new Dictionary(); diff --git a/RombaSharp/Features/Dir2Dat.cs b/RombaSharp/Features/Dir2Dat.cs index 28e4bd2e..eb6313d3 100644 --- a/RombaSharp/Features/Dir2Dat.cs +++ b/RombaSharp/Features/Dir2Dat.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.Filtering; -using SabreTools.Library.Help; using SabreTools.Library.IO; using SabreTools.Library.Tools; @@ -18,7 +18,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "dir2dat" }; Description = "Creates a DAT file for the specified input directory and saves it to the -out filename."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Creates a DAT file for the specified input directory and saves it to the -out filename."; Features = new Dictionary(); diff --git a/RombaSharp/Features/DisplayHelp.cs b/RombaSharp/Features/DisplayHelp.cs index 197a6f5c..044d9789 100644 --- a/RombaSharp/Features/DisplayHelp.cs +++ b/RombaSharp/Features/DisplayHelp.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "-?", "-h", "--help" }; Description = "Show this help"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Built-in to most of the programs is a basic help text."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/DisplayHelpDetailed.cs b/RombaSharp/Features/DisplayHelpDetailed.cs index 22fc6761..d2a658b2 100644 --- a/RombaSharp/Features/DisplayHelpDetailed.cs +++ b/RombaSharp/Features/DisplayHelpDetailed.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "-??", "-hd", "--help-detailed" }; Description = "Show this detailed help"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Display a detailed help text to the screen."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/EDiffdat.cs b/RombaSharp/Features/EDiffdat.cs index 195a3e20..fa432657 100644 --- a/RombaSharp/Features/EDiffdat.cs +++ b/RombaSharp/Features/EDiffdat.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; using SabreTools.Library.IO; namespace RombaSharp.Features @@ -16,7 +16,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "ediffdat" }; Description = "Creates a DAT file with those entries that are in -new DAT."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Creates a DAT file with those entries that are in -new DAT files and not in -old DAT files. Ignores those entries in -old that are not in -new."; Features = new Dictionary(); diff --git a/RombaSharp/Features/Export.cs b/RombaSharp/Features/Export.cs index f590a8d7..058f814a 100644 --- a/RombaSharp/Features/Export.cs +++ b/RombaSharp/Features/Export.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.IO; using Microsoft.Data.Sqlite; @@ -17,7 +17,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "export" }; Description = "Exports db to export.csv"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Exports db to standardized export.csv"; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Fixdat.cs b/RombaSharp/Features/Fixdat.cs index 261b2dd4..35cfe97f 100644 --- a/RombaSharp/Features/Fixdat.cs +++ b/RombaSharp/Features/Fixdat.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; -using SabreTools.Library.Logging; +using SabreTools.Help; namespace RombaSharp.Features { @@ -14,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "fixdat" }; Description = "For each specified DAT file it creates a fix DAT."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"For each specified DAT file it creates a fix DAT with the missing entries for that DAT. If nothing is missing it doesn't create a fix DAT for that particular DAT."; Features = new Dictionary(); diff --git a/RombaSharp/Features/Import.cs b/RombaSharp/Features/Import.cs index 1a1673ba..a94117ca 100644 --- a/RombaSharp/Features/Import.cs +++ b/RombaSharp/Features/Import.cs @@ -2,9 +2,8 @@ using System.IO; using System.Linq; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.IO; -using SabreTools.Library.Logging; using Microsoft.Data.Sqlite; namespace RombaSharp.Features @@ -19,7 +18,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "import" }; Description = "Import a database from a formatted CSV file"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Import a database from a formatted CSV file"; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Lookup.cs b/RombaSharp/Features/Lookup.cs index a5c6911a..a941f3a5 100644 --- a/RombaSharp/Features/Lookup.cs +++ b/RombaSharp/Features/Lookup.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using SabreTools.Data; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.Tools; using Microsoft.Data.Sqlite; @@ -16,7 +16,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "lookup" }; Description = "For each specified hash it looks up any available information."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "For each specified hash it looks up any available information (dat or rom)."; Features = new Dictionary(); diff --git a/RombaSharp/Features/Memstats.cs b/RombaSharp/Features/Memstats.cs index 201d5f9d..0b946d9b 100644 --- a/RombaSharp/Features/Memstats.cs +++ b/RombaSharp/Features/Memstats.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "memstats" }; Description = "Prints memory stats."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Print memory stats."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Merge.cs b/RombaSharp/Features/Merge.cs index fcbdd97b..a42198f1 100644 --- a/RombaSharp/Features/Merge.cs +++ b/RombaSharp/Features/Merge.cs @@ -2,7 +2,7 @@ using System.IO; using System.Linq; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.IO; namespace RombaSharp.Features @@ -16,7 +16,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "merge" }; Description = "Merges depot"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Merges specified depot into current depot."; Features = new Dictionary(); diff --git a/RombaSharp/Features/Miss.cs b/RombaSharp/Features/Miss.cs index 360ee16f..c70d7b4c 100644 --- a/RombaSharp/Features/Miss.cs +++ b/RombaSharp/Features/Miss.cs @@ -2,8 +2,8 @@ using System.IO; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; using SabreTools.Library.IO; namespace RombaSharp.Features @@ -18,7 +18,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "miss" }; Description = "Create miss and have file"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "For each specified DAT file, create miss and have file"; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Progress.cs b/RombaSharp/Features/Progress.cs index d9c39957..4a39443b 100644 --- a/RombaSharp/Features/Progress.cs +++ b/RombaSharp/Features/Progress.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "progress" }; Description = "Shows progress of the currently running command."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Shows progress of the currently running command."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/PurgeBackup.cs b/RombaSharp/Features/PurgeBackup.cs index 4dc47eac..efb3689a 100644 --- a/RombaSharp/Features/PurgeBackup.cs +++ b/RombaSharp/Features/PurgeBackup.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "purge-backup" }; Description = "Moves DAT index entries for orphaned DATs."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Deletes DAT index entries for orphaned DATs and moves ROM files that are no longer associated with any current DATs to the specified backup folder. The files will be placed in the backup location using diff --git a/RombaSharp/Features/PurgeDelete.cs b/RombaSharp/Features/PurgeDelete.cs index 2ca12d48..7cb14f98 100644 --- a/RombaSharp/Features/PurgeDelete.cs +++ b/RombaSharp/Features/PurgeDelete.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -14,7 +14,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "purge-delete" }; Description = "Deletes DAT index entries for orphaned DATs"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Deletes DAT index entries for orphaned DATs and moves ROM files that are no longer associated with any current DATs to the specified backup folder. The files will be placed in the backup location using diff --git a/RombaSharp/Features/RefreshDats.cs b/RombaSharp/Features/RefreshDats.cs index 7d3497a7..04c31487 100644 --- a/RombaSharp/Features/RefreshDats.cs +++ b/RombaSharp/Features/RefreshDats.cs @@ -2,6 +2,7 @@ using System.IO; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.Tools; @@ -18,18 +19,18 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "refresh-dats" }; Description = "Refreshes the DAT index from the files in the DAT master directory tree."; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Refreshes the DAT index from the files in the DAT master directory tree. Detects any changes in the DAT master directory tree and updates the DAT index accordingly, marking deleted or overwritten dats as orphaned and updating contents of any changed dats."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(WorkersInt32Input); AddFeature(MissingSha1sStringInput); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/RombaSharp/Features/RescanDepots.cs b/RombaSharp/Features/RescanDepots.cs index ddcb720b..e175f43f 100644 --- a/RombaSharp/Features/RescanDepots.cs +++ b/RombaSharp/Features/RescanDepots.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using Microsoft.Data.Sqlite; @@ -17,12 +18,12 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "depot-rescan" }; Description = "Rescan a specific depot to get new information"; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Rescan a specific depot to get new information"; - Features = new Dictionary(); + Features = new Dictionary(); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); logger.Error("This feature is not yet implemented: rescan-depots"); diff --git a/RombaSharp/Features/Script.cs b/RombaSharp/Features/Script.cs index 85f48f9e..16a6a8a8 100644 --- a/RombaSharp/Features/Script.cs +++ b/RombaSharp/Features/Script.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "--script" }; Description = "Enable script mode (no clear screen)"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "For times when RombaSharp is being used in a scripted environment, the user may not want the screen to be cleared every time that it is called. This flag allows the user to skip clearing the screen on run just like if the console was being redirected."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Shutdown.cs b/RombaSharp/Features/Shutdown.cs index ad636f74..20477773 100644 --- a/RombaSharp/Features/Shutdown.cs +++ b/RombaSharp/Features/Shutdown.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -13,7 +13,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "shutdown" }; Description = "Gracefully shuts down server."; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Gracefully shuts down server saving all the cached data."; Features = new Dictionary(); } diff --git a/RombaSharp/Features/Version.cs b/RombaSharp/Features/Version.cs index 42703cf9..cf4353c8 100644 --- a/RombaSharp/Features/Version.cs +++ b/RombaSharp/Features/Version.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using SabreTools.Data; -using SabreTools.Library.Help; +using SabreTools.Help; namespace RombaSharp.Features { @@ -14,7 +14,7 @@ namespace RombaSharp.Features Name = Value; Flags = new List() { "version" }; Description = "Prints version"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Prints version."; Features = new Dictionary(); } diff --git a/RombaSharp/Program.cs b/RombaSharp/Program.cs index bd40cf43..74f3565a 100644 --- a/RombaSharp/Program.cs +++ b/RombaSharp/Program.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using RombaSharp.Features; using SabreTools.Data; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.Logging; namespace RombaSharp diff --git a/RombaSharp/RombaSharp.csproj b/RombaSharp/RombaSharp.csproj index 0fadf074..b282181d 100644 --- a/RombaSharp/RombaSharp.csproj +++ b/RombaSharp/RombaSharp.csproj @@ -17,6 +17,7 @@ + diff --git a/SabreTools.Library/Help/Enums.cs b/SabreTools.Help/Enums.cs similarity index 53% rename from SabreTools.Library/Help/Enums.cs rename to SabreTools.Help/Enums.cs index 73332f29..1464eb72 100644 --- a/SabreTools.Library/Help/Enums.cs +++ b/SabreTools.Help/Enums.cs @@ -1,9 +1,9 @@ -namespace SabreTools.Library.Help +namespace SabreTools.Help { /// - /// Determines the feature type to check for + /// Determines the parameter type to check for /// - public enum FeatureType + public enum ParameterType { Flag = 0, String, diff --git a/SabreTools.Library/Help/Feature.cs b/SabreTools.Help/Feature.cs similarity index 92% rename from SabreTools.Library/Help/Feature.cs rename to SabreTools.Help/Feature.cs index 2637e730..c0b96d21 100644 --- a/SabreTools.Library/Help/Feature.cs +++ b/SabreTools.Help/Feature.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; -namespace SabreTools.Library.Help +namespace SabreTools.Help { public class Feature { #region Protected instance variables - protected FeatureType _featureType; + protected ParameterType _featureType; protected bool _foundOnce = false; protected object _value = null; @@ -32,11 +32,11 @@ namespace SabreTools.Library.Help this.Flags = new List(); this.Description = null; this.LongDescription = null; - this._featureType = FeatureType.Flag; + this._featureType = ParameterType.Flag; this.Features = new Dictionary(); } - public Feature(string name, string flag, string description, FeatureType featureType, string longDescription = null) + public Feature(string name, string flag, string description, ParameterType featureType, string longDescription = null) { this.Name = name; this.Flags = new List @@ -49,7 +49,7 @@ namespace SabreTools.Library.Help this.Features = new Dictionary(); } - public Feature(string name, List flags, string description, FeatureType featureType, string longDescription = null) + public Feature(string name, List flags, string description, ParameterType featureType, string longDescription = null) { this.Name = name; this.Flags = flags; @@ -172,16 +172,16 @@ namespace SabreTools.Library.Help this.Flags.CopyTo(newflags); switch (_featureType) { - case FeatureType.Int32: - case FeatureType.Int64: - case FeatureType.List: - case FeatureType.String: + case ParameterType.Int32: + case ParameterType.Int64: + case ParameterType.List: + case ParameterType.String: for (int i = 0; i < newflags.Length; i++) { newflags[i] += "="; } break; - case FeatureType.Flag: + case ParameterType.Flag: default: // No-op break; @@ -310,16 +310,16 @@ namespace SabreTools.Library.Help this.Flags.CopyTo(newflags); switch (_featureType) { - case FeatureType.Int32: - case FeatureType.Int64: - case FeatureType.List: - case FeatureType.String: + case ParameterType.Int32: + case ParameterType.Int64: + case ParameterType.List: + case ParameterType.String: for (int i = 0; i < newflags.Length; i++) { newflags[i] += "="; } break; - case FeatureType.Flag: + case ParameterType.Flag: default: // No-op break; @@ -427,7 +427,7 @@ namespace SabreTools.Library.Help switch (_featureType) { // If we have a flag, make sure it doesn't have an equal sign in it - case FeatureType.Flag: + case ParameterType.Flag: valid = !input.Contains("=") && this.Flags.Contains(input); if (valid) { @@ -443,7 +443,7 @@ namespace SabreTools.Library.Help break; // If we have an Int32, try to parse it if at all possible - case FeatureType.Int32: + case ParameterType.Int32: valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]); if (valid) { @@ -462,7 +462,7 @@ namespace SabreTools.Library.Help break; // If we have an Int32, try to parse it if at all possible - case FeatureType.Int64: + case ParameterType.Int64: valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]); if (valid) { @@ -481,7 +481,7 @@ namespace SabreTools.Library.Help break; // If we have an input, make sure it has an equals sign in it - case FeatureType.List: + case ParameterType.List: valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]); if (valid) { @@ -493,7 +493,7 @@ namespace SabreTools.Library.Help break; - case FeatureType.String: + case ParameterType.String: valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]); if (valid) { @@ -521,7 +521,7 @@ namespace SabreTools.Library.Help /// public bool GetBoolValue() { - if (_featureType != FeatureType.Flag) + if (_featureType != ParameterType.Flag) throw new ArgumentException("Feature is not a flag"); return (_value as bool?) ?? false; @@ -532,7 +532,7 @@ namespace SabreTools.Library.Help /// public string GetStringValue() { - if (_featureType != FeatureType.String) + if (_featureType != ParameterType.String) throw new ArgumentException("Feature is not a string"); return (_value as string); @@ -543,7 +543,7 @@ namespace SabreTools.Library.Help /// public int GetInt32Value() { - if (_featureType != FeatureType.Int32) + if (_featureType != ParameterType.Int32) throw new ArgumentException("Feature is not an int"); return (_value as int?) ?? int.MinValue; @@ -554,7 +554,7 @@ namespace SabreTools.Library.Help /// public long GetInt64Value() { - if (_featureType != FeatureType.Int64) + if (_featureType != ParameterType.Int64) throw new ArgumentException("Feature is not a long"); return (_value as long?) ?? long.MinValue; @@ -565,7 +565,7 @@ namespace SabreTools.Library.Help /// public List GetListValue() { - if (_featureType != FeatureType.List) + if (_featureType != ParameterType.List) throw new ArgumentException("Feature is not a list"); return (_value as List) ?? new List(); @@ -580,15 +580,15 @@ namespace SabreTools.Library.Help #if NET_FRAMEWORK switch (_featureType) { - case FeatureType.Flag: + case ParameterType.Flag: return (_value as bool?) == true; - case FeatureType.String: + case ParameterType.String: return (_value as string) != null; - case FeatureType.Int32: + case ParameterType.Int32: return (_value as int?).HasValue && (_value as int?).Value != int.MinValue; - case FeatureType.Int64: + case ParameterType.Int64: return (_value as long?).HasValue && (_value as long?).Value != long.MinValue; - case FeatureType.List: + case ParameterType.List: return (_value as List) != null; default: return false; @@ -596,11 +596,11 @@ namespace SabreTools.Library.Help #else return _featureType switch { - FeatureType.Flag => (_value as bool?) == true, - FeatureType.String => (_value as string) != null, - FeatureType.Int32 => (_value as int?).HasValue && (_value as int?).Value != int.MinValue, - FeatureType.Int64 => (_value as long?).HasValue && (_value as long?).Value != long.MinValue, - FeatureType.List => (_value as List) != null, + ParameterType.Flag => (_value as bool?) == true, + ParameterType.String => (_value as string) != null, + ParameterType.Int32 => (_value as int?).HasValue && (_value as int?).Value != int.MinValue, + ParameterType.Int64 => (_value as long?).HasValue && (_value as long?).Value != long.MinValue, + ParameterType.List => (_value as List) != null, _ => false, }; #endif diff --git a/SabreTools.Library/Help/Help.cs b/SabreTools.Help/Help.cs similarity index 99% rename from SabreTools.Library/Help/Help.cs rename to SabreTools.Help/Help.cs index 075b4a5b..76a0173f 100644 --- a/SabreTools.Library/Help/Help.cs +++ b/SabreTools.Help/Help.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace SabreTools.Library.Help +namespace SabreTools.Help { public class Help { diff --git a/SabreTools.Help/SabreTools.Help.csproj b/SabreTools.Help/SabreTools.Help.csproj new file mode 100644 index 00000000..a084bc84 --- /dev/null +++ b/SabreTools.Help/SabreTools.Help.csproj @@ -0,0 +1,14 @@ + + + + net48;netcoreapp3.1;net5.0 + win10-x64;win7-x86 + Debug;Release + AnyCPU;x64 + + + + NET_FRAMEWORK + + + diff --git a/SabreTools.Library/Help/TopLevel.cs b/SabreTools.Help/TopLevel.cs similarity index 92% rename from SabreTools.Library/Help/TopLevel.cs rename to SabreTools.Help/TopLevel.cs index c93ca3c9..50e097e9 100644 --- a/SabreTools.Library/Help/TopLevel.cs +++ b/SabreTools.Help/TopLevel.cs @@ -2,9 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Library.Logging; - -namespace SabreTools.Library.Help +namespace SabreTools.Help { /// /// Represents an actionable top-level feature @@ -25,7 +23,8 @@ namespace SabreTools.Library.Help /// /// Logging object /// - private readonly Logger logger; + // TODO: Re-enable all logging once Logging namespace separated out + //private readonly Logger logger; #endregion @@ -36,7 +35,7 @@ namespace SabreTools.Library.Help /// public TopLevel() { - logger = new Logger(this); + //logger = new Logger(this); } #endregion @@ -68,9 +67,9 @@ namespace SabreTools.Library.Help // Everything else isn't a file else { - logger.Error($"Invalid input detected: {args[i]}"); + //logger.Error($"Invalid input detected: {args[i]}"); help.OutputIndividualFeature(this.Name); - LoggerImpl.Close(); + //LoggerImpl.Close(); return false; } } diff --git a/SabreTools.Library/SabreTools.Library.csproj b/SabreTools.Library/SabreTools.Library.csproj index d27e5b52..797f7be3 100644 --- a/SabreTools.Library/SabreTools.Library.csproj +++ b/SabreTools.Library/SabreTools.Library.csproj @@ -35,4 +35,8 @@ + + + + diff --git a/SabreTools.Skippers/SkipperRule.cs b/SabreTools.Skippers/SkipperRule.cs index 2fa0b79b..75b87b4b 100644 --- a/SabreTools.Skippers/SkipperRule.cs +++ b/SabreTools.Skippers/SkipperRule.cs @@ -40,7 +40,8 @@ namespace SabreTools.Library.Skippers /// /// Logging object /// - //private readonly Logger logger; // TODO: Re-enable all logging once Logging namespace separated out + // TODO: Re-enable all logging once Logging namespace separated out + //private readonly Logger logger; #endregion diff --git a/SabreTools.sln b/SabreTools.sln index 85719aaa..bea8985b 100644 --- a/SabreTools.sln +++ b/SabreTools.sln @@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools.Data", "SabreToo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Skippers", "SabreTools.Skippers\SabreTools.Skippers.csproj", "{D8665F27-75E6-4E3F-9F0A-286433831C69}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Help", "SabreTools.Help\SabreTools.Help.csproj", "{55364167-844F-4B58-8280-F5327FA3D8E7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -68,6 +70,14 @@ Global {D8665F27-75E6-4E3F-9F0A-286433831C69}.Release|Any CPU.Build.0 = Release|Any CPU {D8665F27-75E6-4E3F-9F0A-286433831C69}.Release|x64.ActiveCfg = Release|Any CPU {D8665F27-75E6-4E3F-9F0A-286433831C69}.Release|x64.Build.0 = Release|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Debug|x64.ActiveCfg = Debug|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Debug|x64.Build.0 = Debug|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Release|Any CPU.Build.0 = Release|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Release|x64.ActiveCfg = Release|Any CPU + {55364167-844F-4B58-8280-F5327FA3D8E7}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SabreTools/Features/BaseFeature.cs b/SabreTools/Features/BaseFeature.cs index 37f97993..d0b44439 100644 --- a/SabreTools/Features/BaseFeature.cs +++ b/SabreTools/Features/BaseFeature.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Help; using SabreTools.Library.Logging; using SabreTools.Library.Reports; using SabreTools.Library.Tools; @@ -77,1165 +77,1165 @@ namespace SabreTools.Features #region Flag features internal const string AaruFormatsAsFilesValue = "aaruformats-as-files"; - internal static Library.Help.Feature AaruFormatsAsFilesFlag + internal static Help.Feature AaruFormatsAsFilesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( AaruFormatsAsFilesValue, new List() { "-caf", "--aaruformats-as-files" }, "Treat AaruFormats as files", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Normally, AaruFormats would be processed using their internal hash to compare against the input DATs. This flag forces all AaruFormats to be treated like regular files."); } } internal const string AddBlankFilesValue = "add-blank-files"; - internal static Library.Help.Feature AddBlankFilesFlag + internal static Help.Feature AddBlankFilesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( AddBlankFilesValue, new List() { "-ab", "--add-blank-files" }, "Output blank files for folders", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string AddDateValue = "add-date"; - internal static Library.Help.Feature AddDateFlag + internal static Help.Feature AddDateFlag { get { - return new Library.Help.Feature( + return new Help.Feature( AddDateValue, new List() { "-ad", "--add-date" }, "Add dates to items, where possible", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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\"."); } } internal const string ArchivesAsFilesValue = "archives-as-files"; - internal static Library.Help.Feature ArchivesAsFilesFlag + internal static Help.Feature ArchivesAsFilesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ArchivesAsFilesValue, new List() { "-aaf", "--archives-as-files" }, "Treat archives as files", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string BaddumpColumnValue = "baddump-column"; - internal static Library.Help.Feature BaddumpColumnFlag + internal static Help.Feature BaddumpColumnFlag { get { - return new Library.Help.Feature( + return new Help.Feature( BaddumpColumnValue, new List() { "-bc", "--baddump-column" }, "Add baddump stats to output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Add a new column or field for counting the number of baddumps in the DAT."); } } internal const string BaseValue = "base"; - internal static Library.Help.Feature BaseFlag + internal static Help.Feature BaseFlag { get { - return new Library.Help.Feature( + return new Help.Feature( BaseValue, new List() { "-ba", "--base" }, "Use source DAT as base name for outputs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string BaseReplaceValue = "base-replace"; - internal static Library.Help.Feature BaseReplaceFlag + internal static Help.Feature BaseReplaceFlag { get { - return new Library.Help.Feature( + return new Help.Feature( BaseReplaceValue, new List() { "-br", "--base-replace" }, "Replace from base DATs in order", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string ByGameValue = "by-game"; - internal static Library.Help.Feature ByGameFlag + internal static Help.Feature ByGameFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ByGameValue, new List() { "-bg", "--by-game" }, "Diff against by game instead of hashes", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "By default, diffing against uses hashes to determine similar files. This flag enables using using each game as a comparision point instead."); } } internal const string ChdsAsFilesValue = "chds-as-files"; - internal static Library.Help.Feature ChdsAsFilesFlag + internal static Help.Feature ChdsAsFilesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ChdsAsFilesValue, new List() { "-ic", "--chds-as-files" }, "Treat CHDs as regular files", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string CleanValue = "clean"; - internal static Library.Help.Feature CleanFlag + internal static Help.Feature CleanFlag { get { - return new Library.Help.Feature( + return new Help.Feature( CleanValue, new List() { "-clean", "--clean" }, "Clean game names according to WoD standards", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Game names will be sanitized to remove what the original WoD standards deemed as unneeded information, such as parenthesized or bracketed strings."); } } internal const string DatDeviceNonMergedValue = "dat-device-non-merged"; - internal static Library.Help.Feature DatDeviceNonMergedFlag + internal static Help.Feature DatDeviceNonMergedFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DatDeviceNonMergedValue, new List() { "-dnd", "--dat-device-non-merged" }, "Create device non-merged sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Preprocess the DAT to have child sets contain all items from the device references. This is incompatible with the other --dat-X flags."); } } internal const string DatFullNonMergedValue = "dat-full-non-merged"; - internal static Library.Help.Feature DatFullNonMergedFlag + internal static Help.Feature DatFullNonMergedFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DatFullNonMergedValue, new List() { "-df", "--dat-full-non-merged" }, "Create fully non-merged sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DatMergedValue = "dat-merged"; - internal static Library.Help.Feature DatMergedFlag + internal static Help.Feature DatMergedFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DatMergedValue, new List() { "-dm", "--dat-merged" }, "Force creating merged sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DatNonMergedValue = "dat-non-merged"; - internal static Library.Help.Feature DatNonMergedFlag + internal static Help.Feature DatNonMergedFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DatNonMergedValue, new List() { "-dnm", "--dat-non-merged" }, "Force creating non-merged sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DatSplitValue = "dat-split"; - internal static Library.Help.Feature DatSplitFlag + internal static Help.Feature DatSplitFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DatSplitValue, new List() { "-ds", "--dat-split" }, "Force creating split sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DedupValue = "dedup"; - internal static Library.Help.Feature DedupFlag + internal static Help.Feature DedupFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DedupValue, new List() { "-dd", "--dedup" }, "Enable deduping in the created DAT", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DeleteValue = "delete"; - internal static Library.Help.Feature DeleteFlag + internal static Help.Feature DeleteFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DeleteValue, new List() { "-del", "--delete" }, "Delete fully rebuilt input files", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DepotValue = "depot"; - internal static Library.Help.Feature DepotFlag + internal static Help.Feature DepotFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DepotValue, new List() { "-dep", "--depot" }, "Assume directories are Romba depots", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DeprecatedValue = "deprecated"; - internal static Library.Help.Feature DeprecatedFlag + internal static Help.Feature DeprecatedFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DeprecatedValue, new List() { "-dpc", "--deprecated" }, "Output 'game' instead of 'machine'", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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]"); } } internal const string DescriptionAsNameValue = "description-as-name"; - internal static Library.Help.Feature DescriptionAsNameFlag + internal static Help.Feature DescriptionAsNameFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DescriptionAsNameValue, new List() { "-dan", "--description-as-name" }, "Use description instead of machine name", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DiffAgainstValue = "diff-against"; - internal static Library.Help.Feature DiffAgainstFlag + internal static Help.Feature DiffAgainstFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffAgainstValue, new List() { "-dag", "--diff-against" }, "Diff all inputs against a set of base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, "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."); } } internal const string DiffAllValue = "diff-all"; - internal static Library.Help.Feature DiffAllFlag + internal static Help.Feature DiffAllFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffAllValue, new List() { "-di", "--diff-all" }, "Create diffdats from inputs (all standard outputs)", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "By default, all DATs are processed individually with the user-specified flags. With this flag enabled, input DATs are diffed against each other to find duplicates, no duplicates, and only in individuals."); } } internal const string DiffCascadeValue = "diff-cascade"; - internal static Library.Help.Feature DiffCascadeFlag + internal static Help.Feature DiffCascadeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffCascadeValue, new List() { "-dc", "--diff-cascade" }, "Enable cascaded diffing", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string DiffDuplicatesValue = "diff-duplicates"; - internal static Library.Help.Feature DiffDuplicatesFlag + internal static Help.Feature DiffDuplicatesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffDuplicatesValue, new List() { "-did", "--diff-duplicates" }, "Create diffdat containing just duplicates", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "All files that have duplicates outside of the original DAT are included."); } } internal const string DiffIndividualsValue = "diff-individuals"; - internal static Library.Help.Feature DiffIndividualsFlag + internal static Help.Feature DiffIndividualsFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffIndividualsValue, new List() { "-dii", "--diff-individuals" }, "Create diffdats for individual DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "All files that have no duplicates outside of the original DATs are put into DATs that are named after the source DAT."); } } internal const string DiffNoDuplicatesValue = "diff-no-duplicates"; - internal static Library.Help.Feature DiffNoDuplicatesFlag + internal static Help.Feature DiffNoDuplicatesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffNoDuplicatesValue, new List() { "-din", "--diff-no-duplicates" }, "Create diffdat containing no duplicates", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "All files that have no duplicates outside of the original DATs are included."); } } internal const string DiffReverseCascadeValue = "diff-reverse-cascade"; - internal static Library.Help.Feature DiffReverseCascadeFlag + internal static Help.Feature DiffReverseCascadeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( DiffReverseCascadeValue, new List() { "-drc", "--diff-reverse-cascade" }, "Enable reverse cascaded diffing", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string ExtensionValue = "extension"; - internal static Library.Help.Feature ExtensionFlag + internal static Help.Feature ExtensionFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ExtensionValue, new List() { "-es", "--extension" }, "Split DAT(s) by two file extensions", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string GameDedupValue = "game-dedup"; - internal static Library.Help.Feature GameDedupFlag + internal static Help.Feature GameDedupFlag { get { - return new Library.Help.Feature( + return new Help.Feature( GameDedupValue, new List() { "-gdd", "--game-dedup" }, "Enable deduping within games in the created DAT", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string GamePrefixValue = "game-prefix"; - internal static Library.Help.Feature GamePrefixFlag + internal static Help.Feature GamePrefixFlag { get { - return new Library.Help.Feature( + return new Help.Feature( GamePrefixValue, new List() { "-gp", "--game-prefix" }, "Add game name as a prefix", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag allows for the name of the game to be used as a prefix to each file."); } } internal const string HashValue = "hash"; - internal static Library.Help.Feature HashFlag + internal static Help.Feature HashFlag { get { - return new Library.Help.Feature( + return new Help.Feature( HashValue, new List() { "-hs", "--hash" }, "Split DAT(s) or folder by best-available hashes", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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)."); } } internal const string HashOnlyValue = "hash-only"; - internal static Library.Help.Feature HashOnlyFlag + internal static Help.Feature HashOnlyFlag { get { - return new Library.Help.Feature( + return new Help.Feature( HashOnlyValue, new List() { "-ho", "--hash-only" }, "Check files by hash only", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string IndividualValue = "individual"; - internal static Library.Help.Feature IndividualFlag + internal static Help.Feature IndividualFlag { get { - return new Library.Help.Feature( + return new Help.Feature( IndividualValue, new List() { "-ind", "--individual" }, "Process input DATs individually", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "In cases where DATs would be processed in bulk, this flag allows them to be processed on their own instead."); } } internal const string InplaceValue = "inplace"; - internal static Library.Help.Feature InplaceFlag + internal static Help.Feature InplaceFlag { get { - return new Library.Help.Feature( + return new Help.Feature( InplaceValue, new List() { "-ip", "--inplace" }, "Write to the input directories, where possible", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string InverseValue = "inverse"; - internal static Library.Help.Feature InverseFlag + internal static Help.Feature InverseFlag { get { - return new Library.Help.Feature( + return new Help.Feature( InverseValue, new List() { "-in", "--inverse" }, "Rebuild only files not in DAT", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string KeepEmptyGamesValue = "keep-empty-games"; - internal static Library.Help.Feature KeepEmptyGamesFlag + internal static Help.Feature KeepEmptyGamesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( KeepEmptyGamesValue, new List() { "-keg", "--keep-empty-games" }, "Keep originally empty sets from the input(s)", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Normally, any sets that are considered empty will not be included in the output, this flag allows these empty sets to be added to the output."); } } internal const string LevelValue = "level"; - internal static Library.Help.Feature LevelFlag + internal static Help.Feature LevelFlag { get { - return new Library.Help.Feature( + return new Help.Feature( LevelValue, new List() { "-ls", "--level" }, "Split a SuperDAT or folder by lowest available level", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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\"."); } } internal const string MatchOfTagsValue = "match-of-tags"; - internal static Library.Help.Feature MatchOfTagsFlag + internal static Help.Feature MatchOfTagsFlag { get { - return new Library.Help.Feature( + return new Help.Feature( MatchOfTagsValue, new List() { "-ofg", "--match-of-tags" }, "Allow cloneof and romof tags to match game name filters", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string MergeValue = "merge"; - internal static Library.Help.Feature MergeFlag + internal static Help.Feature MergeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( MergeValue, new List() { "-m", "--merge" }, "Merge the input DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string NoAutomaticDateValue = "no-automatic-date"; - internal static Library.Help.Feature NoAutomaticDateFlag + internal static Help.Feature NoAutomaticDateFlag { get { - return new Library.Help.Feature( + return new Help.Feature( NoAutomaticDateValue, new List() { "-b", "--no-automatic-date" }, "Don't include date in file name", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Normally, the DAT will be created with the date in the file name in brackets. This flag removes that instead of the default."); } } internal const string NodumpColumnValue = "nodump-column"; - internal static Library.Help.Feature NodumpColumnFlag + internal static Help.Feature NodumpColumnFlag { get { - return new Library.Help.Feature( + return new Help.Feature( NodumpColumnValue, new List() { "-nc", "--nodump-column" }, "Add statistics for nodumps to output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Add a new column or field for counting the number of nodumps in the DAT."); } } internal const string NoStoreHeaderValue = "no-store-header"; - internal static Library.Help.Feature NoStoreHeaderFlag + internal static Help.Feature NoStoreHeaderFlag { get { - return new Library.Help.Feature( + return new Help.Feature( NoStoreHeaderValue, new List() { "-nsh", "--no-store-header" }, "Don't store the extracted header", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string NotRunnableValue = "not-runnable"; - internal static Library.Help.Feature NotRunnableFlag + internal static Help.Feature NotRunnableFlag { get { - return new Library.Help.Feature( + return new Help.Feature( NotRunnableValue, new List() { "-nrun", "--not-runnable" }, "Include only items that are not marked runnable", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows users to include only unrunnable games."); } } internal const string OneGamePerRegionValue = "one-game-per-region"; - internal static Library.Help.Feature OneGamePerRegionFlag + internal static Help.Feature OneGamePerRegionFlag { get { - return new Library.Help.Feature( + return new Help.Feature( OneGamePerRegionValue, new List() { "-1g1r", "--one-game-per-region" }, "Try to ensure one game per user-defined region", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows users to input a list of regions to use to filter on in order so only one game from each set of parent and clones will be included. This requires either cloneof or romof tags to function properly."); } } internal const string OneRomPerGameValue = "one-rom-per-game"; - internal static Library.Help.Feature OneRomPerGameFlag + internal static Help.Feature OneRomPerGameFlag { get { - return new Library.Help.Feature( + return new Help.Feature( OneRomPerGameValue, new List() { "-orpg", "--one-rom-per-game" }, "Try to ensure each rom has its own game", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "In some cases, it is beneficial to have every rom put into its own output set as a subfolder of the original parent. This flag enables outputting each rom to its own game for this purpose."); } } internal const string OnlySameValue = "only-same"; - internal static Library.Help.Feature OnlySameFlag + internal static Help.Feature OnlySameFlag { get { - return new Library.Help.Feature( + return new Help.Feature( OnlySameValue, new List() { "-ons", "--only-same" }, "Only update description if machine name matches description", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string QuickValue = "quick"; - internal static Library.Help.Feature QuickFlag + internal static Help.Feature QuickFlag { get { - return new Library.Help.Feature( + return new Help.Feature( QuickValue, new List() { "-qs", "--quick" }, "Enable quick scanning of archives", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string QuotesValue = "quotes"; - internal static Library.Help.Feature QuotesFlag + internal static Help.Feature QuotesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( QuotesValue, new List() { "-q", "--quotes" }, "Double-quote each item", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag surrounds the item by double-quotes, not including the prefix or postfix."); } } internal const string RemoveExtensionsValue = "remove-extensions"; - internal static Library.Help.Feature RemoveExtensionsFlag + internal static Help.Feature RemoveExtensionsFlag { get { - return new Library.Help.Feature( + return new Help.Feature( RemoveExtensionsValue, new List() { "-rme", "--remove-extensions" }, "Remove all extensions from all items", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "For each item, remove the extension."); } } internal const string RemoveUnicodeValue = "remove-unicode"; - internal static Library.Help.Feature RemoveUnicodeFlag + internal static Help.Feature RemoveUnicodeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( RemoveUnicodeValue, new List() { "-ru", "--remove-unicode" }, "Remove unicode characters from names", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string ReverseBaseReplaceValue = "reverse-base-replace"; - internal static Library.Help.Feature ReverseBaseReplaceFlag + internal static Help.Feature ReverseBaseReplaceFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ReverseBaseReplaceValue, new List() { "-rbr", "--reverse-base-replace" }, "Replace item names from base DATs in reverse", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string RombaValue = "romba"; - internal static Library.Help.Feature RombaFlag + internal static Help.Feature RombaFlag { get { - return new Library.Help.Feature( + return new Help.Feature( RombaValue, new List() { "-ro", "--romba" }, "Treat like a Romba depot (requires SHA-1)", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string RomsValue = "roms"; - internal static Library.Help.Feature RomsFlag + internal static Help.Feature RomsFlag { get { - return new Library.Help.Feature( + return new Help.Feature( RomsValue, new List() { "-r", "--roms" }, "Output roms to miss instead of sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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]"); } } internal const string RunnableValue = "runnable"; - internal static Library.Help.Feature RunnableFlag + internal static Help.Feature RunnableFlag { get { - return new Library.Help.Feature( + return new Help.Feature( RunnableValue, new List() { "-run", "--runnable" }, "Include only items that are marked runnable", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows users to include only verified runnable games."); } } internal const string SceneDateStripValue = "scene-date-strip"; - internal static Library.Help.Feature SceneDateStripFlag + internal static Help.Feature SceneDateStripFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SceneDateStripValue, new List() { "-sds", "--scene-date-strip" }, "Remove date from scene-named sets", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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\"."); } } internal const string ShortValue = "short"; - internal static Library.Help.Feature ShortFlag + internal static Help.Feature ShortFlag { get { - return new Library.Help.Feature( + return new Help.Feature( ShortValue, new List() { "-s", "--short" }, "Use short output names", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string SingleSetValue = "single-set"; - internal static Library.Help.Feature SingleSetFlag + internal static Help.Feature SingleSetFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SingleSetValue, new List() { "-si", "--single-set" }, "All game names replaced by '!'", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This is useful for keeping all roms in a DAT in the same archive or folder."); } } internal const string SizeValue = "size"; - internal static Library.Help.Feature SizeFlag + internal static Help.Feature SizeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SizeValue, new List() { "-szs", "--size" }, "Split DAT(s) or folder by file sizes", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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)."); } } internal const string SkipArchivesValue = "skip-archives"; - internal static Library.Help.Feature SkipArchivesFlag + internal static Help.Feature SkipArchivesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipArchivesValue, new List() { "-ska", "--skip-archives" }, "Skip all archives", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Skip any files that are treated like archives"); } } internal const string SkipFilesValue = "skip-files"; - internal static Library.Help.Feature SkipFilesFlag + internal static Help.Feature SkipFilesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipFilesValue, new List() { "-skf", "--skip-files" }, "Skip all non-archives", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Skip any files that are not treated like archives"); } } internal const string SkipFirstOutputValue = "skip-first-output"; - internal static Library.Help.Feature SkipFirstOutputFlag + internal static Help.Feature SkipFirstOutputFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipFirstOutputValue, new List() { "-sf", "--skip-first-output" }, "Skip output of first DAT", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string SkipMd5Value = "skip-md5"; - internal static Library.Help.Feature SkipMd5Flag + internal static Help.Feature SkipMd5Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipMd5Value, new List() { "-nm", "--skip-md5" }, "Don't include MD5 in output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to skip calculating the MD5 for each of the files which will speed up the creation of the DAT."); } } #if NET_FRAMEWORK internal const string SkipRipeMd160Value = "skip-ripemd160"; - internal static Library.Help.Feature SkipRipeMd160Flag + internal static Help.Feature SkipRipeMd160Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipRipeMd160Value, new List() { "-nr160", "--skip-ripemd160" }, "Include RIPEMD160 in output", // TODO: This needs to be inverted later - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to include calculating the RIPEMD160 for each of the files."); } } #endif internal const string SkipSha1Value = "skip-sha1"; - internal static Library.Help.Feature SkipSha1Flag + internal static Help.Feature SkipSha1Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipSha1Value, new List() { "-ns", "--skip-sha1" }, "Don't include SHA-1 in output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string SkipSha256Value = "skip-sha256"; - internal static Library.Help.Feature SkipSha256Flag + internal static Help.Feature SkipSha256Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipSha256Value, new List() { "-ns256", "--skip-sha256" }, "Include SHA-256 in output", // TODO: This needs to be inverted later - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to include calculating the SHA-256 for each of the files."); } } internal const string SkipSha384Value = "skip-sha384"; - internal static Library.Help.Feature SkipSha384Flag + internal static Help.Feature SkipSha384Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipSha384Value, new List() { "-ns384", "--skip-sha384" }, "Include SHA-384 in output", // TODO: This needs to be inverted later - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to include calculating the SHA-384 for each of the files."); } } internal const string SkipSha512Value = "skip-sha512"; - internal static Library.Help.Feature SkipSha512Flag + internal static Help.Feature SkipSha512Flag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipSha512Value, new List() { "-ns512", "--skip-sha512" }, "Include SHA-512 in output", // TODO: This needs to be inverted later - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to include calculating the SHA-512 for each of the files."); } } internal const string SkipSpamSumValue = "skip-spamsum"; - internal static Library.Help.Feature SkipSpamSumFlag + internal static Help.Feature SkipSpamSumFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SkipSpamSumValue, new List() { "-nss", "--skip-spamsum" }, "Include SpamSum in output", // TODO: This needs to be inverted later - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This allows the user to include calculating the SpamSum for each of the files."); } } internal const string SuperdatValue = "superdat"; - internal static Library.Help.Feature SuperdatFlag + internal static Help.Feature SuperdatFlag { get { - return new Library.Help.Feature( + return new Help.Feature( SuperdatValue, new List() { "-sd", "--superdat" }, "Enable SuperDAT creation", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "Set the type flag to \"SuperDAT\" for the output DAT as well as preserving the directory structure of the inputted folder, if applicable."); } } internal const string TarValue = "tar"; - internal static Library.Help.Feature TarFlag + internal static Help.Feature TarFlag { get { - return new Library.Help.Feature( + return new Help.Feature( TarValue, new List() { "-tar", "--tar" }, "Enable Tape ARchive output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string Torrent7zipValue = "torrent-7zip"; - internal static Library.Help.Feature Torrent7zipFlag + internal static Help.Feature Torrent7zipFlag { get { - return new Library.Help.Feature( + return new Help.Feature( Torrent7zipValue, new List() { "-t7z", "--torrent-7zip" }, "Enable Torrent7Zip output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string TorrentGzipValue = "torrent-gzip"; - internal static Library.Help.Feature TorrentGzipFlag + internal static Help.Feature TorrentGzipFlag { get { - return new Library.Help.Feature( + return new Help.Feature( TorrentGzipValue, new List() { "-tgz", "--torrent-gzip" }, "Enable Torrent GZip output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string TorrentZipValue = "torrent-zip"; - internal static Library.Help.Feature TorrentZipFlag + internal static Help.Feature TorrentZipFlag { get { - return new Library.Help.Feature( + return new Help.Feature( TorrentZipValue, new List() { "-tzip", "--torrent-zip" }, "Enable Torrent Zip output", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string TrimValue = "trim"; - internal static Library.Help.Feature TrimFlag + internal static Help.Feature TrimFlag { get { - return new Library.Help.Feature( + return new Help.Feature( TrimValue, new List() { "-trim", "--trim" }, "Trim file names to fit NTFS length", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string TypeValue = "type"; - internal static Library.Help.Feature TypeFlag + internal static Help.Feature TypeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( TypeValue, new List() { "-ts", "--type" }, "Split DAT(s) or folder by file types (rom/disk)", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string UpdateDatValue = "update-dat"; - internal static Library.Help.Feature UpdateDatFlag + internal static Help.Feature UpdateDatFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateDatValue, new List() { "-ud", "--update-dat" }, "Output updated DAT to output directory", - Library.Help.FeatureType.Flag, + ParameterType.Flag, 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."); } } internal const string UpdateDescriptionValue = "update-description"; - internal static Library.Help.Feature UpdateDescriptionFlag + internal static Help.Feature UpdateDescriptionFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateDescriptionValue, new List() { "-udd", "--update-description" }, "Update machine descriptions from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of machine descriptions from base DATs."); } } internal const string UpdateGameTypeValue = "update-game-type"; - internal static Library.Help.Feature UpdateGameTypeFlag + internal static Help.Feature UpdateGameTypeFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateGameTypeValue, new List() { "-ugt", "--update-game-type" }, "Update machine type from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of machine type from base DATs."); } } internal const string UpdateHashesValue = "update-hashes"; - internal static Library.Help.Feature UpdateHashesFlag + internal static Help.Feature UpdateHashesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateHashesValue, new List() { "-uh", "--update-hashes" }, "Update hashes from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of hashes from base DATs."); } } internal const string UpdateManufacturerValue = "update-manufacturer"; - internal static Library.Help.Feature UpdateManufacturerFlag + internal static Help.Feature UpdateManufacturerFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateManufacturerValue, new List() { "-um", "--update-manufacturer" }, "Update machine manufacturers from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of machine manufacturers from base DATs."); } } internal const string UpdateNamesValue = "update-names"; - internal static Library.Help.Feature UpdateNamesFlag + internal static Help.Feature UpdateNamesFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateNamesValue, new List() { "-un", "--update-names" }, "Update item names from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of item names from base DATs."); } } internal const string UpdateParentsValue = "update-parents"; - internal static Library.Help.Feature UpdateParentsFlag + internal static Help.Feature UpdateParentsFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateParentsValue, new List() { "-up", "--update-parents" }, "Update machine parents from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of machine parents (romof, cloneof, sampleof) from base DATs."); } } internal const string UpdateYearValue = "update-year"; - internal static Library.Help.Feature UpdateYearFlag + internal static Help.Feature UpdateYearFlag { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateYearValue, new List() { "-uy", "--update-year" }, "Update machine years from base DATs", - Library.Help.FeatureType.Flag, + ParameterType.Flag, longDescription: "This flag enables updating of machine years from base DATs."); } } @@ -1245,43 +1245,43 @@ namespace SabreTools.Features #region Int32 features internal const string DepotDepthInt32Value = "depot-depth"; - internal static Library.Help.Feature DepotDepthInt32Input + internal static Help.Feature DepotDepthInt32Input { get { - return new Library.Help.Feature( + return new Help.Feature( DepotDepthInt32Value, new List() { "-depd", "--depot-depth" }, "Set depth of depot for inputs", - Library.Help.FeatureType.Int32, + ParameterType.Int32, longDescription: "Optionally, set the depth of input depots. Defaults to 4 deep otherwise."); } } internal const string RombaDepthInt32Value = "romba-depth"; - internal static Library.Help.Feature RombaDepthInt32Input + internal static Help.Feature RombaDepthInt32Input { get { - return new Library.Help.Feature( + return new Help.Feature( RombaDepthInt32Value, new List() { "-depr", "--romba-depth" }, "Set depth of depot for outputs", - Library.Help.FeatureType.Int32, + ParameterType.Int32, longDescription: "Optionally, set the depth of output depots. Defaults to 4 deep otherwise."); } } internal const string ThreadsInt32Value = "threads"; - internal static Library.Help.Feature ThreadsInt32Input + internal static Help.Feature ThreadsInt32Input { get { - return new Library.Help.Feature( + return new Help.Feature( ThreadsInt32Value, new List() { "-mt", "--threads" }, "Amount of threads to use (default = # cores)", - Library.Help.FeatureType.Int32, + ParameterType.Int32, longDescription: "Optionally, set the number of threads to use for the multithreaded operations. The default is the number of available machine threads; -1 means unlimited threads created."); } } @@ -1291,15 +1291,15 @@ namespace SabreTools.Features #region Int64 features internal const string RadixInt64Value = "radix"; - internal static Library.Help.Feature RadixInt64Input + internal static Help.Feature RadixInt64Input { get { - return new Library.Help.Feature( + return new Help.Feature( RadixInt64Value, new List() { "-rad", "--radix" }, "Set the midpoint to split at", - Library.Help.FeatureType.Int64, + ParameterType.Int64, longDescription: "Set the size at which all roms less than the size are put in the first DAT, and everything greater than or equal goes in the second."); } } @@ -1309,426 +1309,426 @@ namespace SabreTools.Features #region List features internal const string BaseDatListValue = "base-dat"; - internal static Library.Help.Feature BaseDatListInput + internal static Help.Feature BaseDatListInput { get { - return new Library.Help.Feature( + return new Help.Feature( BaseDatListValue, new List() { "-bd", "--base-dat" }, "Add a base DAT for processing", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Add a DAT or folder of DATs to the base set to be used for all operations. Multiple instances of this flag are allowed."); } } internal const string CategoryListValue = "category-filter"; - internal static Library.Help.Feature CategoryListInput + internal static Help.Feature CategoryListInput { get { - return new Library.Help.Feature( + return new Help.Feature( CategoryListValue, new List() { "-cat", "--category-filter" }, "Filter by Category", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this Category in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string CrcListValue = "crc"; - internal static Library.Help.Feature CrcListInput + internal static Help.Feature CrcListInput { get { - return new Library.Help.Feature( + return new Help.Feature( CrcListValue, new List() { "-crc", "--crc" }, "Filter by CRC hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this CRC hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string DatListValue = "dat"; - internal static Library.Help.Feature DatListInput + internal static Help.Feature DatListInput { get { - return new Library.Help.Feature( + return new Help.Feature( DatListValue, new List() { "-dat", "--dat" }, "Input DAT to be used", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "User-supplied DAT for use in all operations. Multiple instances of this flag are allowed."); } } internal const string ExcludeFieldListValue = "exclude-field"; - internal static Library.Help.Feature ExcludeFieldListInput + internal static Help.Feature ExcludeFieldListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ExcludeFieldListValue, new List() { "-ef", "--exclude-field" }, "Exclude a game/rom field from outputs", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Exclude any valid item or machine field from outputs. Examples include: romof, publisher, and offset."); } } internal const string ExtAListValue = "exta"; - internal static Library.Help.Feature ExtaListInput + internal static Help.Feature ExtaListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ExtAListValue, new List() { "-exta", "--exta" }, "Set extension to be included in first DAT", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Set the extension to be used to populate the first DAT. Multiple instances of this flag are allowed."); } } internal const string ExtBListValue = "extb"; - internal static Library.Help.Feature ExtbListInput + internal static Help.Feature ExtbListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ExtBListValue, new List() { "-extb", "--extb" }, "Set extension to be included in second DAT", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Set the extension to be used to populate the second DAT. Multiple instances of this flag are allowed."); } } internal const string ExtraIniListValue = "extra-ini"; - internal static Library.Help.Feature ExtraIniListInput + internal static Help.Feature ExtraIniListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ExtraIniListValue, new List() { "-ini", "--extra-ini" }, "Apply a MAME INI for given field(s)", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Apply any valid MAME INI for any valid field in the DatFile. Inputs are of the form 'Field:path\\to\\ini'. Multiple instances of this flag are allowed."); } } internal const string FilterListValue = "filter"; - internal static Library.Help.Feature FilterListInput + internal static Help.Feature FilterListInput { get { - return new Library.Help.Feature( + return new Help.Feature( FilterListValue, new List() { "-fi", "--filter" }, "Filter a game/rom field with the given value(s)", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Filter any valid item or machine field from inputs. Filters are input in the form 'key:value' or '!key:value', where the '!' signifies 'not matching'. Numeric values may also prefix the 'value' with '>', '<', or '=' accordingly. Key examples include: romof, category, and game. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string GameDescriptionListValue = "game-description"; - internal static Library.Help.Feature GameDescriptionListInput + internal static Help.Feature GameDescriptionListInput { get { - return new Library.Help.Feature( + return new Help.Feature( GameDescriptionListValue, new List() { "-gd", "--game-description" }, "Filter by game description", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this game description in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string GameNameListValue = "game-name"; - internal static Library.Help.Feature GameNameListInput + internal static Help.Feature GameNameListInput { get { - return new Library.Help.Feature( + return new Help.Feature( GameNameListValue, new List() { "-gn", "--game-name" }, "Filter by game name", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this game name in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string GameTypeListValue = "game-type"; - internal static Library.Help.Feature GameTypeListInput + internal static Help.Feature GameTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( GameTypeListValue, new List() { "-gt", "--game-type" }, "Include only games with a given type", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Include only items with this game type in the output. Multiple instances of this flag are allowed. Possible values are: None, Bios, Device, Mechanical"); } } internal const string ItemNameListValue = "item-name"; - internal static Library.Help.Feature ItemNameListInput + internal static Help.Feature ItemNameListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ItemNameListValue, new List() { "-rn", "--item-name" }, "Filter by item name", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this item name in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string ItemTypeListValue = "item-type"; - internal static Library.Help.Feature ItemTypeListInput + internal static Help.Feature ItemTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ItemTypeListValue, new List() { "-rt", "--item-type" }, "Filter by item type", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this item type in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string Md5ListValue = "md5"; - internal static Library.Help.Feature Md5ListInput + internal static Help.Feature Md5ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( Md5ListValue, new List() { "-md5", "--md5" }, "Filter by MD5 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this MD5 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotCategoryListValue = "not-category"; - internal static Library.Help.Feature NotCategoryListInput + internal static Help.Feature NotCategoryListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotCategoryListValue, new List() { "-ncat", "--not-category" }, "Filter by not Category", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this Category in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotCrcListValue = "not-crc"; - internal static Library.Help.Feature NotCrcListInput + internal static Help.Feature NotCrcListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotCrcListValue, new List() { "-ncrc", "--not-crc" }, "Filter by not CRC hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this CRC hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotGameDescriptionListValue = "not-game-description"; - internal static Library.Help.Feature NotGameDescriptionListInput + internal static Help.Feature NotGameDescriptionListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotGameDescriptionListValue, new List() { "-ngd", "--not-game-description" }, "Filter by not game description", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this game description in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotGameNameListValue = "not-game-name"; - internal static Library.Help.Feature NotGameNameListInput + internal static Help.Feature NotGameNameListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotGameNameListValue, new List() { "-ngn", "--not-game-name" }, "Filter by not game name", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this game name in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotGameTypeListValue = "not-game-type"; - internal static Library.Help.Feature NotGameTypeListInput + internal static Help.Feature NotGameTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotGameTypeListValue, new List() { "-ngt", "--not-game-type" }, "Exclude only games with a given type", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Include only items without this game type in the output. Multiple instances of this flag are allowed. Possible values are: None, Bios, Device, Mechanical"); } } internal const string NotItemNameListValue = "not-item-name"; - internal static Library.Help.Feature NotItemNameListInput + internal static Help.Feature NotItemNameListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotItemNameListValue, new List() { "-nrn", "--not-item-name" }, "Filter by not item name", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this item name in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotItemTypeListValue = "not-item-type"; - internal static Library.Help.Feature NotItemTypeListInput + internal static Help.Feature NotItemTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotItemTypeListValue, new List() { "-nrt", "--not-item-type" }, "Filter by not item type", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this item type in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotMd5ListValue = "not-md5"; - internal static Library.Help.Feature NotMd5ListInput + internal static Help.Feature NotMd5ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotMd5ListValue, new List() { "-nmd5", "--not-md5" }, "Filter by not MD5 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this MD5 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } #if NET_FRAMEWORK internal const string NotRipeMd160ListValue = "not-ripemd160"; - internal static Library.Help.Feature NotRipeMd160ListInput + internal static Help.Feature NotRipeMd160ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotRipeMd160ListValue, new List() { "-nripemd160", "--not-ripemd160" }, "Filter by not RIPEMD160 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this RIPEMD160 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } #endif internal const string NotSha1ListValue = "not-sha1"; - internal static Library.Help.Feature NotSha1ListInput + internal static Help.Feature NotSha1ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotSha1ListValue, new List() { "-nsha1", "--not-sha1" }, "Filter by not SHA-1 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this SHA-1 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotSha256ListValue = "not-sha256"; - internal static Library.Help.Feature NotSha256ListInput + internal static Help.Feature NotSha256ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotSha256ListValue, new List() { "-nsha256", "--not-sha256" }, "Filter by not SHA-256 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this SHA-256 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotSha384ListValue = "not-sha384"; - internal static Library.Help.Feature NotSha384ListInput + internal static Help.Feature NotSha384ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotSha384ListValue, new List() { "-nsha384", "--not-sha384" }, "Filter by not SHA-384 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this SHA-384 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotSha512ListValue = "not-sha512"; - internal static Library.Help.Feature NotSha512ListInput + internal static Help.Feature NotSha512ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotSha512ListValue, new List() { "-nsha512", "--not-sha512" }, "Filter by not SHA-512 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items without this SHA-512 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string NotStatusListValue = "not-status"; - internal static Library.Help.Feature NotStatusListInput + internal static Help.Feature NotStatusListInput { get { - return new Library.Help.Feature( + return new Help.Feature( NotStatusListValue, new List() { "-nis", "--not-status" }, "Exclude only items with a given status", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Include only items without this item status in the output. Multiple instances of this flag are allowed. Possible values are: None, Good, BadDump, Nodump, Verified"); } } internal const string OutputTypeListValue = "output-type"; - internal static Library.Help.Feature OutputTypeListInput + internal static Help.Feature OutputTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( OutputTypeListValue, new List() { "-ot", "--output-type" }, "Output DATs to a specified format", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Add outputting the created DAT to known format. Multiple instances of this flag are allowed. Possible values are: @@ -1766,29 +1766,29 @@ Possible values are: } internal const string RegionListValue = "region"; - internal static Library.Help.Feature RegionListInput + internal static Help.Feature RegionListInput { get { - return new Library.Help.Feature( + return new Help.Feature( RegionListValue, new List() { "-reg", "--region" }, "Add a region for 1G1R", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Add a region (in order) for use with 1G1R filtering. If this is not supplied, then by default, only parent sets will be included in the output. Multiple instances of this flag are allowed."); } } internal const string ReportTypeListValue = "report-type"; - internal static Library.Help.Feature ReportTypeListInput + internal static Help.Feature ReportTypeListInput { get { - return new Library.Help.Feature( + return new Help.Feature( ReportTypeListValue, new List() { "-srt", "--report-type" }, "Output statistics to a specified format", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Add outputting the created DAT to known format. Multiple instances of this flag are allowed. Possible values are: @@ -1803,101 +1803,101 @@ Possible values are: #if NET_FRAMEWORK internal const string RipeMd160ListValue = "ripemd160"; - internal static Library.Help.Feature RipeMd160ListInput + internal static Help.Feature RipeMd160ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( RipeMd160ListValue, new List() { "-ripemd160", "--ripemd160" }, "Filter by RIPEMD160 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this RIPEMD160 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } #endif internal const string Sha1ListValue = "sha1"; - internal static Library.Help.Feature Sha1ListInput + internal static Help.Feature Sha1ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( Sha1ListValue, new List() { "-sha1", "--sha1" }, "Filter by SHA-1 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this SHA-1 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string Sha256ListValue = "sha256"; - internal static Library.Help.Feature Sha256ListInput + internal static Help.Feature Sha256ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( Sha256ListValue, new List() { "-sha256", "--sha256" }, "Filter by SHA-256 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this SHA-256 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string Sha384ListValue = "sha384"; - internal static Library.Help.Feature Sha384ListInput + internal static Help.Feature Sha384ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( Sha384ListValue, new List() { "-sha384", "--sha384" }, "Filter by SHA-384 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this SHA-384 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string Sha512ListValue = "sha512"; - internal static Library.Help.Feature Sha512ListInput + internal static Help.Feature Sha512ListInput { get { - return new Library.Help.Feature( + return new Help.Feature( Sha512ListValue, new List() { "-sha512", "--sha512" }, "Filter by SHA-512 hash", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Include only items with this SHA-512 hash in the output. Additionally, the user can specify an exact match or full C#-style regex for pattern matching. Multiple instances of this flag are allowed."); } } internal const string StatusListValue = "status"; - internal static Library.Help.Feature StatusListInput + internal static Help.Feature StatusListInput { get { - return new Library.Help.Feature( + return new Help.Feature( StatusListValue, new List() { "-is", "--status" }, "Include only items with a given status", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: @"Include only items with this item status in the output. Multiple instances of this flag are allowed. Possible values are: None, Good, BadDump, Nodump, Verified"); } } internal const string UpdateFieldListValue = "update-field"; - internal static Library.Help.Feature UpdateFieldListInput + internal static Help.Feature UpdateFieldListInput { get { - return new Library.Help.Feature( + return new Help.Feature( UpdateFieldListValue, new List() { "-uf", "--update-field" }, "Update a game/rom field from base DATs", - Library.Help.FeatureType.List, + ParameterType.List, longDescription: "Update any valid item or machine field from base DAT(s). Examples include: romof, publisher, and offset."); } } @@ -1907,271 +1907,271 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); #region String features internal const string AddExtensionStringValue = "add-extension"; - internal static Library.Help.Feature AddExtensionStringInput + internal static Help.Feature AddExtensionStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( AddExtensionStringValue, new List() { "-ae", "--add-extension" }, "Add an extension to each item", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Add a postfix extension to each full item name."); } } internal const string AuthorStringValue = "author"; - internal static Library.Help.Feature AuthorStringInput + internal static Help.Feature AuthorStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( AuthorStringValue, new List() { "-au", "--author" }, "Set the author of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the author header field for the output DAT(s)"); } } internal const string CategoryStringValue = "category"; - internal static Library.Help.Feature CategoryStringInput + internal static Help.Feature CategoryStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( CategoryStringValue, new List() { "-c", "--category" }, "Set the category of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the category header field for the output DAT(s)"); } } internal const string CommentStringValue = "comment"; - internal static Library.Help.Feature CommentStringInput + internal static Help.Feature CommentStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( CommentStringValue, new List() { "-co", "--comment" }, "Set a new comment of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the comment header field for the output DAT(s)"); } } internal const string DateStringValue = "date"; - internal static Library.Help.Feature DateStringInput + internal static Help.Feature DateStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( DateStringValue, new List() { "-da", "--date" }, "Set a new date", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the date header field for the output DAT(s)"); } } internal const string DescriptionStringValue = "description"; - internal static Library.Help.Feature DescriptionStringInput + internal static Help.Feature DescriptionStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( DescriptionStringValue, new List() { "-de", "--description" }, "Set the description of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the description header field for the output DAT(s)"); } } internal const string EmailStringValue = "email"; - internal static Library.Help.Feature EmailStringInput + internal static Help.Feature EmailStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( EmailStringValue, new List() { "-em", "--email" }, "Set a new email of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the email header field for the output DAT(s)"); } } internal const string EqualStringValue = "equal"; - internal static Library.Help.Feature EqualStringInput + internal static Help.Feature EqualStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( EqualStringValue, new List() { "-seq", "--equal" }, "Filter by size ==", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Only include items of this exact size in the output DAT. Users can specify either a regular integer number or a number with a standard postfix. e.g. 8kb => 8000 or 8kib => 8192"); } } internal const string FilenameStringValue = "filename"; - internal static Library.Help.Feature FilenameStringInput + internal static Help.Feature FilenameStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( FilenameStringValue, new List() { "-f", "--filename" }, "Set the external name of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the external filename for the output DAT(s)"); } } internal const string ForceMergingStringValue = "forcemerging"; - internal static Library.Help.Feature ForceMergingStringInput + internal static Help.Feature ForceMergingStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( ForceMergingStringValue, new List() { "-fm", "--forcemerging" }, "Set force merging", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: @"Set the forcemerging tag to the given value. Possible values are: None, Split, Device, Merged, Nonmerged, Full"); } } internal const string ForceNodumpStringValue = "forcenodump"; - internal static Library.Help.Feature ForceNodumpStringInput + internal static Help.Feature ForceNodumpStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( ForceNodumpStringValue, new List() { "-fn", "--forcenodump" }, "Set force nodump", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: @"Set the forcenodump tag to the given value. Possible values are: None, Obsolete, Required, Ignore"); } } internal const string ForcePackingStringValue = "forcepacking"; - internal static Library.Help.Feature ForcePackingStringInput + internal static Help.Feature ForcePackingStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( ForcePackingStringValue, new List() { "-fp", "--forcepacking" }, "Set force packing", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: @"Set the forcepacking tag to the given value. Possible values are: None, Zip, Unzip, Partial, Flat"); } } internal const string GreaterStringValue = "greater"; - internal static Library.Help.Feature GreaterStringInput + internal static Help.Feature GreaterStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( GreaterStringValue, new List() { "-sgt", "--greater" }, "Filter by size >=", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Only include items whose size is greater than or equal to this value in the output DAT. Users can specify either a regular integer number or a number with a standard postfix. e.g. 8kb => 8000 or 8kib => 8192"); } } internal const string HeaderStringValue = "header"; - internal static Library.Help.Feature HeaderStringInput + internal static Help.Feature HeaderStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( HeaderStringValue, new List() { "-h", "--header" }, "Set a header skipper to use, blank means all", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the header special field for the output DAT(s). In file rebuilding, this flag allows for either all copier headers (using \"\") or specific copier headers by name (such as \"fds.xml\") to determine if a file matches or not."); } } internal const string HomepageStringValue = "homepage"; - internal static Library.Help.Feature HomepageStringInput + internal static Help.Feature HomepageStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( HomepageStringValue, new List() { "-hp", "--homepage" }, "Set a new homepage of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the homepage header field for the output DAT(s)"); } } internal const string LessStringValue = "less"; - internal static Library.Help.Feature LessStringInput + internal static Help.Feature LessStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( LessStringValue, new List() { "-slt", "--less" }, "Filter by size =<", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Only include items whose size is less than or equal to this value in the output DAT. Users can specify either a regular integer number or a number with a standard postfix. e.g. 8kb => 8000 or 8kib => 8192"); } } internal const string NameStringValue = "name"; - internal static Library.Help.Feature NameStringInput + internal static Help.Feature NameStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( NameStringValue, new List() { "-n", "--name" }, "Set the internal name of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the name header field for the output DAT(s)"); } } internal const string OutputDirStringValue = "output-dir"; - internal static Library.Help.Feature OutputDirStringInput + internal static Help.Feature OutputDirStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( OutputDirStringValue, new List() { "-out", "--output-dir" }, "Set output directory", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "This sets an output folder to be used when the files are created. If a path is not defined, the runtime directory is used instead."); } } internal const string PostfixStringValue = "postfix"; - internal static Library.Help.Feature PostfixStringInput + internal static Help.Feature PostfixStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( PostfixStringValue, new List() { "-post", "--postfix" }, "Set postfix for all lines", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: @"Set a generic postfix to be appended to all outputted lines. Some special strings that can be used: @@ -2196,15 +2196,15 @@ Some special strings that can be used: } internal const string PrefixStringValue = "prefix"; - internal static Library.Help.Feature PrefixStringInput + internal static Help.Feature PrefixStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( PrefixStringValue, new List() { "-pre", "--prefix" }, "Set prefix for all lines", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: @"Set a generic prefix to be prepended to all outputted lines. Some special strings that can be used: @@ -2224,85 +2224,85 @@ Some special strings that can be used: } internal const string ReplaceExtensionStringValue = "replace-extension"; - internal static Library.Help.Feature ReplaceExtensionStringInput + internal static Help.Feature ReplaceExtensionStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( ReplaceExtensionStringValue, new List() { "-rep", "--replace-extension" }, "Replace all extensions with specified", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "When an extension exists, replace it with the provided instead."); } } internal const string RootStringValue = "root"; - internal static Library.Help.Feature RootStringInput + internal static Help.Feature RootStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( RootStringValue, new List() { "-r", "--root" }, "Set a new rootdir", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the rootdir (as used by SuperDAT mode) for the output DAT(s)."); } } internal const string RootDirStringValue = "root-dir"; - internal static Library.Help.Feature RootDirStringInput + internal static Help.Feature RootDirStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( RootDirStringValue, new List() { "-rd", "--root-dir" }, "Set the root directory for calc", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "In the case that the files will not be stored from the root directory, a new root can be set for path length calculations."); } } internal const string TempStringValue = "temp"; - internal static Library.Help.Feature TempStringInput + internal static Help.Feature TempStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( TempStringValue, new List() { "-t", "--temp" }, "Set the temporary directory to use", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Optionally, a temp folder can be supplied in the case the default temp directory is not preferred."); } } internal const string UrlStringValue = "url"; - internal static Library.Help.Feature UrlStringInput + internal static Help.Feature UrlStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( UrlStringValue, new List() { "-u", "--url" }, "Set a new URL of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the URL header field for the output DAT(s)"); } } internal const string VersionStringValue = "version"; - internal static Library.Help.Feature VersionStringInput + internal static Help.Feature VersionStringInput { get { - return new Library.Help.Feature( + return new Help.Feature( VersionStringValue, new List() { "-v", "--version" }, "Set the version of the DAT", - Library.Help.FeatureType.String, + ParameterType.String, longDescription: "Set the version header field for the output DAT(s)"); } } @@ -2432,7 +2432,7 @@ Some special strings that can be used: #endregion - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { // Generic feature flags Cleaner = GetCleaner(features); @@ -2455,7 +2455,7 @@ Some special strings that can be used: /// /// Get include from scan from feature list /// - protected Hash GetIncludeInScan(Dictionary features) + protected Hash GetIncludeInScan(Dictionary features) { Hash includeInScan = Hash.Standard; // TODO: This should be All eventually @@ -2482,7 +2482,7 @@ Some special strings that can be used: /// /// Get OutputFormat from feature list /// - protected OutputFormat GetOutputFormat(Dictionary features) + protected OutputFormat GetOutputFormat(Dictionary features) { if (GetBoolean(features, TarValue)) return OutputFormat.TapeArchive; @@ -2511,7 +2511,7 @@ Some special strings that can be used: /// /// Get SkipFileType from feature list /// - protected SkipFileType GetSkipFileType(Dictionary features) + protected SkipFileType GetSkipFileType(Dictionary features) { if (GetBoolean(features, SkipArchivesValue)) return SkipFileType.Archive; @@ -2524,7 +2524,7 @@ Some special strings that can be used: /// /// Get SplittingMode from feature list /// - protected SplittingMode GetSplittingMode(Dictionary features) + protected SplittingMode GetSplittingMode(Dictionary features) { SplittingMode splittingMode = SplittingMode.None; @@ -2545,7 +2545,7 @@ Some special strings that can be used: /// /// Get SplitType from feature list /// - protected MergingFlag GetSplitType(Dictionary features) + protected MergingFlag GetSplitType(Dictionary features) { MergingFlag splitType = MergingFlag.None; if (GetBoolean(features, DatDeviceNonMergedValue)) @@ -2565,7 +2565,7 @@ Some special strings that can be used: /// /// Get StatReportFormat from feature list /// - protected StatReportFormat GetStatReportFormat(Dictionary features) + protected StatReportFormat GetStatReportFormat(Dictionary features) { StatReportFormat statDatFormat = StatReportFormat.None; @@ -2580,7 +2580,7 @@ Some special strings that can be used: /// /// Get TreatAsFiles from feature list /// - protected TreatAsFile GetTreatAsFiles(Dictionary features) + protected TreatAsFile GetTreatAsFiles(Dictionary features) { TreatAsFile asFiles = 0x00; if (GetBoolean(features, AaruFormatsAsFilesValue)) @@ -2596,7 +2596,7 @@ Some special strings that can be used: /// /// Get update fields from feature list /// - protected List GetUpdateFields(Dictionary features) + protected List GetUpdateFields(Dictionary features) { List updateFields = new List(); @@ -2664,7 +2664,7 @@ Some special strings that can be used: /// /// Get UpdateMode from feature list /// - protected UpdateMode GetUpdateMode(Dictionary features) + protected UpdateMode GetUpdateMode(Dictionary features) { UpdateMode updateMode = UpdateMode.None; @@ -2708,7 +2708,7 @@ Some special strings that can be used: /// /// Get Cleaner from feature list /// - private Cleaner GetCleaner(Dictionary features) + private Cleaner GetCleaner(Dictionary features) { Cleaner cleaner = new Cleaner() { @@ -2737,7 +2737,7 @@ Some special strings that can be used: /// /// Get DatHeader from feature list /// - private DatHeader GetDatHeader(Dictionary features) + private DatHeader GetDatHeader(Dictionary features) { // TODO: Sort this by region, like the actual header DatHeader datHeader = new DatHeader @@ -2793,7 +2793,7 @@ Some special strings that can be used: /// /// Get DedupeType from feature list /// - private DedupeType GetDedupeType(Dictionary features) + private DedupeType GetDedupeType(Dictionary features) { if (GetBoolean(features, DedupValue)) return DedupeType.Full; @@ -2806,7 +2806,7 @@ Some special strings that can be used: /// /// Get ExtraIni from feature list /// - private ExtraIni GetExtras(Dictionary features) + private ExtraIni GetExtras(Dictionary features) { ExtraIni extraIni = new ExtraIni(); extraIni.PopulateFromList(GetList(features, ExtraIniListValue)); @@ -2816,7 +2816,7 @@ Some special strings that can be used: /// /// Get Filter from feature list /// - private Filter GetFilter(Dictionary features) + private Filter GetFilter(Dictionary features) { Filter filter = new Filter(); diff --git a/SabreTools/Features/Batch.cs b/SabreTools/Features/Batch.cs index af7a561c..ae4b8838 100644 --- a/SabreTools/Features/Batch.cs +++ b/SabreTools/Features/Batch.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.Filtering; @@ -21,7 +22,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-bt", "--batch" }; Description = "Enable batch mode"; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"Run a special mode that takes input files as lists of batch commands to run sequentially. Each command has to be its own line and must be followed by a semicolon (`;`). Commented lines may start with either `REM` or `#`. Multiple batch files are allowed but they will be run independently from each other. The following commands are currently implemented: @@ -41,10 +42,10 @@ Add new output format(s): format(datformat, ...); Set the output directory: output(outdir); Write the internal items: write([overwrite = true]); Reset the internal state: reset();"; - Features = new Dictionary(); + Features = new Dictionary(); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/SabreTools/Features/DatFromDir.cs b/SabreTools/Features/DatFromDir.cs index 6bb169ea..ce42f939 100644 --- a/SabreTools/Features/DatFromDir.cs +++ b/SabreTools/Features/DatFromDir.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; @@ -16,9 +17,9 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-d", "--d2d", "--dfd" }; Description = "Create DAT(s) from an input directory"; - _featureType = Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Create a DAT file from an input directory or set of files. By default, this will output a DAT named based on the input directory and the current date. It will also treat all archives as possible games and add all three hashes (CRC, MD5, SHA-1) for each file."; - Features = new Dictionary(); + Features = new Dictionary(); // Hash Features AddFeature(SkipMd5Flag); @@ -52,7 +53,7 @@ namespace SabreTools.Features AddFeature(ThreadsInt32Input); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/SabreTools/Features/DisplayHelp.cs b/SabreTools/Features/DisplayHelp.cs index cfb8e63f..4542e0e1 100644 --- a/SabreTools/Features/DisplayHelp.cs +++ b/SabreTools/Features/DisplayHelp.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace SabreTools.Features { @@ -13,12 +13,12 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-?", "-h", "--help" }; Description = "Show this help"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Built-in to most of the programs is a basic help text."; Features = new Dictionary(); } - public override bool ProcessArgs(string[] args, Help help) + public override bool ProcessArgs(string[] args, Help.Help help) { // If we had something else after help if (args.Length > 1) diff --git a/SabreTools/Features/DisplayHelpDetailed.cs b/SabreTools/Features/DisplayHelpDetailed.cs index c32f4b97..f90c0c32 100644 --- a/SabreTools/Features/DisplayHelpDetailed.cs +++ b/SabreTools/Features/DisplayHelpDetailed.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace SabreTools.Features { @@ -13,12 +13,12 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-??", "-hd", "--help-detailed" }; Description = "Show this detailed help"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "Display a detailed help text to the screen."; Features = new Dictionary(); } - public override bool ProcessArgs(string[] args, Help help) + public override bool ProcessArgs(string[] args, Help.Help help) { // If we had something else after help if (args.Length > 1) diff --git a/SabreTools/Features/Extract.cs b/SabreTools/Features/Extract.cs index bebafe55..9acecd57 100644 --- a/SabreTools/Features/Extract.cs +++ b/SabreTools/Features/Extract.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.IO; -using SabreTools.Library.Tools; namespace SabreTools.Features { @@ -15,7 +14,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-ex", "--extract" }; Description = "Extract and remove copier headers"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"This will detect, store, and remove copier headers from a file or folder of files. The headers are backed up and collated by the hash of the unheadered file. Files are then output without the detected copier header alongside the originals with the suffix .new. No input files are altered in the process. Only uncompressed files will be processed. The following systems have headers that this program can work with: diff --git a/SabreTools/Features/Restore.cs b/SabreTools/Features/Restore.cs index d06feef2..899b7b42 100644 --- a/SabreTools/Features/Restore.cs +++ b/SabreTools/Features/Restore.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.IO; namespace SabreTools.Features @@ -14,7 +14,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-re", "--restore" }; Description = "Restore header to file based on SHA-1"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"This will make use of stored copier headers and reapply them to files if they match the included hash. More than one header can be applied to a file, so they will be output to new files, suffixed with .newX, where X is a number. No input files are altered in the process. Only uncompressed files will be processed. The following systems have headers that this program can work with: diff --git a/SabreTools/Features/Script.cs b/SabreTools/Features/Script.cs index af1c9728..5927fd12 100644 --- a/SabreTools/Features/Script.cs +++ b/SabreTools/Features/Script.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Library.Help; +using SabreTools.Help; namespace SabreTools.Features { @@ -13,7 +13,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "--script" }; Description = "Enable script mode (no clear screen)"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "For times when SabreTools is being used in a scripted environment, the user may not want the screen to be cleared every time that it is called. This flag allows the user to skip clearing the screen on run just like if the console was being redirected."; Features = new Dictionary(); } diff --git a/SabreTools/Features/Sort.cs b/SabreTools/Features/Sort.cs index 4a0486bf..ed3e0d3f 100644 --- a/SabreTools/Features/Sort.cs +++ b/SabreTools/Features/Sort.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.FileTypes; -using SabreTools.Library.Help; using SabreTools.Library.IO; using SabreTools.Library.Tools; @@ -18,7 +18,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-ss", "--sort" }; Description = "Sort inputs by a set of DATs"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "This feature allows the user to quickly rebuild based on a supplied DAT file(s). By default all files will be rebuilt to uncompressed folders in the output directory."; Features = new Dictionary(); diff --git a/SabreTools/Features/Split.cs b/SabreTools/Features/Split.cs index 1bed5249..6b453847 100644 --- a/SabreTools/Features/Split.cs +++ b/SabreTools/Features/Split.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.IO; @@ -18,9 +19,9 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-sp", "--split" }; Description = "Split input DATs by a given criteria"; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "This feature allows the user to split input DATs by a number of different possible criteria. See the individual input information for details. More than one split type is allowed at a time."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(OutputTypeListInput); this[OutputTypeListInput].AddFeature(DeprecatedFlag); @@ -38,7 +39,7 @@ namespace SabreTools.Features AddFeature(TypeFlag); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); SplittingMode splittingMode = GetSplittingMode(features); diff --git a/SabreTools/Features/Stats.cs b/SabreTools/Features/Stats.cs index 793e5104..81db1958 100644 --- a/SabreTools/Features/Stats.cs +++ b/SabreTools/Features/Stats.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; namespace SabreTools.Features { @@ -15,7 +15,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-st", "--stats" }; Description = "Get statistics on all input DATs"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = @"This will output by default the combined statistics for all input DAT files. The stats that are outputted are as follows: diff --git a/SabreTools/Features/Update.cs b/SabreTools/Features/Update.cs index 1c2439ff..c33dfd4f 100644 --- a/SabreTools/Features/Update.cs +++ b/SabreTools/Features/Update.cs @@ -4,6 +4,7 @@ using System.IO; using System.Threading.Tasks; using SabreTools.Data; +using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.IO; @@ -20,9 +21,9 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-ud", "--update" }; Description = "Update and manipulate DAT(s)"; - _featureType = SabreTools.Library.Help.FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "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."; - Features = new Dictionary(); + Features = new Dictionary(); // Output Formats AddFeature(OutputTypeListInput); @@ -97,7 +98,7 @@ namespace SabreTools.Features AddFeature(ThreadsInt32Input); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/SabreTools/Features/Verify.cs b/SabreTools/Features/Verify.cs index 0f74dee1..31e85f76 100644 --- a/SabreTools/Features/Verify.cs +++ b/SabreTools/Features/Verify.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; +using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Help; using SabreTools.Library.IO; using SabreTools.Library.Tools; @@ -16,7 +16,7 @@ namespace SabreTools.Features Name = Value; Flags = new List() { "-ve", "--verify" }; Description = "Verify a folder against DATs"; - _featureType = FeatureType.Flag; + _featureType = ParameterType.Flag; LongDescription = "When used, this will use an input DAT or set of DATs to blindly check against an input folder. The base of the folder is considered the base for the combined DATs and games are either the directories or archives within. This will only do a direct verification of the items within and will create a fixdat afterwards for missing files."; Features = new Dictionary(); diff --git a/SabreTools/Program.cs b/SabreTools/Program.cs index 5c67351e..ba8547e4 100644 --- a/SabreTools/Program.cs +++ b/SabreTools/Program.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using SabreTools.Features; using SabreTools.Data; -using SabreTools.Library.Help; +using SabreTools.Help; using SabreTools.Library.Logging; namespace SabreTools @@ -15,7 +15,7 @@ namespace SabreTools /// /// Help object that determines available functionality /// - private static Help _help; + private static Help.Help _help; /// /// Logging object @@ -149,7 +149,7 @@ namespace SabreTools /// Generate a Help object for this program /// /// Populated Help object - private static Help RetrieveHelp() + private static Help.Help RetrieveHelp() { // Create and add the header to the Help object string barrier = "-----------------------------------------"; @@ -162,7 +162,7 @@ namespace SabreTools }; // Create the base help object with header - Help help = new Help(helpHeader); + Help.Help help = new Help.Help(helpHeader); // Add all of the features help.Add(new DisplayHelp()); diff --git a/SabreTools/SabreTools.csproj b/SabreTools/SabreTools.csproj index 0a721f50..8a9a6810 100644 --- a/SabreTools/SabreTools.csproj +++ b/SabreTools/SabreTools.csproj @@ -13,6 +13,7 @@ +