Extract out Help namespace

This commit is contained in:
Matt Nadareski
2020-12-07 13:57:26 -08:00
parent 8d593c585c
commit 6423e46b53
52 changed files with 721 additions and 685 deletions

4
.gitignore vendored
View File

@@ -9,7 +9,9 @@
/SabreTools/Properties/launchSettings.json /SabreTools/Properties/launchSettings.json
/SabreTools/SabreTools.csproj.user /SabreTools/SabreTools.csproj.user
/SabreTools.Data/bin/ /SabreTools.Data/bin/
/SabreTools.Data/obj/ /SabreTools.Data/obj
/SabreTools.Help/bin/
/SabreTools.Help/obj/
/SabreTools.Library/bin/ /SabreTools.Library/bin/
/SabreTools.Library/obj/ /SabreTools.Library/obj/
/SabreTools.Skippers/bin/ /SabreTools.Skippers/bin/

View File

@@ -2,6 +2,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.FileTypes; using SabreTools.Library.FileTypes;
@@ -18,14 +19,14 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "archive" }; Flags = new List<string>() { "archive" };
Description = "Adds ROM files from the specified directories to the ROM 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. LongDescription = @"Adds ROM files from the specified directories to the ROM archive.
Traverses the specified directory trees looking for zip files and normal files. 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 Unpacked files will be stored as individual entries. Prior to unpacking a zip
file, the external SHA1 is checked against the DAT index. 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 If -only-needed is set, only those files are put in the ROM archive that
have a current entry in the DAT index."; have a current entry in the DAT index.";
Features = new Dictionary<string, SabreTools.Library.Help.Feature>(); Features = new Dictionary<string, SabreTools.Help.Feature>();
AddFeature(OnlyNeededFlag); AddFeature(OnlyNeededFlag);
AddFeature(ResumeStringInput); AddFeature(ResumeStringInput);
@@ -38,7 +39,7 @@ have a current entry in the DAT index.";
AddFeature(NoDbFlag); AddFeature(NoDbFlag);
} }
public override void ProcessFeatures(Dictionary<string, SabreTools.Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, SabreTools.Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);

View File

