[ALL] Rename OutputFormat => DatFormat

This commit is contained in:
Matt Nadareski
2016-10-25 15:02:02 -07:00
parent b85d2df0ca
commit 521b2c77a8
9 changed files with 286 additions and 280 deletions

View File

@@ -254,7 +254,7 @@ namespace SabreTools
FileName = Path.GetFileName(inputs[0]) + " Dir2Dat", FileName = Path.GetFileName(inputs[0]) + " Dir2Dat",
Name = Path.GetFileName(inputs[0]) + " Dir2Dat", Name = Path.GetFileName(inputs[0]) + " Dir2Dat",
Description = Path.GetFileName(inputs[0]) + " Dir2Dat", Description = Path.GetFileName(inputs[0]) + " Dir2Dat",
OutputFormat = OutputFormat.Logiqx, DatFormat = DatFormat.Logiqx,
Files = new SortedDictionary<string, List<DatItem>>(), Files = new SortedDictionary<string, List<DatItem>>(),
}; };

View File

@@ -353,6 +353,12 @@ namespace SabreTools.Helper.Data
helptext.Add(" -h=, --header= Set a header skipper to use, blank means all"); helptext.Add(" -h=, --header= Set a header skipper to use, blank means all");
// Additional Notes // Additional Notes
helptext.Add("");
helptext.Add("Archive scanning levels:");
helptext.Add(" 0 Hash archive and contents");
helptext.Add(" 1 Only hash contents");
helptext.Add(" 2 Only hash archive");
helptext.Add(""); helptext.Add("");
helptext.Add("Filenames and directories can't start with a reserved string"); helptext.Add("Filenames and directories can't start with a reserved string");
helptext.Add("unless prefixed by 'input='"); helptext.Add("unless prefixed by 'input='");

View File

