Merge DatSplit, part 5

This commit is contained in:
Matt Nadareski
2016-04-20 11:42:18 -07:00
parent 3dd26574d0
commit 361f7d7ee6
3 changed files with 15 additions and 6 deletions

View File

@@ -316,6 +316,13 @@ namespace SabreTools
} }
// Split a DAT by extension // Split a DAT by extension
else if (extsplit)
{
foreach (string input in inputs)
{
InitExtSplit(input, exta, extb, outdir);
}
}
logger.Close(); logger.Close();
return; return;
@@ -950,10 +957,10 @@ Make a selection:
/// <summary> /// <summary>
/// Wrap splitting a DAT by 2 extensions /// Wrap splitting a DAT by 2 extensions
/// </summary> /// </summary>
/// <param name="input">Input file or folder to be converted</param> /// <param name="input">Input file or folder to be split</param>
/// <param name="exta">Root directory to base path lengths on</param> /// <param name="exta">First extension to split on</param>
/// <param name="rename">True is games should not be renamed</param> /// <param name="extb">Second extension to split on</param>
/// <param name="force">True if forcepacking="unzip" should be included</param> /// <param name="outdir">Output directory for the split files</param>
private static void InitExtSplit(string input, string exta, string extb, string outdir) private static void InitExtSplit(string input, string exta, string extb, string outdir)
{ {
// Strip any quotations from the names // Strip any quotations from the names
@@ -966,7 +973,7 @@ Make a selection:
{ {
if (exta == "" || extb == "") if (exta == "" || extb == "")
{ {
logger.Warning("Two extension are needed to split a DAT!"); logger.Warning("Two extensions are needed to split a DAT!");
return; return;
} }
ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger); ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger);

View File

@@ -22,6 +22,7 @@ The main tool of the SabreTools suite. Performs the majority of the core feature
<li>Importing and Generating DAT files in RomVault and XML formats</li> <li>Importing and Generating DAT files in RomVault and XML formats</li>
<li>Converting DATs from RomVault to XML format</li> <li>Converting DATs from RomVault to XML format</li>
<li>Trim DAT entries and optionally merge into a single game (formerly <i>SingleGame</i>; requested by Kludge)</li> <li>Trim DAT entries and optionally merge into a single game (formerly <i>SingleGame</i>; requested by Kludge)</li>
<li>Split a DAT using two different file extensions within the DAT (formerly <i>DatSplit</i>)</li>
<li>Add and remove sources and systems from the database</li> <li>Add and remove sources and systems from the database</li>
<li>Retrieve a list of all sources and systems that are available</li> <li>Retrieve a list of all sources and systems that are available</li>
</ul> </ul>

View File

@@ -85,11 +85,12 @@ Options:
-es, --ext-split Split a DAT by two file extensions -es, --ext-split Split a DAT by two file extensions
exta= First extension to split by exta= First extension to split by
extb= Second extension to split by extb= Second extension to split by
out= Output directory
-g, --generate Start tool in generate mode -g, --generate Start tool in generate mode
-ga, --generate-all Start tool in generate all mode -ga, --generate-all Start tool in generate all mode
system= Comma-separated list of system IDs system= Comma-separated list of system IDs
source= Comma-separated list of source IDs source= Comma-separated list of source IDs
out= Output directoryComma-separated list out= Output directory
-nr, --no-rename Don't auto-rename games -nr, --no-rename Don't auto-rename games
-old, --romvault Produce a DAT in RV format -old, --romvault Produce a DAT in RV format
-i, --import Start tool in import mode -i, --import Start tool in import mode