@@ -5,9 +5,9 @@ using System.Linq;
using System.Xml; using System.Xml;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Logging; using SabreTools.Library.Logging;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
@@ -20,93 +20,93 @@ namespace RombaSharp.Features
#region Private Flag features #region Private Flag features
internal const string CopyValue = "copy"; internal const string CopyValue = "copy";
internal static SabreTools.Library.Help.Feature CopyFlag internal static SabreTools.Help.Feature CopyFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
CopyValue, CopyValue,
"-copy", "-copy",
"Copy files to output instead of rebuilding", "Copy files to output instead of rebuilding",
SabreTools.Library.Help.FeatureType.Flag); ParameterType.Flag);
} }
} // Unique to RombaSharp } // Unique to RombaSharp
internal const string FixdatOnlyValue = "fixdat-only"; internal const string FixdatOnlyValue = "fixdat-only";
internal static SabreTools.Library.Help.Feature FixdatOnlyFlag internal static SabreTools.Help.Feature FixdatOnlyFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
FixdatOnlyValue, FixdatOnlyValue,
"-fixdatOnly", "-fixdatOnly",
"only fix dats and don't generate torrentzips", "only fix dats and don't generate torrentzips",
SabreTools.Library.Help.FeatureType.Flag); ParameterType.Flag);
} }
} }
internal const string LogOnlyValue = "log-only"; internal const string LogOnlyValue = "log-only";
internal static SabreTools.Library.Help.Feature LogOnlyFlag internal static SabreTools.Help.Feature LogOnlyFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
LogOnlyValue, LogOnlyValue,
"-log-only", "-log-only",
"Only write out actions to log", "Only write out actions to log",
SabreTools.Library.Help.FeatureType.Flag); ParameterType.Flag);
} }
} }
internal const string NoDbValue = "no-db"; internal const string NoDbValue = "no-db";
internal static SabreTools.Library.Help.Feature NoDbFlag internal static SabreTools.Help.Feature NoDbFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
NoDbValue, NoDbValue,
"-no-db", "-no-db",
"archive into depot but do not touch DB index and ignore only-needed flag", "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 const string OnlyNeededValue = "only-needed";
internal static SabreTools.Library.Help.Feature OnlyNeededFlag internal static SabreTools.Help.Feature OnlyNeededFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
OnlyNeededValue, OnlyNeededValue,
"-only-needed", "-only-needed",
"only archive ROM files actually referenced by DAT files from the DAT index", "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 const string SkipInitialScanValue = "skip-initial-scan";
internal static SabreTools.Library.Help.Feature SkipInitialScanFlag internal static SabreTools.Help.Feature SkipInitialScanFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
SkipInitialScanValue, SkipInitialScanValue,
"-skip-initial-scan", "-skip-initial-scan",
"skip the initial scan of the files to determine amount of work", "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 const string UseGolangZipValue = "use-golang-zip";
internal static SabreTools.Library.Help.Feature UseGolangZipFlag internal static SabreTools.Help.Feature UseGolangZipFlag
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
UseGolangZipValue, UseGolangZipValue,
"-use-golang-zip", "-use-golang-zip",
"use go zip implementation instead of zlib", "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 #region Private Int32 features
internal const string Include7ZipsInt32Value = "include-7zips"; internal const string Include7ZipsInt32Value = "include-7zips";
internal static SabreTools.Library.Help.Feature Include7ZipsInt32Input internal static SabreTools.Help.Feature Include7ZipsInt32Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
Include7ZipsInt32Value, Include7ZipsInt32Value,
"-include-7zips", "-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", "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 const string IncludeGZipsInt32Value = "include-gzips";
internal static SabreTools.Library.Help.Feature IncludeGZipsInt32Input internal static SabreTools.Help.Feature IncludeGZipsInt32Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
IncludeGZipsInt32Value, IncludeGZipsInt32Value,
"-include-gzips", "-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", "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 const string IncludeZipsInt32Value = "include-zips";
internal static SabreTools.Library.Help.Feature IncludeZipsInt32Input internal static SabreTools.Help.Feature IncludeZipsInt32Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
IncludeZipsInt32Value, IncludeZipsInt32Value,
"-include-zips", "-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", "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 const string SubworkersInt32Value = "subworkers";
internal static SabreTools.Library.Help.Feature SubworkersInt32Input internal static SabreTools.Help.Feature SubworkersInt32Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
SubworkersInt32Value, SubworkersInt32Value,
"-subworkers", "-subworkers",
"how many subworkers to launch for each worker", "how many subworkers to launch for each worker",
SabreTools.Library.Help.FeatureType.Int32); ParameterType.Int32);
} }
} // Defaults to Workers count in config } // Defaults to Workers count in config
internal const string WorkersInt32Value = "workers"; internal const string WorkersInt32Value = "workers";
internal static SabreTools.Library.Help.Feature WorkersInt32Input internal static SabreTools.Help.Feature WorkersInt32Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
WorkersInt32Value, WorkersInt32Value,
"-workers", "-workers",
"how many workers to launch for the job", "how many workers to launch for the job",
SabreTools.Library.Help.FeatureType.Int32); ParameterType.Int32);
} }
} // Defaults to Workers count in config } // Defaults to Workers count in config
@@ -184,15 +184,15 @@ namespace RombaSharp.Features
#region Private Int64 features #region Private Int64 features
internal const string SizeInt64Value = "size"; internal const string SizeInt64Value = "size";
internal static SabreTools.Library.Help.Feature SizeInt64Input internal static SabreTools.Help.Feature SizeInt64Input
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
SizeInt64Value, SizeInt64Value,
"-size", "-size",
"size of the rom to lookup", "size of the rom to lookup",
SabreTools.Library.Help.FeatureType.Int64); ParameterType.Int64);
} }
} }
@@ -201,28 +201,28 @@ namespace RombaSharp.Features
#region Private List<String> features #region Private List<String> features
internal const string DatsListStringValue = "dats"; internal const string DatsListStringValue = "dats";
internal static SabreTools.Library.Help.Feature DatsListStringInput internal static SabreTools.Help.Feature DatsListStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
DatsListStringValue, DatsListStringValue,
"-dats", "-dats",
"purge only roms declared in these dats", "purge only roms declared in these dats",
SabreTools.Library.Help.FeatureType.List); ParameterType.List);
} }
} }
internal const string DepotListStringValue = "depot"; internal const string DepotListStringValue = "depot";
internal static SabreTools.Library.Help.Feature DepotListStringInput internal static SabreTools.Help.Feature DepotListStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
DepotListStringValue, DepotListStringValue,
"-depot", "-depot",
"work only on specified depot path", "work only on specified depot path",
SabreTools.Library.Help.FeatureType.List); ParameterType.List);
} }
} }
@@ -231,119 +231,119 @@ namespace RombaSharp.Features
#region Private String features #region Private String features
internal const string BackupStringValue = "backup"; internal const string BackupStringValue = "backup";
internal static SabreTools.Library.Help.Feature BackupStringInput internal static SabreTools.Help.Feature BackupStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
BackupStringValue, BackupStringValue,
"-backup", "-backup",
"backup directory where backup files are moved to", "backup directory where backup files are moved to",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string DescriptionStringValue = "description"; internal const string DescriptionStringValue = "description";
internal static SabreTools.Library.Help.Feature DescriptionStringInput internal static SabreTools.Help.Feature DescriptionStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
DescriptionStringValue, DescriptionStringValue,
"-description", "-description",
"description value in DAT header", "description value in DAT header",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string MissingSha1sStringValue = "missing-sha1s"; internal const string MissingSha1sStringValue = "missing-sha1s";
internal static SabreTools.Library.Help.Feature MissingSha1sStringInput internal static SabreTools.Help.Feature MissingSha1sStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
MissingSha1sStringValue, MissingSha1sStringValue,
"-missingSha1s", "-missingSha1s",
"write paths of dats with missing sha1s into this file", "write paths of dats with missing sha1s into this file",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string NameStringValue = "name"; internal const string NameStringValue = "name";
internal static SabreTools.Library.Help.Feature NameStringInput internal static SabreTools.Help.Feature NameStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
NameStringValue, NameStringValue,
"-name", "-name",
"name value in DAT header", "name value in DAT header",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string NewStringValue = "new"; internal const string NewStringValue = "new";
internal static SabreTools.Library.Help.Feature NewStringInput internal static SabreTools.Help.Feature NewStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
NewStringValue, NewStringValue,
"-new", "-new",
"new DAT file", "new DAT file",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string OldStringValue = "old"; internal const string OldStringValue = "old";
internal static SabreTools.Library.Help.Feature OldStringInput internal static SabreTools.Help.Feature OldStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
OldStringValue, OldStringValue,
"-old", "-old",
"old DAT file", "old DAT file",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string OutStringValue = "out"; internal const string OutStringValue = "out";
internal static SabreTools.Library.Help.Feature OutStringInput internal static SabreTools.Help.Feature OutStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
OutStringValue, OutStringValue,
"-out", "-out",
"output file", "output file",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string ResumeStringValue = "resume"; internal const string ResumeStringValue = "resume";
internal static SabreTools.Library.Help.Feature ResumeStringInput internal static SabreTools.Help.Feature ResumeStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
ResumeStringValue, ResumeStringValue,
"-resume", "-resume",
"resume a previously interrupted operation from the specified path", "resume a previously interrupted operation from the specified path",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
internal const string SourceStringValue = "source"; internal const string SourceStringValue = "source";
internal static SabreTools.Library.Help.Feature SourceStringInput internal static SabreTools.Help.Feature SourceStringInput
{ {
get get
{ {
return new SabreTools.Library.Help.Feature( return new SabreTools.Help.Feature(
SourceStringValue, SourceStringValue,
"-source", "-source",
"source directory", "source directory",
SabreTools.Library.Help.FeatureType.String); ParameterType.String);
} }
} }
@@ -375,7 +375,7 @@ namespace RombaSharp.Features
/// </summary> /// </summary>
protected Logger logger = new Logger(); protected Logger logger = new Logger();
public override void ProcessFeatures(Dictionary<string, SabreTools.Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, SabreTools.Help.Feature> features)
{ {
InitializeConfiguration(); InitializeConfiguration();
EnsureDatabase(_db, _connectionString); EnsureDatabase(_db, _connectionString);

View File

@@ -2,9 +2,9 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.FileTypes; using SabreTools.Library.FileTypes;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -18,7 +18,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "build" }; Flags = new List<string>() { "build" };
Description = "For each specified DAT file it creates the torrentzip files."; 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 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 output dir. The files will be placed in the specified location using a folder
structure according to the original DAT master directory tree structure."; structure according to the original DAT master directory tree structure.";

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "cancel" }; Flags = new List<string>() { "cancel" };
Description = "Cancels current long-running job"; Description = "Cancels current long-running job";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Cancels current long-running job."; LongDescription = "Cancels current long-running job.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
using SabreTools.Library.Reports; using SabreTools.Library.Reports;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -16,7 +16,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "datstats" }; Flags = new List<string>() { "datstats" };
Description = "Prints dat stats."; Description = "Prints dat stats.";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Print dat stats."; LongDescription = "Print dat stats.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -14,7 +14,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "dbstats" }; Flags = new List<string>() { "dbstats" };
Description = "Prints db stats."; Description = "Prints db stats.";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Print db stats."; LongDescription = "Print db stats.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -16,7 +16,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "diffdat" }; Flags = new List<string>() { "diffdat" };
Description = "Creates a DAT file with those entries that are in -new DAT."; 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 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."; in -old DAT file. Ignores those entries in -old that are not in -new.";
this.Features = new Dictionary<string, Feature>(); this.Features = new Dictionary<string, Feature>();

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Filtering; using SabreTools.Library.Filtering;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
@@ -18,7 +18,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "dir2dat" }; Flags = new List<string>() { "dir2dat" };
Description = "Creates a DAT file for the specified input directory and saves it to the -out filename."; 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."; LongDescription = "Creates a DAT file for the specified input directory and saves it to the -out filename.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-?", "-h", "--help" }; Flags = new List<string>() { "-?", "-h", "--help" };
Description = "Show this help"; Description = "Show this help";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Built-in to most of the programs is a basic help text."; LongDescription = "Built-in to most of the programs is a basic help text.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-??", "-hd", "--help-detailed" }; Flags = new List<string>() { "-??", "-hd", "--help-detailed" };
Description = "Show this detailed help"; Description = "Show this detailed help";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Display a detailed help text to the screen."; LongDescription = "Display a detailed help text to the screen.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -16,7 +16,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "ediffdat" }; Flags = new List<string>() { "ediffdat" };
Description = "Creates a DAT file with those entries that are in -new DAT."; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
@@ -17,7 +17,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "export" }; Flags = new List<string>() { "export" };
Description = "Exports db to export.csv"; Description = "Exports db to export.csv";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Exports db to standardized export.csv"; LongDescription = "Exports db to standardized export.csv";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.Logging;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -14,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "fixdat" }; Flags = new List<string>() { "fixdat" };
Description = "For each specified DAT file it creates a fix DAT."; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -2,9 +2,8 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Logging;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -19,7 +18,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "import" }; Flags = new List<string>() { "import" };
Description = "Import a database from a formatted CSV file"; Description = "Import a database from a formatted CSV file";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Import a database from a formatted CSV file"; LongDescription = "Import a database from a formatted CSV file";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
@@ -16,7 +16,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "lookup" }; Flags = new List<string>() { "lookup" };
Description = "For each specified hash it looks up any available information."; 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)."; LongDescription = "For each specified hash it looks up any available information (dat or rom).";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "memstats" }; Flags = new List<string>() { "memstats" };
Description = "Prints memory stats."; Description = "Prints memory stats.";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Print memory stats."; LongDescription = "Print memory stats.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -2,7 +2,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -16,7 +16,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "merge" }; Flags = new List<string>() { "merge" };
Description = "Merges depot"; Description = "Merges depot";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Merges specified depot into current depot."; LongDescription = "Merges specified depot into current depot.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -2,8 +2,8 @@
using System.IO; using System.IO;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace RombaSharp.Features namespace RombaSharp.Features
@@ -18,7 +18,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "miss" }; Flags = new List<string>() { "miss" };
Description = "Create miss and have file"; Description = "Create miss and have file";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "For each specified DAT file, create miss and have file"; LongDescription = "For each specified DAT file, create miss and have file";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "progress" }; Flags = new List<string>() { "progress" };
Description = "Shows progress of the currently running command."; Description = "Shows progress of the currently running command.";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Shows progress of the currently running command."; LongDescription = "Shows progress of the currently running command.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "purge-backup" }; Flags = new List<string>() { "purge-backup" };
Description = "Moves DAT index entries for orphaned DATs."; 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 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. longer associated with any current DATs to the specified backup folder.
The files will be placed in the backup location using The files will be placed in the backup location using

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -14,7 +14,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "purge-delete" }; Flags = new List<string>() { "purge-delete" };
Description = "Deletes DAT index entries for orphaned DATs"; 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 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. longer associated with any current DATs to the specified backup folder.
The files will be placed in the backup location using The files will be placed in the backup location using