@@ -188,7 +188,7 @@
/// <summary> /// <summary>
/// Determine which format to output Stats to /// Determine which format to output Stats to
/// </summary> /// </summary>
public enum StatOutputFormat public enum StatDatFormat
{ {
None = 0, None = 0,
HTML = 1, HTML = 1,

View File

@@ -118,7 +118,7 @@ namespace SabreTools.Helper.Data
/// Determines the DAT output format /// Determines the DAT output format
/// </summary> /// </summary>
[Flags] [Flags]
public enum OutputFormat public enum DatFormat
{ {
Logiqx = 0x0001, Logiqx = 0x0001,
ClrMamePro = 0x0002, ClrMamePro = 0x0002,

File diff suppressed because it is too large Load Diff

View File

@@ -51,9 +51,9 @@ namespace SabreTools.Helper.Tools
/// Get what type of DAT the input file is /// Get what type of DAT the input file is
/// </summary> /// </summary>
/// <param name="filename">Name of the file to be parsed</param> /// <param name="filename">Name of the file to be parsed</param>
/// <returns>The OutputFormat corresponding to the DAT</returns> /// <returns>The DatFormat corresponding to the DAT</returns>
/// <remarks>There is currently no differentiation between XML and SabreDAT here</remarks> /// <remarks>There is currently no differentiation between XML and SabreDAT here</remarks>
public static OutputFormat GetOutputFormat(string filename, Logger logger) public static DatFormat GetDatFormat(string filename, Logger logger)
{ {
// Limit the output formats based on extension // Limit the output formats based on extension
string ext = Path.GetExtension(filename).ToLowerInvariant(); string ext = Path.GetExtension(filename).ToLowerInvariant();
@@ -79,15 +79,15 @@ namespace SabreTools.Helper.Tools
// Some formats only require the extension to know // Some formats only require the extension to know
if (ext == "md5") if (ext == "md5")
{ {
return OutputFormat.RedumpMD5; return DatFormat.RedumpMD5;
} }
if (ext == "sfv") if (ext == "sfv")
{ {
return OutputFormat.RedumpSFV; return DatFormat.RedumpSFV;
} }
if (ext == "sha1") if (ext == "sha1")
{ {
return OutputFormat.RedumpSHA1; return DatFormat.RedumpSHA1;
} }
// For everything else, we need to read it // For everything else, we need to read it
@@ -104,49 +104,49 @@ namespace SabreTools.Helper.Tools
{ {
if (second.StartsWith("<!doctype datafile")) if (second.StartsWith("<!doctype datafile"))
{ {
return OutputFormat.Logiqx; return DatFormat.Logiqx;
} }
else if (second.StartsWith("<!doctype softwarelist")) else if (second.StartsWith("<!doctype softwarelist"))
{ {
return OutputFormat.SoftwareList; return DatFormat.SoftwareList;
} }
else if (second.StartsWith("<!doctype sabredat")) else if (second.StartsWith("<!doctype sabredat"))
{ {
return OutputFormat.SabreDat; return DatFormat.SabreDat;
} }
else if (second.StartsWith("<dat") && !second.StartsWith("<datafile")) else if (second.StartsWith("<dat") && !second.StartsWith("<datafile"))
{ {
return OutputFormat.OfflineList; return DatFormat.OfflineList;
} }
// Older and non-compliant DATs // Older and non-compliant DATs
else else
{ {
return OutputFormat.Logiqx; return DatFormat.Logiqx;
} }
} }
// If we have an INI-based DAT // If we have an INI-based DAT
else if (first.Contains("[") && first.Contains("]")) else if (first.Contains("[") && first.Contains("]"))
{ {
return OutputFormat.RomCenter; return DatFormat.RomCenter;
} }
// If we have a CMP-based DAT // If we have a CMP-based DAT
else if (first.Contains("clrmamepro")) else if (first.Contains("clrmamepro"))
{ {
return OutputFormat.ClrMamePro; return DatFormat.ClrMamePro;
} }
else if (first.Contains("romvault")) else if (first.Contains("romvault"))
{ {
return OutputFormat.ClrMamePro; return DatFormat.ClrMamePro;
} }
else if (first.Contains("doscenter")) else if (first.Contains("doscenter"))
{ {
return OutputFormat.DOSCenter; return DatFormat.DOSCenter;
} }
else else
{ {
return OutputFormat.ClrMamePro; return DatFormat.ClrMamePro;
} }
} }
catch (Exception) catch (Exception)

View File

@@ -25,10 +25,10 @@ namespace SabreTools.Helper.Tools
/// <param name="datdata">DAT information</param> /// <param name="datdata">DAT information</param>
/// <param name="overwrite">True if we ignore existing files (default), false otherwise</param> /// <param name="overwrite">True if we ignore existing files (default), false otherwise</param>
/// <returns>Dictionary of output formats mapped to file names</returns> /// <returns>Dictionary of output formats mapped to file names</returns>
public static Dictionary<OutputFormat, string> CreateOutfileNames(string outDir, DatFile datdata, bool overwrite = true) public static Dictionary<DatFormat, string> CreateOutfileNames(string outDir, DatFile datdata, bool overwrite = true)
{ {
// Create the output dictionary // Create the output dictionary
Dictionary<OutputFormat, string> outfileNames = new Dictionary<OutputFormat, string>(); Dictionary<DatFormat, string> outfileNames = new Dictionary<DatFormat, string>();
// Double check the outDir for the end delim // Double check the outDir for the end delim
if (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString())) if (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString()))
@@ -39,117 +39,117 @@ namespace SabreTools.Helper.Tools
// Get the extensions from the output type // Get the extensions from the output type
// ClrMamePro // ClrMamePro
if ((datdata.OutputFormat & OutputFormat.ClrMamePro) != 0) if ((datdata.DatFormat & DatFormat.ClrMamePro) != 0)
{ {
outfileNames.Add(OutputFormat.ClrMamePro, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite)); outfileNames.Add(DatFormat.ClrMamePro, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite));
}; };
// CSV // CSV
if ((datdata.OutputFormat & OutputFormat.CSV) != 0) if ((datdata.DatFormat & DatFormat.CSV) != 0)
{ {
outfileNames.Add(OutputFormat.CSV, CreateOutfileNamesHelper(outDir, ".csv", datdata, overwrite)); outfileNames.Add(DatFormat.CSV, CreateOutfileNamesHelper(outDir, ".csv", datdata, overwrite));
}; };
// DOSCenter // DOSCenter
if ((datdata.OutputFormat & OutputFormat.DOSCenter) != 0 if ((datdata.DatFormat & DatFormat.DOSCenter) != 0
&& (datdata.OutputFormat & OutputFormat.ClrMamePro) == 0 && (datdata.DatFormat & DatFormat.ClrMamePro) == 0
&& (datdata.OutputFormat & OutputFormat.RomCenter) == 0) && (datdata.DatFormat & DatFormat.RomCenter) == 0)
{ {
outfileNames.Add(OutputFormat.DOSCenter, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite)); outfileNames.Add(DatFormat.DOSCenter, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite));
}; };
if ((datdata.OutputFormat & OutputFormat.DOSCenter) != 0 if ((datdata.DatFormat & DatFormat.DOSCenter) != 0
&& ((datdata.OutputFormat & OutputFormat.ClrMamePro) != 0 && ((datdata.DatFormat & DatFormat.ClrMamePro) != 0
|| (datdata.OutputFormat & OutputFormat.RomCenter) != 0)) || (datdata.DatFormat & DatFormat.RomCenter) != 0))
{ {
outfileNames.Add(OutputFormat.DOSCenter, CreateOutfileNamesHelper(outDir, ".dc.dat", datdata, overwrite)); outfileNames.Add(DatFormat.DOSCenter, CreateOutfileNamesHelper(outDir, ".dc.dat", datdata, overwrite));
}; };
// Logiqx XML // Logiqx XML
if ((datdata.OutputFormat & OutputFormat.Logiqx) != 0) if ((datdata.DatFormat & DatFormat.Logiqx) != 0)
{ {
outfileNames.Add(OutputFormat.Logiqx, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite)); outfileNames.Add(DatFormat.Logiqx, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite));
}; };
// Missfile // Missfile
if ((datdata.OutputFormat & OutputFormat.MissFile) != 0) if ((datdata.DatFormat & DatFormat.MissFile) != 0)
{ {
outfileNames.Add(OutputFormat.MissFile, CreateOutfileNamesHelper(outDir, ".txt", datdata, overwrite)); outfileNames.Add(DatFormat.MissFile, CreateOutfileNamesHelper(outDir, ".txt", datdata, overwrite));
}; };
// OfflineList // OfflineList
if (((datdata.OutputFormat & OutputFormat.OfflineList) != 0) if (((datdata.DatFormat & DatFormat.OfflineList) != 0)
&& (datdata.OutputFormat & OutputFormat.Logiqx) == 0 && (datdata.DatFormat & DatFormat.Logiqx) == 0
&& (datdata.OutputFormat & OutputFormat.SabreDat) == 0 && (datdata.DatFormat & DatFormat.SabreDat) == 0
&& (datdata.OutputFormat & OutputFormat.SoftwareList) == 0) && (datdata.DatFormat & DatFormat.SoftwareList) == 0)
{ {
outfileNames.Add(OutputFormat.OfflineList, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite)); outfileNames.Add(DatFormat.OfflineList, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite));
} }
if (((datdata.OutputFormat & OutputFormat.OfflineList) != 0 if (((datdata.DatFormat & DatFormat.OfflineList) != 0
&& ((datdata.OutputFormat & OutputFormat.Logiqx) != 0 && ((datdata.DatFormat & DatFormat.Logiqx) != 0
|| (datdata.OutputFormat & OutputFormat.SabreDat) != 0 || (datdata.DatFormat & DatFormat.SabreDat) != 0
|| (datdata.OutputFormat & OutputFormat.SoftwareList) != 0))) || (datdata.DatFormat & DatFormat.SoftwareList) != 0)))
{ {
outfileNames.Add(OutputFormat.OfflineList, CreateOutfileNamesHelper(outDir, ".ol.xml", datdata, overwrite)); outfileNames.Add(DatFormat.OfflineList, CreateOutfileNamesHelper(outDir, ".ol.xml", datdata, overwrite));
} }
// Redump MD5 // Redump MD5
if ((datdata.OutputFormat & OutputFormat.RedumpMD5) != 0) if ((datdata.DatFormat & DatFormat.RedumpMD5) != 0)
{ {
outfileNames.Add(OutputFormat.RedumpMD5, CreateOutfileNamesHelper(outDir, ".md5", datdata, overwrite)); outfileNames.Add(DatFormat.RedumpMD5, CreateOutfileNamesHelper(outDir, ".md5", datdata, overwrite));
}; };
// Redump SFV // Redump SFV
if ((datdata.OutputFormat & OutputFormat.RedumpSFV) != 0) if ((datdata.DatFormat & DatFormat.RedumpSFV) != 0)
{ {
outfileNames.Add(OutputFormat.RedumpSFV, CreateOutfileNamesHelper(outDir, ".sfv", datdata, overwrite)); outfileNames.Add(DatFormat.RedumpSFV, CreateOutfileNamesHelper(outDir, ".sfv", datdata, overwrite));
}; };
// Redump SHA-1 // Redump SHA-1
if ((datdata.OutputFormat & OutputFormat.RedumpSHA1) != 0) if ((datdata.DatFormat & DatFormat.RedumpSHA1) != 0)
{ {
outfileNames.Add(OutputFormat.RedumpSHA1, CreateOutfileNamesHelper(outDir, ".sha1", datdata, overwrite)); outfileNames.Add(DatFormat.RedumpSHA1, CreateOutfileNamesHelper(outDir, ".sha1", datdata, overwrite));
}; };
// RomCenter // RomCenter
if ((datdata.OutputFormat & OutputFormat.RomCenter) != 0 if ((datdata.DatFormat & DatFormat.RomCenter) != 0
&& (datdata.OutputFormat & OutputFormat.ClrMamePro) == 0) && (datdata.DatFormat & DatFormat.ClrMamePro) == 0)
{ {
outfileNames.Add(OutputFormat.RomCenter, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite)); outfileNames.Add(DatFormat.RomCenter, CreateOutfileNamesHelper(outDir, ".dat", datdata, overwrite));
}; };
if ((datdata.OutputFormat & OutputFormat.RomCenter) != 0 if ((datdata.DatFormat & DatFormat.RomCenter) != 0
&& (datdata.OutputFormat & OutputFormat.ClrMamePro) != 0) && (datdata.DatFormat & DatFormat.ClrMamePro) != 0)
{ {
outfileNames.Add(OutputFormat.RomCenter, CreateOutfileNamesHelper(outDir, ".rc.dat", datdata, overwrite)); outfileNames.Add(DatFormat.RomCenter, CreateOutfileNamesHelper(outDir, ".rc.dat", datdata, overwrite));
}; };
// SabreDAT // SabreDAT
if ((datdata.OutputFormat & OutputFormat.SabreDat) != 0 && (datdata.OutputFormat & OutputFormat.Logiqx) == 0) if ((datdata.DatFormat & DatFormat.SabreDat) != 0 && (datdata.DatFormat & DatFormat.Logiqx) == 0)
{ {
outfileNames.Add(OutputFormat.SabreDat, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite)); outfileNames.Add(DatFormat.SabreDat, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite));
}; };
if ((datdata.OutputFormat & OutputFormat.SabreDat) != 0 && (datdata.OutputFormat & OutputFormat.Logiqx) != 0) if ((datdata.DatFormat & DatFormat.SabreDat) != 0 && (datdata.DatFormat & DatFormat.Logiqx) != 0)
{ {
outfileNames.Add(OutputFormat.SabreDat, CreateOutfileNamesHelper(outDir, ".sd.xml", datdata, overwrite)); outfileNames.Add(DatFormat.SabreDat, CreateOutfileNamesHelper(outDir, ".sd.xml", datdata, overwrite));
}; };
// Software List // Software List
if ((datdata.OutputFormat & OutputFormat.SoftwareList) != 0 if ((datdata.DatFormat & DatFormat.SoftwareList) != 0
&& (datdata.OutputFormat & OutputFormat.Logiqx) == 0 && (datdata.DatFormat & DatFormat.Logiqx) == 0
&& (datdata.OutputFormat & OutputFormat.SabreDat) == 0) && (datdata.DatFormat & DatFormat.SabreDat) == 0)
{ {
outfileNames.Add(OutputFormat.SoftwareList, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite)); outfileNames.Add(DatFormat.SoftwareList, CreateOutfileNamesHelper(outDir, ".xml", datdata, overwrite));
} }
if ((datdata.OutputFormat & OutputFormat.SoftwareList) != 0 if ((datdata.DatFormat & DatFormat.SoftwareList) != 0
&& ((datdata.OutputFormat & OutputFormat.Logiqx) != 0 && ((datdata.DatFormat & DatFormat.Logiqx) != 0
|| (datdata.OutputFormat & OutputFormat.SabreDat) != 0)) || (datdata.DatFormat & DatFormat.SabreDat) != 0))
{ {
outfileNames.Add(OutputFormat.SoftwareList, CreateOutfileNamesHelper(outDir, ".sl.xml", datdata, overwrite)); outfileNames.Add(DatFormat.SoftwareList, CreateOutfileNamesHelper(outDir, ".sl.xml", datdata, overwrite));
} }
// TSV // TSV
if ((datdata.OutputFormat & OutputFormat.TSV) != 0) if ((datdata.DatFormat & DatFormat.TSV) != 0)
{ {
outfileNames.Add(OutputFormat.TSV, CreateOutfileNamesHelper(outDir, ".tsv", datdata, overwrite)); outfileNames.Add(DatFormat.TSV, CreateOutfileNamesHelper(outDir, ".tsv", datdata, overwrite));
}; };
return outfileNames; return outfileNames;

