2017-02-02 15:08:21 -08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
2017-05-04 02:41:11 -07:00
|
|
|
|
using SabreTools.Library.Data;
|
|
|
|
|
|
using SabreTools.Library.Help;
|
2017-02-02 15:08:21 -08:00
|
|
|
|
|
|
|
|
|
|
namespace RombaSharp
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class RombaSharp
|
|
|
|
|
|
{
|
|
|
|
|
|
public static Help RetrieveHelp()
|
|
|
|
|
|
{
|
|
|
|
|
|
// Create and add the header to the Help object
|
|
|
|
|
|
string barrier = "-----------------------------------------";
|
2017-03-01 21:49:30 -08:00
|
|
|
|
List<string> helpHeader = new List<string>()
|
|
|
|
|
|
{
|
|
|
|
|
|
"RombaSharp - C# port of the Romba rom management tool",
|
|
|
|
|
|
barrier,
|
|
|
|
|
|
"Usage: RombaSharp [option] [filename|dirname] ...",
|
|
|
|
|
|
""
|
|
|
|
|
|
};
|
2017-02-02 15:08:21 -08:00
|
|
|
|
Help help = new Help(helpHeader);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Help feature
|
|
|
|
|
|
Feature helpFeature = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Help",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
new List<string>() { "-?", "-h", "--help" },
|
|
|
|
|
|
"Show this help",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Archive feature
|
|
|
|
|
|
Feature archive = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Archive",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"archive",
|
|
|
|
|
|
"Adds ROM files from the specified directories to depot",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
archive.AddFeature(new Feature(
|
|
|
|
|
|
"only-needed",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"-only-needed",
|
|
|
|
|
|
"Only archive ROM files in database",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null));
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Build feature
|
|
|
|
|
|
Feature build = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Build",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"build",
|
|
|
|
|
|
"For each specified DAT file it creates TZip files",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
build.AddFeature(new Feature(
|
|
|
|
|
|
"copy",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"-copy",
|
|
|
|
|
|
"Copy files instead of rebuilding",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null));
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Stats feature
|
|
|
|
|
|
Feature stats = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Stats",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"dbstats",
|
|
|
|
|
|
"Prints db stats",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Rescan Depots feature
|
|
|
|
|
|
Feature rescanDepots = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Rescan Depots",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"depot-rescan",
|
|
|
|
|
|
"Rescan a specific depot to get new information",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Diffdat feature
|
|
|
|
|
|
Feature diffdat = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Diffdat",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"diffdat",
|
|
|
|
|
|
"Creates a DAT file for entries found in the new DAT",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
diffdat.AddFeature(new Feature(
|
|
|
|
|
|
"new",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"-new",
|
|
|
|
|
|
"DAT to compare to",
|
|
|
|
|
|
FeatureType.String,
|
|
|
|
|
|
null));
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Dir2Dat feature
|
|
|
|
|
|
Feature dir2dat = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Dir2Dat",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"dir2dat",
|
|
|
|
|
|
"Creates a DAT file for the specified input directory",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
dir2dat.AddFeature(new Feature(
|
|
|
|
|
|
"out",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"-out",
|
|
|
|
|
|
"Filename to save out to",
|
|
|
|
|
|
FeatureType.String,
|
|
|
|
|
|
null));
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Export feature
|
|
|
|
|
|
Feature export = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Export",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"export",
|
|
|
|
|
|
"Exports db to export.csv",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Fixdat feature
|
|
|
|
|
|
Feature fixdat = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Fixdat",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"fixdat",
|
|
|
|
|
|
"For each specified DAT file it creates a fix DAT",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
2017-02-02 22:06:20 -08:00
|
|
|
|
// Create the Import feature
|
|
|
|
|
|
Feature import = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Import",
|
2017-02-02 22:06:20 -08:00
|
|
|
|
"import",
|
|
|
|
|
|
"Import a database from a formatted CSV file",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
2017-02-02 15:08:21 -08:00
|
|
|
|
// Create the Lookup feature
|
|
|
|
|
|
Feature lookup = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Lookup",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"lookup",
|
|
|
|
|
|
"For each specified hash, look up available information",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Mmmstats feature
|
|
|
|
|
|
Feature memstats = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Memstats",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"memstats",
|
|
|
|
|
|
"Prints memory stats",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
2017-02-02 21:57:34 -08:00
|
|
|
|
// Create the Merge feature
|
|
|
|
|
|
Feature merge = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Merge",
|
2017-02-02 21:57:34 -08:00
|
|
|
|
"merge",
|
|
|
|
|
|
"Merges a depot into the existing one",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
merge.AddFeature(new Feature(
|
|
|
|
|
|
"depot",
|
2017-02-02 21:57:34 -08:00
|
|
|
|
"-depot",
|
|
|
|
|
|
"Depot path to merge into",
|
|
|
|
|
|
FeatureType.String,
|
|
|
|
|
|
null));
|
2018-01-23 15:55:04 -08:00
|
|
|
|
merge.AddFeature(new Feature(
|
|
|
|
|
|
"only-needed",
|
2017-02-02 21:57:34 -08:00
|
|
|
|
"-only-needed",
|
|
|
|
|
|
"Only merge files in if needed",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null));
|
|
|
|
|
|
|
2017-02-02 15:08:21 -08:00
|
|
|
|
// Create the Miss feature
|
|
|
|
|
|
Feature miss = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Miss",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"miss",
|
|
|
|
|
|
"For each specified DAT file, create miss and have file",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Purge Backup feature
|
|
|
|
|
|
Feature purgeBackup = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Purge Backup",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"purge-backup",
|
|
|
|
|
|
"Moves DAT index entries for orphaned DATs",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
purgeBackup.AddFeature(new Feature(
|
|
|
|
|
|
"log-only",
|
2017-02-02 22:06:20 -08:00
|
|
|
|
"-log-only",
|
|
|
|
|
|
"Only write out actions to log",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null));
|
2017-02-02 15:08:21 -08:00
|
|
|
|
|
|
|
|
|
|
// Create the Purge Delete feature
|
|
|
|
|
|
Feature purgeDelete = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Purge Delete",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"purge-delete",
|
|
|
|
|
|
"Deletes DAT index entries for orphaned DATs",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
2018-01-23 15:55:04 -08:00
|
|
|
|
purgeDelete.AddFeature(new Feature(
|
|
|
|
|
|
"log-only",
|
2017-02-02 22:06:20 -08:00
|
|
|
|
"-log-only",
|
|
|
|
|
|
"Only write out actions to log",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null));
|
2017-02-02 15:08:21 -08:00
|
|
|
|
|
|
|
|
|
|
// Create the Refresh DATs feature
|
|
|
|
|
|
Feature refreshDats = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Refresh DATs",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"refresh-dats",
|
|
|
|
|
|
"Refreshes the DAT index from the files in the DAT root",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Progress feature
|
|
|
|
|
|
Feature progress = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Progress",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"progress",
|
|
|
|
|
|
"Shows progress of currently running command [OBSOLETE]",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Create the Shutdown feature
|
|
|
|
|
|
Feature shutdown = new Feature(
|
2018-01-23 15:55:04 -08:00
|
|
|
|
"Shutdown",
|
2017-02-02 15:08:21 -08:00
|
|
|
|
"shutdown",
|
|
|
|
|
|
"Gracefully shuts down server [OBSOLETE]",
|
|
|
|
|
|
FeatureType.Flag,
|
|
|
|
|
|
null);
|
|
|
|
|
|
|
|
|
|
|
|
// Now, add all of the main features to the Help object
|
2018-01-23 15:55:04 -08:00
|
|
|
|
help.Add(helpFeature);
|
|
|
|
|
|
help.Add(archive);
|
|
|
|
|
|
help.Add(build);
|
|
|
|
|
|
help.Add(stats);
|
|
|
|
|
|
help.Add(rescanDepots);
|
|
|
|
|
|
help.Add(diffdat);
|
|
|
|
|
|
help.Add(dir2dat);
|
|
|
|
|
|
help.Add(export);
|
|
|
|
|
|
help.Add(fixdat);
|
|
|
|
|
|
help.Add(import);
|
|
|
|
|
|
help.Add(lookup);
|
|
|
|
|
|
help.Add(memstats);
|
|
|
|
|
|
help.Add(merge);
|
|
|
|
|
|
help.Add(miss);
|
|
|
|
|
|
help.Add(purgeBackup);
|
|
|
|
|
|
help.Add(purgeDelete);
|
|
|
|
|
|
help.Add(refreshDats);
|
|
|
|
|
|
help.Add(progress);
|
|
|
|
|
|
help.Add(shutdown);
|
2017-02-02 15:08:21 -08:00
|
|
|
|
|
|
|
|
|
|
return help;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|