View File

@@ -2,6 +2,7 @@
using System.IO; using System.IO;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
@@ -18,18 +19,18 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "refresh-dats" }; Flags = new List<string>() { "refresh-dats" };
Description = "Refreshes the DAT index from the files in the DAT master directory tree."; 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. 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 Detects any changes in the DAT master directory tree and updates the DAT index
accordingly, marking deleted or overwritten dats as orphaned and updating accordingly, marking deleted or overwritten dats as orphaned and updating
contents of any changed dats."; contents of any changed dats.";
Features = new Dictionary<string, SabreTools.Library.Help.Feature>(); Features = new Dictionary<string, SabreTools.Help.Feature>();
AddFeature(WorkersInt32Input); AddFeature(WorkersInt32Input);
AddFeature(MissingSha1sStringInput); AddFeature(MissingSha1sStringInput);
} }
public override void ProcessFeatures(Dictionary<string, SabreTools.Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, SabreTools.Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
@@ -17,12 +18,12 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "depot-rescan" }; Flags = new List<string>() { "depot-rescan" };
Description = "Rescan a specific depot to get new information"; 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"; LongDescription = "Rescan a specific depot to get new information";
Features = new Dictionary<string, SabreTools.Library.Help.Feature>(); Features = new Dictionary<string, SabreTools.Help.Feature>();
} }
public override void ProcessFeatures(Dictionary<string, SabreTools.Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, SabreTools.Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);
logger.Error("This feature is not yet implemented: rescan-depots"); logger.Error("This feature is not yet implemented: rescan-depots");

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "--script" }; Flags = new List<string>() { "--script" };
Description = "Enable script mode (no clear screen)"; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -13,7 +13,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "shutdown" }; Flags = new List<string>() { "shutdown" };
Description = "Gracefully shuts down server."; Description = "Gracefully shuts down server.";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Gracefully shuts down server saving all the cached data."; LongDescription = "Gracefully shuts down server saving all the cached data.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Library.Help; using SabreTools.Help;
namespace RombaSharp.Features namespace RombaSharp.Features
{ {
@@ -14,7 +14,7 @@ namespace RombaSharp.Features
Name = Value; Name = Value;
Flags = new List<string>() { "version" }; Flags = new List<string>() { "version" };
Description = "Prints version"; Description = "Prints version";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Prints version."; LongDescription = "Prints version.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using RombaSharp.Features; using RombaSharp.Features;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.Logging; using SabreTools.Library.Logging;
namespace RombaSharp namespace RombaSharp

View File

@@ -17,6 +17,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SabreTools.Help\SabreTools.Help.csproj" />
<ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" /> <ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -1,9 +1,9 @@
namespace SabreTools.Library.Help namespace SabreTools.Help
{ {
/// <summary> /// <summary>
/// Determines the feature type to check for /// Determines the parameter type to check for
/// </summary> /// </summary>
public enum FeatureType public enum ParameterType
{ {
Flag = 0, Flag = 0,
String, String,

View File

@@ -2,13 +2,13 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace SabreTools.Library.Help namespace SabreTools.Help
{ {
public class Feature public class Feature
{ {
#region Protected instance variables #region Protected instance variables
protected FeatureType _featureType; protected ParameterType _featureType;
protected bool _foundOnce = false; protected bool _foundOnce = false;
protected object _value = null; protected object _value = null;
@@ -32,11 +32,11 @@ namespace SabreTools.Library.Help
this.Flags = new List<string>(); this.Flags = new List<string>();
this.Description = null; this.Description = null;
this.LongDescription = null; this.LongDescription = null;
this._featureType = FeatureType.Flag; this._featureType = ParameterType.Flag;
this.Features = new Dictionary<string, Feature>(); this.Features = new Dictionary<string, Feature>();
} }
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.Name = name;
this.Flags = new List<string> this.Flags = new List<string>
@@ -49,7 +49,7 @@ namespace SabreTools.Library.Help
this.Features = new Dictionary<string, Feature>(); this.Features = new Dictionary<string, Feature>();
} }
public Feature(string name, List<string> flags, string description, FeatureType featureType, string longDescription = null) public Feature(string name, List<string> flags, string description, ParameterType featureType, string longDescription = null)
{ {
this.Name = name; this.Name = name;
this.Flags = flags; this.Flags = flags;
@@ -172,16 +172,16 @@ namespace SabreTools.Library.Help
this.Flags.CopyTo(newflags); this.Flags.CopyTo(newflags);
switch (_featureType) switch (_featureType)
{ {
case FeatureType.Int32: case ParameterType.Int32:
case FeatureType.Int64: case ParameterType.Int64:
case FeatureType.List: case ParameterType.List:
case FeatureType.String: case ParameterType.String:
for (int i = 0; i < newflags.Length; i++) for (int i = 0; i < newflags.Length; i++)
{ {
newflags[i] += "="; newflags[i] += "=";
} }
break; break;
case FeatureType.Flag: case ParameterType.Flag:
default: default:
// No-op // No-op
break; break;
@@ -310,16 +310,16 @@ namespace SabreTools.Library.Help
this.Flags.CopyTo(newflags); this.Flags.CopyTo(newflags);
switch (_featureType) switch (_featureType)
{ {
case FeatureType.Int32: case ParameterType.Int32:
case FeatureType.Int64: case ParameterType.Int64:
case FeatureType.List: case ParameterType.List:
case FeatureType.String: case ParameterType.String:
for (int i = 0; i < newflags.Length; i++) for (int i = 0; i < newflags.Length; i++)
{ {
newflags[i] += "="; newflags[i] += "=";
} }
break; break;
case FeatureType.Flag: case ParameterType.Flag:
default: default:
// No-op // No-op
break; break;
@@ -427,7 +427,7 @@ namespace SabreTools.Library.Help
switch (_featureType) switch (_featureType)
{ {
// If we have a flag, make sure it doesn't have an equal sign in it // 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); valid = !input.Contains("=") && this.Flags.Contains(input);
if (valid) if (valid)
{ {
@@ -443,7 +443,7 @@ namespace SabreTools.Library.Help
break; break;
// If we have an Int32, try to parse it if at all possible // 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]); valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]);
if (valid) if (valid)
{ {
@@ -462,7 +462,7 @@ namespace SabreTools.Library.Help
break; break;
// If we have an Int32, try to parse it if at all possible // 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]); valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]);
if (valid) if (valid)
{ {
@@ -481,7 +481,7 @@ namespace SabreTools.Library.Help
break; break;
// If we have an input, make sure it has an equals sign in it // 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]); valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]);
if (valid) if (valid)
{ {
@@ -493,7 +493,7 @@ namespace SabreTools.Library.Help
break; break;
case FeatureType.String: case ParameterType.String:
valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]); valid = input.Contains("=") && this.Flags.Contains(input.Split('=')[0]);
if (valid) if (valid)
{ {
@@ -521,7 +521,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public bool GetBoolValue() public bool GetBoolValue()
{ {
if (_featureType != FeatureType.Flag) if (_featureType != ParameterType.Flag)
throw new ArgumentException("Feature is not a flag"); throw new ArgumentException("Feature is not a flag");
return (_value as bool?) ?? false; return (_value as bool?) ?? false;
@@ -532,7 +532,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public string GetStringValue() public string GetStringValue()
{ {
if (_featureType != FeatureType.String) if (_featureType != ParameterType.String)
throw new ArgumentException("Feature is not a string"); throw new ArgumentException("Feature is not a string");
return (_value as string); return (_value as string);
@@ -543,7 +543,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public int GetInt32Value() public int GetInt32Value()
{ {
if (_featureType != FeatureType.Int32) if (_featureType != ParameterType.Int32)
throw new ArgumentException("Feature is not an int"); throw new ArgumentException("Feature is not an int");
return (_value as int?) ?? int.MinValue; return (_value as int?) ?? int.MinValue;
@@ -554,7 +554,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public long GetInt64Value() public long GetInt64Value()
{ {
if (_featureType != FeatureType.Int64) if (_featureType != ParameterType.Int64)
throw new ArgumentException("Feature is not a long"); throw new ArgumentException("Feature is not a long");
return (_value as long?) ?? long.MinValue; return (_value as long?) ?? long.MinValue;
@@ -565,7 +565,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public List<string> GetListValue() public List<string> GetListValue()
{ {
if (_featureType != FeatureType.List) if (_featureType != ParameterType.List)
throw new ArgumentException("Feature is not a list"); throw new ArgumentException("Feature is not a list");
return (_value as List<string>) ?? new List<string>(); return (_value as List<string>) ?? new List<string>();
@@ -580,15 +580,15 @@ namespace SabreTools.Library.Help
#if NET_FRAMEWORK #if NET_FRAMEWORK
switch (_featureType) switch (_featureType)
{ {
case FeatureType.Flag: case ParameterType.Flag:
return (_value as bool?) == true; return (_value as bool?) == true;
case FeatureType.String: case ParameterType.String:
return (_value as string) != null; return (_value as string) != null;
case FeatureType.Int32: case ParameterType.Int32:
return (_value as int?).HasValue && (_value as int?).Value != int.MinValue; 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; return (_value as long?).HasValue && (_value as long?).Value != long.MinValue;
case FeatureType.List: case ParameterType.List:
return (_value as List<string>) != null; return (_value as List<string>) != null;
default: default:
return false; return false;
@@ -596,11 +596,11 @@ namespace SabreTools.Library.Help
#else #else
return _featureType switch return _featureType switch
{ {
FeatureType.Flag => (_value as bool?) == true, ParameterType.Flag => (_value as bool?) == true,
FeatureType.String => (_value as string) != null, ParameterType.String => (_value as string) != null,
FeatureType.Int32 => (_value as int?).HasValue && (_value as int?).Value != int.MinValue, ParameterType.Int32 => (_value as int?).HasValue && (_value as int?).Value != int.MinValue,
FeatureType.Int64 => (_value as long?).HasValue && (_value as long?).Value != long.MinValue, ParameterType.Int64 => (_value as long?).HasValue && (_value as long?).Value != long.MinValue,
FeatureType.List => (_value as List<string>) != null, ParameterType.List => (_value as List<string>) != null,
_ => false, _ => false,
}; };
#endif #endif

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace SabreTools.Library.Help namespace SabreTools.Help
{ {
public class Help public class Help
{ {

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net48;netcoreapp3.1;net5.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x64;win7-x86</RuntimeIdentifiers>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net48'">
<DefineConstants>NET_FRAMEWORK</DefineConstants>
</PropertyGroup>
</Project>

View File

@@ -2,9 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Library.Logging; namespace SabreTools.Help
namespace SabreTools.Library.Help
{ {
/// <summary> /// <summary>
/// Represents an actionable top-level feature /// Represents an actionable top-level feature
@@ -25,7 +23,8 @@ namespace SabreTools.Library.Help
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private readonly Logger logger; // TODO: Re-enable all logging once Logging namespace separated out
//private readonly Logger logger;
#endregion #endregion
@@ -36,7 +35,7 @@ namespace SabreTools.Library.Help
/// </summary> /// </summary>
public TopLevel() public TopLevel()
{ {
logger = new Logger(this); //logger = new Logger(this);
} }
#endregion #endregion
@@ -68,9 +67,9 @@ namespace SabreTools.Library.Help
// Everything else isn't a file // Everything else isn't a file
else else
{ {
logger.Error($"Invalid input detected: {args[i]}"); //logger.Error($"Invalid input detected: {args[i]}");
help.OutputIndividualFeature(this.Name); help.OutputIndividualFeature(this.Name);
LoggerImpl.Close(); //LoggerImpl.Close();
return false; return false;
} }
} }

View File

@@ -35,4 +35,8 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Help\" />
</ItemGroup>
</Project> </Project>

View File

@@ -40,7 +40,8 @@ namespace SabreTools.Library.Skippers
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
//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 #endregion

View File

@@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools.Data", "SabreToo
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Skippers", "SabreTools.Skippers\SabreTools.Skippers.csproj", "{D8665F27-75E6-4E3F-9F0A-286433831C69}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Skippers", "SabreTools.Skippers\SabreTools.Skippers.csproj", "{D8665F27-75E6-4E3F-9F0A-286433831C69}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Help", "SabreTools.Help\SabreTools.Help.csproj", "{55364167-844F-4B58-8280-F5327FA3D8E7}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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|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.ActiveCfg = Release|Any CPU
{D8665F27-75E6-4E3F-9F0A-286433831C69}.Release|x64.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.Filtering; using SabreTools.Library.Filtering;
@@ -21,7 +22,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-bt", "--batch" }; Flags = new List<string>() { "-bt", "--batch" };
Description = "Enable batch mode"; 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. 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: The following commands are currently implemented:
@@ -41,10 +42,10 @@ Add new output format(s): format(datformat, ...);
Set the output directory: output(outdir); Set the output directory: output(outdir);
Write the internal items: write([overwrite = true]); Write the internal items: write([overwrite = true]);
Reset the internal state: reset();"; Reset the internal state: reset();";
Features = new Dictionary<string, Library.Help.Feature>(); Features = new Dictionary<string, Help.Feature>();
} }
public override void ProcessFeatures(Dictionary<string, Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
@@ -16,9 +17,9 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-d", "--d2d", "--dfd" }; Flags = new List<string>() { "-d", "--d2d", "--dfd" };
Description = "Create DAT(s) from an input directory"; 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."; 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<string, Library.Help.Feature>(); Features = new Dictionary<string, Help.Feature>();
// Hash Features // Hash Features
AddFeature(SkipMd5Flag); AddFeature(SkipMd5Flag);
@@ -52,7 +53,7 @@ namespace SabreTools.Features
AddFeature(ThreadsInt32Input); AddFeature(ThreadsInt32Input);
} }
public override void ProcessFeatures(Dictionary<string, Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace SabreTools.Features namespace SabreTools.Features
{ {
@@ -13,12 +13,12 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-?", "-h", "--help" }; Flags = new List<string>() { "-?", "-h", "--help" };
Description = "Show this help"; Description = "Show this help";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Built-in to most of the programs is a basic help text."; LongDescription = "Built-in to most of the programs is a basic help text.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }
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 we had something else after help
if (args.Length > 1) if (args.Length > 1)

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace SabreTools.Features namespace SabreTools.Features
{ {
@@ -13,12 +13,12 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-??", "-hd", "--help-detailed" }; Flags = new List<string>() { "-??", "-hd", "--help-detailed" };
Description = "Show this detailed help"; Description = "Show this detailed help";
_featureType = FeatureType.Flag; _featureType = ParameterType.Flag;
LongDescription = "Display a detailed help text to the screen."; LongDescription = "Display a detailed help text to the screen.";
Features = new Dictionary<string, Feature>(); Features = new Dictionary<string, Feature>();
} }
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 we had something else after help
if (args.Length > 1) if (args.Length > 1)

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Tools;
namespace SabreTools.Features namespace SabreTools.Features
{ {
@@ -15,7 +14,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-ex", "--extract" }; Flags = new List<string>() { "-ex", "--extract" };
Description = "Extract and remove copier headers"; 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. 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: The following systems have headers that this program can work with:

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
namespace SabreTools.Features namespace SabreTools.Features
@@ -14,7 +14,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-re", "--restore" }; Flags = new List<string>() { "-re", "--restore" };
Description = "Restore header to file based on SHA-1"; 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. 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: The following systems have headers that this program can work with:

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Library.Help; using SabreTools.Help;
namespace SabreTools.Features namespace SabreTools.Features
{ {
@@ -13,7 +13,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "--script" }; Flags = new List<string>() { "--script" };
Description = "Enable script mode (no clear screen)"; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();
} }

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.FileTypes; using SabreTools.Library.FileTypes;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
@@ -18,7 +18,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-ss", "--sort" }; Flags = new List<string>() { "-ss", "--sort" };
Description = "Sort inputs by a set of DATs"; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -2,6 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.IO; using SabreTools.Library.IO;
@@ -18,9 +19,9 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-sp", "--split" }; Flags = new List<string>() { "-sp", "--split" };
Description = "Split input DATs by a given criteria"; 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."; 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<string, Library.Help.Feature>(); Features = new Dictionary<string, Help.Feature>();
AddFeature(OutputTypeListInput); AddFeature(OutputTypeListInput);
this[OutputTypeListInput].AddFeature(DeprecatedFlag); this[OutputTypeListInput].AddFeature(DeprecatedFlag);
@@ -38,7 +39,7 @@ namespace SabreTools.Features
AddFeature(TypeFlag); AddFeature(TypeFlag);
} }
public override void ProcessFeatures(Dictionary<string, Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);
SplittingMode splittingMode = GetSplittingMode(features); SplittingMode splittingMode = GetSplittingMode(features);

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
namespace SabreTools.Features namespace SabreTools.Features
{ {
@@ -15,7 +15,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-st", "--stats" }; Flags = new List<string>() { "-st", "--stats" };
Description = "Get statistics on all input DATs"; 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. LongDescription = @"This will output by default the combined statistics for all input DAT files.
The stats that are outputted are as follows: The stats that are outputted are as follows:

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.IO; using SabreTools.Library.IO;
@@ -20,9 +21,9 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-ud", "--update" }; Flags = new List<string>() { "-ud", "--update" };
Description = "Update and manipulate DAT(s)"; 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."; 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<string, Library.Help.Feature>(); Features = new Dictionary<string, Help.Feature>();
// Output Formats // Output Formats
AddFeature(OutputTypeListInput); AddFeature(OutputTypeListInput);
@@ -97,7 +98,7 @@ namespace SabreTools.Features
AddFeature(ThreadsInt32Input); AddFeature(ThreadsInt32Input);
} }
public override void ProcessFeatures(Dictionary<string, Library.Help.Feature> features) public override void ProcessFeatures(Dictionary<string, Help.Feature> features)
{ {
base.ProcessFeatures(features); base.ProcessFeatures(features);

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using SabreTools.Help;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.Help;
using SabreTools.Library.IO; using SabreTools.Library.IO;
using SabreTools.Library.Tools; using SabreTools.Library.Tools;
@@ -16,7 +16,7 @@ namespace SabreTools.Features
Name = Value; Name = Value;
Flags = new List<string>() { "-ve", "--verify" }; Flags = new List<string>() { "-ve", "--verify" };
Description = "Verify a folder against DATs"; 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."; 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<string, Feature>(); Features = new Dictionary<string, Feature>();

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using SabreTools.Features; using SabreTools.Features;
using SabreTools.Data; using SabreTools.Data;
using SabreTools.Library.Help; using SabreTools.Help;
using SabreTools.Library.Logging; using SabreTools.Library.Logging;
namespace SabreTools namespace SabreTools
@@ -15,7 +15,7 @@ namespace SabreTools
/// <summary> /// <summary>
/// Help object that determines available functionality /// Help object that determines available functionality
/// </summary> /// </summary>
private static Help _help; private static Help.Help _help;
/// <summary> /// <summary>
/// Logging object /// Logging object
@@ -149,7 +149,7 @@ namespace SabreTools
/// Generate a Help object for this program /// Generate a Help object for this program
/// </summary> /// </summary>
/// <returns>Populated Help object</returns> /// <returns>Populated Help object</returns>
private static Help RetrieveHelp() private static Help.Help RetrieveHelp()
{ {
// Create and add the header to the Help object // Create and add the header to the Help object
string barrier = "-----------------------------------------"; string barrier = "-----------------------------------------";
@@ -162,7 +162,7 @@ namespace SabreTools
}; };
// Create the base help object with header // Create the base help object with header
Help help = new Help(helpHeader); Help.Help help = new Help.Help(helpHeader);
// Add all of the features // Add all of the features
help.Add(new DisplayHelp()); help.Add(new DisplayHelp());

View File

@@ -13,6 +13,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SabreTools.Help\SabreTools.Help.csproj" />
<ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" /> <ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" />
</ItemGroup> </ItemGroup>