View File

@@ -79,7 +79,7 @@ namespace SabreTools
/// <param name="author">New author</param> /// <param name="author">New author</param>
/// <param name="forcepack">String representing the forcepacking flag</param> /// <param name="forcepack">String representing the forcepacking flag</param>
/// <param name="excludeOf">True if cloneof, romof, and sampleof fields should be omitted from output, false otherwise</param> /// <param name="excludeOf">True if cloneof, romof, and sampleof fields should be omitted from output, false otherwise</param>
/// <param name="outputFormat">OutputFormat to be used for outputting the DAT</param> /// <param name="datFormat">DatFormat to be used for outputting the DAT</param>
/// <param name="romba">True to enable reading a directory like a Romba depot, false otherwise</param> /// <param name="romba">True to enable reading a directory like a Romba depot, false otherwise</param>
/// <param name="superdat">True to enable SuperDAT-style reading, false otherwise</param> /// <param name="superdat">True to enable SuperDAT-style reading, false otherwise</param>
/// <param name="noMD5">True to disable getting MD5 hash, false otherwise</param> /// <param name="noMD5">True to disable getting MD5 hash, false otherwise</param>
@@ -103,7 +103,7 @@ namespace SabreTools
string author, string author,
string forcepack, string forcepack,
bool excludeOf, bool excludeOf,
OutputFormat outputFormat, DatFormat datFormat,
bool romba, bool romba,
bool superdat, bool superdat,
bool noMD5, bool noMD5,
@@ -145,7 +145,7 @@ namespace SabreTools
Date = DateTime.Now.ToString("yyyy-MM-dd"), Date = DateTime.Now.ToString("yyyy-MM-dd"),
Author = author, Author = author,
ForcePacking = fp, ForcePacking = fp,
OutputFormat = (outputFormat == 0 ? OutputFormat.Logiqx : outputFormat), DatFormat = (datFormat == 0 ? DatFormat.Logiqx : datFormat),
Romba = romba, Romba = romba,
ExcludeOf = excludeOf, ExcludeOf = excludeOf,
Type = (superdat ? "SuperDAT" : ""), Type = (superdat ? "SuperDAT" : ""),
@@ -348,10 +348,10 @@ namespace SabreTools
/// <param name="single">True to show individual DAT statistics, false otherwise</param> /// <param name="single">True to show individual DAT statistics, false otherwise</param>
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param> /// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param> /// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
/// <param name="statOutputFormat">Set the statistics output format to use</param> /// <param name="statDatFormat">Set the statistics output format to use</param>
private static void InitStats(List<string> inputs, string filename, bool single, bool baddumpCol, bool nodumpCol, StatOutputFormat statOutputFormat) private static void InitStats(List<string> inputs, string filename, bool single, bool baddumpCol, bool nodumpCol, StatDatFormat statDatFormat)
{ {
DatFile.OutputStats(inputs, (String.IsNullOrEmpty(filename) ? "report" : filename), single, baddumpCol, nodumpCol, statOutputFormat, _logger); DatFile.OutputStats(inputs, (String.IsNullOrEmpty(filename) ? "report" : filename), single, baddumpCol, nodumpCol, statDatFormat, _logger);
} }
/// <summary> /// <summary>
@@ -412,7 +412,7 @@ namespace SabreTools
/// <param name="forcend">None, Obsolete, Required, Ignore</param> /// <param name="forcend">None, Obsolete, Required, Ignore</param>
/// <param name="forcepack">None, Zip, Unzip</param> /// <param name="forcepack">None, Zip, Unzip</param>
/// <param name="excludeOf">True if cloneof, romof, and sampleof fields should be omitted from output, false otherwise</param> /// <param name="excludeOf">True if cloneof, romof, and sampleof fields should be omitted from output, false otherwise</param>
/// <param name="outputFormat">Non-zero flag for output format, zero otherwise for default</param> /// <param name="datFormat">Non-zero flag for output format, zero otherwise for default</param>
/// /* Missfile-specific DAT info */ /// /* Missfile-specific DAT info */
/// <param name="usegame">True if games are to be used in output, false if roms are</param> /// <param name="usegame">True if games are to be used in output, false if roms are</param>
/// <param name="prefix">Generic prefix to be added to each line</param> /// <param name="prefix">Generic prefix to be added to each line</param>
@@ -471,7 +471,7 @@ namespace SabreTools
string forcend, string forcend,
string forcepack, string forcepack,
bool excludeOf, bool excludeOf,
OutputFormat outputFormat, DatFormat datFormat,
/* Missfile-specific DAT info */ /* Missfile-specific DAT info */
bool usegame, bool usegame,
@@ -646,7 +646,7 @@ namespace SabreTools
ForcePacking = fp, ForcePacking = fp,
MergeRoms = dedup, MergeRoms = dedup,
ExcludeOf = excludeOf, ExcludeOf = excludeOf,
OutputFormat = outputFormat, DatFormat = datFormat,
UseGame = usegame, UseGame = usegame,
Prefix = prefix, Prefix = prefix,

