mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Extract out Help namespace
This commit is contained in:
@@ -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<string>() { "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<string, SabreTools.Library.Help.Feature>();
|
||||
Features = new Dictionary<string, SabreTools.Help.Feature>();
|
||||
|
||||
AddFeature(OnlyNeededFlag);
|
||||
AddFeature(ResumeStringInput);
|
||||
@@ -38,7 +39,7 @@ have a current entry in the DAT index.";
|
||||
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);
|
||||
|
||||
|
||||
@@ -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<String> 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
|
||||
/// </summary>
|
||||
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();
|
||||
EnsureDatabase(_db, _connectionString);
|
||||
|
||||
@@ -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<string>() { "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.";
|
||||
|
||||
@@ -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<string>() { "cancel" };
|
||||
Description = "Cancels current long-running job";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Cancels current long-running job.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "datstats" };
|
||||
Description = "Prints dat stats.";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print dat stats.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "dbstats" };
|
||||
Description = "Prints db stats.";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print db stats.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
|
||||
|
||||
@@ -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<string>() { "-?", "-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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "-??", "-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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
|
||||
|
||||
@@ -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<string>() { "export" };
|
||||
Description = "Exports db to export.csv";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Exports db to standardized export.csv";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
|
||||
|
||||
@@ -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<string>() { "memstats" };
|
||||
Description = "Prints memory stats.";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print memory stats.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "merge" };
|
||||
Description = "Merges depot";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Merges specified depot into current depot.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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
|
||||
|
||||
@@ -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<string>() { "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
|
||||
|
||||
@@ -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<string>() { "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<string, SabreTools.Library.Help.Feature>();
|
||||
Features = new Dictionary<string, SabreTools.Help.Feature>();
|
||||
|
||||
AddFeature(WorkersInt32Input);
|
||||
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);
|
||||
|
||||
|
||||
@@ -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<string>() { "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<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);
|
||||
logger.Error("This feature is not yet implemented: rescan-depots");
|
||||
|
||||
@@ -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<string>() { "--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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "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<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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<string>() { "version" };
|
||||
Description = "Prints version";
|
||||
_featureType = FeatureType.Flag;
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Prints version.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SabreTools.Help\SabreTools.Help.csproj" />
|
||||
<ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user