mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix build from previous commits
This commit is contained in:
@@ -20,7 +20,7 @@ namespace RombaSharp.Features
|
||||
public Archive()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["archive"];
|
||||
Flags.AddRange(["archive"]);
|
||||
Description = "Adds ROM files from the specified directories to the ROM archive.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = @"Adds ROM files from the specified directories to the ROM archive.
|
||||
@@ -29,7 +29,6 @@ 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 = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -16,13 +16,12 @@ namespace RombaSharp.Features
|
||||
public Build()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["build"];
|
||||
Flags.AddRange(["build"]);
|
||||
Description = "For each specified DAT file it creates the torrentzip files.";
|
||||
_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.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,11 +10,10 @@ namespace RombaSharp.Features
|
||||
public Cancel()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["cancel"];
|
||||
Flags.AddRange(["cancel"]);
|
||||
Description = "Cancels current long-running job";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Cancels current long-running job.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -13,11 +13,10 @@ namespace RombaSharp.Features
|
||||
public DatStats()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["datstats"];
|
||||
Flags.AddRange(["datstats"]);
|
||||
Description = "Prints dat stats.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print dat stats.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
@@ -30,8 +29,8 @@ namespace RombaSharp.Features
|
||||
return false;
|
||||
|
||||
// If we have no inputs listed, we want to use datroot
|
||||
if (Inputs == null || Inputs.Count == 0)
|
||||
Inputs = new List<string> { Path.GetFullPath(_dats!) };
|
||||
if (Inputs.Count == 0)
|
||||
Inputs.Add(Path.GetFullPath(_dats!));
|
||||
|
||||
// Now output the stats for all inputs
|
||||
var statistics = Statistics.CalculateStatistics(Inputs, single: true);
|
||||
|
||||
@@ -11,11 +11,10 @@ namespace RombaSharp.Features
|
||||
public DbStats()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["dbstats"];
|
||||
Flags.AddRange(["dbstats"]);
|
||||
Description = "Prints db stats.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print db stats.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -14,12 +14,11 @@ namespace RombaSharp.Features
|
||||
public Diffdat()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["diffdat"];
|
||||
Flags.AddRange(["diffdat"]);
|
||||
Description = "Creates a DAT file with those entries that are in -new DAT.";
|
||||
_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 = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace RombaSharp.Features
|
||||
public Dir2Dat()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["dir2dat"];
|
||||
Flags.AddRange(["dir2dat"]);
|
||||
Description = "Creates a DAT file for the specified input directory and saves it to the -out filename.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Creates a DAT file for the specified input directory and saves it to the -out filename.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -9,11 +9,10 @@ namespace RombaSharp.Features
|
||||
public DisplayHelp()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["-?", "-h", "--help"];
|
||||
Flags.AddRange(["-?", "-h", "--help"]);
|
||||
Description = "Show this help";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Built-in to most of the programs is a basic help text.";
|
||||
Features = [];
|
||||
}
|
||||
|
||||
public override bool ProcessArgs(string[] args, FeatureSet help)
|
||||
|
||||
@@ -9,11 +9,10 @@ namespace RombaSharp.Features
|
||||
public DisplayHelpDetailed()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["-??", "-hd", "--help-detailed"];
|
||||
Flags.AddRange(["-??", "-hd", "--help-detailed"]);
|
||||
Description = "Show this detailed help";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Display a detailed help text to the screen.";
|
||||
Features = [];
|
||||
}
|
||||
|
||||
public override bool ProcessArgs(string[] args, FeatureSet help)
|
||||
|
||||
@@ -14,11 +14,10 @@ namespace RombaSharp.Features
|
||||
public EDiffdat()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["ediffdat"];
|
||||
Flags.AddRange(["ediffdat"]);
|
||||
Description = "Creates a DAT file with those entries that are in -new DAT.";
|
||||
_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 = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -13,11 +13,10 @@ namespace RombaSharp.Features
|
||||
public Export()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["export"];
|
||||
Flags.AddRange(["export"]);
|
||||
Description = "Exports db to export.csv";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Exports db to standardized export.csv";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,11 +10,10 @@ namespace RombaSharp.Features
|
||||
public Fixdat()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["fixdat"];
|
||||
Flags.AddRange(["fixdat"]);
|
||||
Description = "For each specified DAT file it creates a fix DAT.";
|
||||
_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 = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -15,11 +15,10 @@ namespace RombaSharp.Features
|
||||
public Import()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["import"];
|
||||
Flags.AddRange(["import"]);
|
||||
Description = "Import a database from a formatted CSV file";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Import a database from a formatted CSV file";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
@@ -33,10 +32,14 @@ namespace RombaSharp.Features
|
||||
|
||||
logger.Error("This feature is not yet implemented: import");
|
||||
|
||||
// First ensure the inputs and database connection
|
||||
Inputs = PathTool.GetFilesOnly(Inputs).Select(p => p.CurrentPath).ToList();
|
||||
SqliteConnection dbc = new SqliteConnection(_connectionString);
|
||||
SqliteCommand slc = new SqliteCommand();
|
||||
// Ensure the inputs
|
||||
var files = PathTool.GetFilesOnly(Inputs).Select(p => p.CurrentPath);
|
||||
Inputs.Clear();
|
||||
Inputs.AddRange(files);
|
||||
|
||||
// Ensure the database connection
|
||||
var dbc = new SqliteConnection(_connectionString);
|
||||
var slc = new SqliteCommand();
|
||||
dbc.Open();
|
||||
|
||||
// Now, for each of these files, attempt to add the data found inside
|
||||
|
||||
@@ -12,11 +12,10 @@ namespace RombaSharp.Features
|
||||
public Lookup()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["lookup"];
|
||||
Flags.AddRange(["lookup"]);
|
||||
Description = "For each specified hash it looks up any available information.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "For each specified hash it looks up any available information (dat or rom).";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,11 +10,10 @@ namespace RombaSharp.Features
|
||||
public Memstats()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["memstats"];
|
||||
Flags.AddRange(["memstats"]);
|
||||
Description = "Prints memory stats.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Print memory stats.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -13,11 +13,10 @@ namespace RombaSharp.Features
|
||||
public Merge()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["merge"];
|
||||
Flags.AddRange(["merge"]);
|
||||
Description = "Merges depot";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Merges specified depot into current depot.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
@@ -44,7 +43,9 @@ namespace RombaSharp.Features
|
||||
logger.Error("This feature is not yet implemented: merge");
|
||||
|
||||
// Verify that the inputs are valid directories
|
||||
Inputs = PathTool.GetDirectoriesOnly(Inputs).Select(p => p.CurrentPath).ToList();
|
||||
var dirs = PathTool.GetDirectoriesOnly(Inputs).Select(p => p.CurrentPath);
|
||||
Inputs.Clear();
|
||||
Inputs.AddRange(dirs);
|
||||
|
||||
// Loop over all input directories
|
||||
foreach (string input in Inputs)
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace RombaSharp.Features
|
||||
public Miss()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["miss"];
|
||||
Flags.AddRange(["miss"]);
|
||||
Description = "Create miss and have file";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "For each specified DAT file, create miss and have file";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,11 +10,10 @@ namespace RombaSharp.Features
|
||||
public Progress()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["progress"];
|
||||
Flags.AddRange(["progress"]);
|
||||
Description = "Shows progress of the currently running command.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Shows progress of the currently running command.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace RombaSharp.Features
|
||||
public PurgeBackup()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["purge-backup"];
|
||||
Flags.AddRange(["purge-backup"]);
|
||||
Description = "Moves DAT index entries for orphaned DATs.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = @"Deletes DAT index entries for orphaned DATs and moves ROM files that are no
|
||||
@@ -18,7 +18,6 @@ longer associated with any current DATs to the specified backup folder.
|
||||
The files will be placed in the backup location using
|
||||
a folder structure according to the original DAT master directory tree
|
||||
structure. It also deletes the specified DATs from the DAT index.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace RombaSharp.Features
|
||||
public PurgeDelete()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["purge-delete"];
|
||||
Flags.AddRange(["purge-delete"]);
|
||||
Description = "Deletes DAT index entries for orphaned DATs";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = @"Deletes DAT index entries for orphaned DATs and moves ROM files that are no
|
||||
@@ -19,7 +19,6 @@ longer associated with any current DATs to the specified backup folder.
|
||||
The files will be placed in the backup location using
|
||||
a folder structure according to the original DAT master directory tree
|
||||
structure. It also deletes the specified DATs from the DAT index.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -20,14 +20,13 @@ namespace RombaSharp.Features
|
||||
public RefreshDats()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["refresh-dats"];
|
||||
Flags.AddRange(["refresh-dats"]);
|
||||
Description = "Refreshes the DAT index from the files in the DAT master directory tree.";
|
||||
_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 = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -20,11 +20,10 @@ namespace RombaSharp.Features
|
||||
public RescanDepots()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["depot-rescan"];
|
||||
Flags.AddRange(["depot-rescan"]);
|
||||
Description = "Rescan a specific depot to get new information";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Rescan a specific depot to get new information";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -10,11 +10,10 @@ namespace RombaSharp.Features
|
||||
public Shutdown()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["shutdown"];
|
||||
Flags.AddRange(["shutdown"]);
|
||||
Description = "Gracefully shuts down server.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Gracefully shuts down server saving all the cached data.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
@@ -11,11 +11,10 @@ namespace RombaSharp.Features
|
||||
public Version()
|
||||
{
|
||||
Name = Value;
|
||||
Flags = ["version"];
|
||||
Flags.AddRange(["version"]);
|
||||
Description = "Prints version";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Prints current program version.";
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
|
||||
Reference in New Issue
Block a user