View File

@@ -95,8 +95,8 @@ namespace SabreTools
updateDat = false, // SimpleSort updateDat = false, // SimpleSort
usegame = true; usegame = true;
DiffMode diffMode = 0x0; DiffMode diffMode = 0x0;
OutputFormat outputFormat = 0x0; DatFormat datFormat = 0x0;
StatOutputFormat statOutputFormat = StatOutputFormat.None; StatDatFormat statDatFormat = StatDatFormat.None;
// User inputs // User inputs
int gz = 2, // SimpleSort int gz = 2, // SimpleSort
@@ -222,7 +222,7 @@ namespace SabreTools
break; break;
case "-csv": case "-csv":
case "--csv": case "--csv":
statOutputFormat = StatOutputFormat.CSV; statDatFormat = StatDatFormat.CSV;
break; break;
case "-dd": case "-dd":
case "--dedup": case "--dedup":
@@ -266,7 +266,7 @@ namespace SabreTools
break; break;
case "-html": case "-html":
case "--html": case "--html":
statOutputFormat = StatOutputFormat.HTML; statDatFormat = StatDatFormat.HTML;
break; break;
case "-ip": case "-ip":
case "--inplace": case "--inplace":
@@ -290,59 +290,59 @@ namespace SabreTools
break; break;
case "-oa": case "-oa":
case "--output-all": case "--output-all":
outputFormat |= OutputFormat.ALL; datFormat |= DatFormat.ALL;
break; break;
case "-oc": case "-oc":
case "--output-cmp": case "--output-cmp":
outputFormat |= OutputFormat.ClrMamePro; datFormat |= DatFormat.ClrMamePro;
break; break;
case "-ocsv": case "-ocsv":
case "--output-csv": case "--output-csv":
outputFormat |= OutputFormat.CSV; datFormat |= DatFormat.CSV;
break; break;
case "-od": case "-od":
case "--output-dc": case "--output-dc":
outputFormat |= OutputFormat.DOSCenter; datFormat |= DatFormat.DOSCenter;
break; break;
case "-om": case "-om":
case "--output-miss": case "--output-miss":
outputFormat |= OutputFormat.MissFile; datFormat |= DatFormat.MissFile;
break; break;
case "-omd5": case "-omd5":
case "--output-md5": case "--output-md5":
outputFormat |= OutputFormat.RedumpMD5; datFormat |= DatFormat.RedumpMD5;
break; break;
case "-ool": case "-ool":
case "--output-ol": case "--output-ol":
outputFormat |= OutputFormat.OfflineList; datFormat |= DatFormat.OfflineList;
break; break;
case "-or": case "-or":
case "--output-rc": case "--output-rc":
outputFormat |= OutputFormat.RomCenter; datFormat |= DatFormat.RomCenter;
break; break;
case "-os": case "-os":
case "--output-sd": case "--output-sd":
outputFormat |= OutputFormat.SabreDat; datFormat |= DatFormat.SabreDat;
break; break;
case "-osfv": case "-osfv":
case "--output-sfv": case "--output-sfv":
outputFormat |= OutputFormat.RedumpSFV; datFormat |= DatFormat.RedumpSFV;
break; break;
case "-osha1": case "-osha1":
case "--output-sha1": case "--output-sha1":
outputFormat |= OutputFormat.RedumpSHA1; datFormat |= DatFormat.RedumpSHA1;
break; break;
case "-osl": case "-osl":
case "--output-sl": case "--output-sl":
outputFormat |= OutputFormat.SoftwareList; datFormat |= DatFormat.SoftwareList;
break; break;
case "-otsv": case "-otsv":
case "--output-tsv": case "--output-tsv":
outputFormat |= OutputFormat.TSV; datFormat |= DatFormat.TSV;
break; break;
case "-ox": case "-ox":
case "--output-xml": case "--output-xml":
outputFormat |= OutputFormat.Logiqx; datFormat |= DatFormat.Logiqx;
break; break;
case "-q": case "-q":
case "--quotes": case "--quotes":
@@ -398,7 +398,7 @@ namespace SabreTools
break; break;
case "-tsv": case "-tsv":
case "--tsv": case "--tsv":
statOutputFormat = StatOutputFormat.TSV; statDatFormat = StatDatFormat.TSV;
break; break;
case "-ud": case "-ud":
case "--update": case "--update":
@@ -957,7 +957,7 @@ namespace SabreTools
author, author,
forcepack, forcepack,
excludeOf, excludeOf,
outputFormat, datFormat,
romba, romba,
superdat, superdat,
noMD5, noMD5,
@@ -1008,14 +1008,14 @@ namespace SabreTools
// Get statistics on input files // Get statistics on input files
else if (stats) else if (stats)
{ {
InitStats(inputs, filename, single, showBaddumpColumn, showNodumpColumn, statOutputFormat); InitStats(inputs, filename, single, showBaddumpColumn, showNodumpColumn, statDatFormat);
} }
// Convert, update, merge, diff, and filter a DAT or folder of DATs // Convert, update, merge, diff, and filter a DAT or folder of DATs
else if (update) else if (update)
{ {
InitUpdate(inputs, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header, InitUpdate(inputs, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
superdat, forcemerge, forcend, forcepack, excludeOf, outputFormat, usegame, prefix, superdat, forcemerge, forcend, forcepack, excludeOf, datFormat, usegame, prefix,
postfix, quotes, repext, addext, remext, datPrefix, romba, merge, diffMode, inplace, skip, removeDateFromAutomaticName, gamename, romname, postfix, quotes, repext, addext, remext, datPrefix, romba, merge, diffMode, inplace, skip, removeDateFromAutomaticName, gamename, romname,
romtype, sgt, slt, seq, crc, md5, sha1, status, trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism); romtype, sgt, slt, seq, crc, md5, sha1, status, trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism);
} }