Miscellaneous cleanup

Updated Help to include new commandline params, clean up naming across classes, further updates to help future merging
This commit is contained in:
Matt Nadareski
2016-04-20 21:17:23 -07:00
parent 176ec97b23
commit 7e818df8a8
5 changed files with 130 additions and 42 deletions

View File

@@ -89,7 +89,7 @@ Options:
url= URL (source only)
-cm, --convert-miss
-r, --roms Output roms to miss instead of sets
-gp, --game-prefix Add game name as a prefix to each item
-gp, --game-prefix Add game name as a prefix to each item
-pre=, --prefix= Set prefix to be printed in front of all lines
-post=, --postfix= Set postfix to be printed behind all lines
-q, --quotes Put double-quotes around each item
@@ -165,7 +165,15 @@ Options:
-h, -?, --help Show this help dialog
-l, --log Enable log to file
-di, --diff Switch to diffdat mode
-dd, --dedup Enable deduping in the created DAT");
-dd, --dedup Enable deduping in the created DAT
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-o, --old Output DAT in RV format instead of XML
-n=, --name= Set the name of the DAT
-d=, --desc= Set the description of the DAT
-c=, --cat= Set the category of the DAT
-v=, --version= Set the version of the DAT
-a=, --author= Set the author of the DAT");
break;
default:
Console.Write("This is the default help output");

View File

@@ -17,13 +17,13 @@ namespace SabreTools.Helper
/// <param name="date">Usually the DAT creation date</param>
/// <param name="category">Category of the DAT</param>
/// <param name="author">DAT author</param>
/// <param name="forceunzip">Force all sets to be unzipped</param>
/// <param name="forceunpack">Force all sets to be unzipped</param>
/// <param name="old">Set output mode to old-style DAT</param>
/// <param name="outDir">Set the output directory</param>
/// <param name="roms">List of RomData objects representing the games to be written out</param>
/// <param name="logger">Logger object for console and/or file output</param>
/// <returns>Tru if the DAT was written correctly, false otherwise</returns>
public static bool WriteToDat(string name, string description, string version, string date, string category, string author, bool forceunzip, bool old, string outDir, List<RomData> roms, Logger logger)
public static bool WriteToDat(string name, string description, string version, string date, string category, string author, bool forceunpack, bool old, string outDir, List<RomData> roms, Logger logger)
{
// If it's empty, use the current folder
if (outDir.Trim() == "")
@@ -51,7 +51,7 @@ namespace SabreTools.Helper
"\tversion \"" + HttpUtility.HtmlEncode(version) + "\"\n" +
"\tcomment \"\"\n" +
"\tauthor \"" + HttpUtility.HtmlEncode(author) + "\"\n" +
(forceunzip ? "\tforcezipping no\n" : "") +
(forceunpack ? "\tforcezipping no\n" : "") +
")\n";
string header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -64,7 +64,7 @@ namespace SabreTools.Helper
"\t\t\t<version>" + HttpUtility.HtmlEncode(version) + "</version>\n" +
"\t\t\t<date>" + HttpUtility.HtmlEncode(date) + "</date>\n" +
"\t\t\t<author>" + HttpUtility.HtmlEncode(author) + "</author>\n" +
(forceunzip ? "\t\t\t<clrmamepro forcepacking=\"unzip\" />\n" : "") +
(forceunpack ? "\t\t\t<clrmamepro forcepacking=\"unzip\" />\n" : "") +
"\t\t</header>\n";
// Write the header out